Enabling web farms on Azure Web Apps

Microsoft Azure Web Apps allow you to scale the computing power (scale up) and the number of instances your application is replicated on (scale out), enabling you to increase the performance and throughput as necessary. Learn more about web app scaling in Microsoft Azure on Get started with Autoscale in Azure.

For the scale out functionality to work with Kentico, you need to enable and configure Web farms.

We only support this functionality for web hosting plans with a Basic or higher pricing tier.

To enable and configure Web farms in your Kentico application:

  1. If you have already scaled your web app to 2 or more instances, scale it back down to 1 instance:
    1. Open Windows Azure Management Portal -> App Services -> your web app.
    2. Switch to the Scale out (App Service plan) tab.
    3. Set the Instances count to 1.
    4. Click Save.
  2. Open the Kentico administration interface of your web app.
  3. Open the Settings application and select the Versioning & Synchronization -> Web farm category.
  4. Set the Web farm mode to Automatic.
    • This setting allows the system to generate and delete web farm servers dynamically according to the allocated computing instances.
    • See Setting up web farms for more information.
  5. Configure storing of session state data.

You can now increase or decrease the number of computing instances for your web app (in the Windows Azure Management Portal on the Scale out (App service plan) tab of your App service). The system generates web farm servers and synchronization tasks automatically.

Configuring shared storage

Note: To perform the following configuration, you first need to download and apply hotfix 11.0.43 or newer.

All scaled out Azure Web Apps operate over a shared file system. We recommend you configure web farms in Kentico to only generate a single synchronization task per file system operation to avoid potential unwanted side effects:

  1. Open the web.config of your application.
  2. Add the CMSSharedFileSystem key under the appSettings element:

    <appSettings>
    ...
    	<add key="CMSSharedFileSystem" value="true"/>
    ...
    </appSettings>
  3. Redeploy your application.

Web farms are now correctly configured to operate over shared storage.


Was this page helpful?