Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

Dev GuideAPI Reference
Dev GuideAPI ReferenceDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Warm up sites

Describes how to perform a warm up of your Optimizely Digital Experience (DXP) site when it scales up or out and before new code is deployed to production.

📘

Note

Sites behind a login may experience a 403/400 error on deployments during warm up because the status cannot be confirmed with a log-in redirect. The warmup validation runs during deployments regardless of the options configured in the EPiServer.CloudPlatform.Cms.Warmup options.

Removing the Everyone role from a root or home page may trigger authentication checks, as the system must verify user roles against defined access rights.

See information on scaling up an app.

Warm-up occurs when a Web App receives requests, such as pre-populating in-memory cache before it receives production traffic. This process makes code deployments to production and scaling up or out as seamless as possible.

Optimizely's deployment automation engine attempts to configure a warm-up section automatically during deployments:

  • Issuing a web request to the start page.
  • Parsing the resulting HTML output to find relative links on the site's start page.

The system performs this for each unique hostname bound to the site. The system automatically adds this warm-up package as a dependency from EPiServer.CloudPlatform.Cms, a required package to run in DXP

Warm up the application

To warm up the application, EPiServer.CloudPlatform.Cms.Warmup parses homepage links and follows them with a request. You can configure a limited number of options on WarmupOptions.

"EPiServer": {
  "CMS": {
    "WarmupOptions": {
      "Disable": "false",
      "FollowLinkLevel": 1,
      "WaitingForStartupTimeout": "0:3:0",
      "StartupWaitingInterval": "0:3:0",
      "RequestTimeout": "0:0:1:0",
      "MaxNumberParallelRequests": 10
      "AdditionalPaths": [          
  			"/en/alloy-plan",          
  			"/en/alloy-save"
			]
    }
  }
}
public void ConfigureServices(IServiceCollection services) {
  services.Configure<WarmupOptions>(x => {
    x.Disable = false;
    x.FollowLinkLevel = 1;
    x.WaitingForStartupTimeout = TimeSpan.FromSeconds(180);
    x.StartupWaitingInterval = TimeSpan.FromMilliseconds(10);
    x.RequestTimeout = TimeSpan.FromMinutes(1);
    x.MaxNumberParallelRequests = 10;
    x.AdditionalPaths.Add("/en/alloy-plan");
    x.AdditionalPaths.Add("/en/alloy-save");
  });
}

Warm up the local development environment

You can trigger warmup in your local development environment. This helps expose bugs or issues before deploying to DXP and Integration, Pre-production, and Production environments.

if (_webHostingEnvironment.IsDevelopment()) {

  services.AddCmsWarmup(configure => {
    configure.Disable = false;
    configure.FollowLinkLevel = 10; // Should cover most pages?
    configure.WaitingForStartupTimeout = TimeSpan.FromSeconds(180);
    configure.StartupWaitingInterval = TimeSpan.FromMilliseconds(10);
    configure.RequestTimeout = TimeSpan.FromMinutes(1);
    configure.MaxNumberParallelRequests = 10; // Increase to speed up warmup and simulate more load
    configure.AdditionalPaths.Add("/en/alloy-plan"); // Add path to warmup that crawling won't find following links                    
  });
📘

Note

.AddCmsWarmup() implicitly triggers with .AddCloudPlatformSupport(). However, avoid triggering it in your local or development environment.