Sitecore WarmUp Azure for Outscaling

In a previous post on warming-up your environment, I talked about warming up the cm environment via a powershell script on the build server.

This script is usefull because it logs in to your environment before making subsequent calls.

In this post, I want to talk about initializing your azure web application before allowing traffic to it. This is especially useful if you want to use (auto)out scaling.


When you out scale an application in Azure, all new sessions tend to arrive on the new added servers. If these servers are not warmed up, all those new sessions take the “application booting” hit, which results in a big loss of traffic.

By enabling the Web App Application Initilization, you can make sure, your application is well booted and warmed up on the new server before traffic is allowed to it.

Azure Web App Application Initialization

In the web.config file you can define which pages that needs to be visited before the application becomes available. You can also define a page that needs to be shown during this startup phase.

The applicationInitialization config is added in the <system.webServer> node.

    <applicationInitialization remapManagedRequestsTo="Booting.html" doAppInitAfterRestart="true" skipManagedModules="true">
      <add initializationPage="/warmup-message.aspx?message=Warming up instance" hostName=""/>
      <add initializationPage="/?t=1" hostName=""/>
      <add initializationPage="/?t=2" hostName=""/>
      <add initializationPage="/warmup-message.aspx?message=Privacy loaded, loading hub" hostName=""/>
      <add initializationPage="/api/taxonomy/postalcodes" hostName=""/>
      <add initializationPage="/warmup-message.aspx?message=Warm up completed" hostName=""/>

The warmup-message.aspx file is just a page that make an entry into the logs for debugging.

If you want to learn more on the Azure Web App Intialization, please read the very nice post by Zan Kavtaskin.

Adding HTTPS support

By design, all calls of the application initialization are made to http on port 80.

When you host your website only on https, and the http just performs the redirect, than the redirect is interpreted as a valid response and the server thinks your application is up and running.

Microsoft has written a post on how to by pass this.

The solution comes down to, detecting theĀ application initialization in the rewriting rules config, and allow it to make its call on http.

This can be achieved by adding this rewrite rule:

  <rule name="No redirect on warmup request" stopProcessing="true">
    <match url=".*" />
      <add input="{HTTP_USER_AGENT}" pattern="Initialization" />
    <action type="Rewrite" url="{URL}" />

1 thought on “Sitecore WarmUp Azure for Outscaling

  1. DM says:

    I’ve followed these steps and confirmed AppInit is running, however site is not warmed up. Not sure what I am missing.


Leave a Reply

Your email address will not be published. Required fields are marked *