Enabling web farms on Azure Web Apps
Microsoft Azure Web Apps allow you to scale the computing power allocated for your application, allowing you to increase performance and throughput for the application. To learn more about web app scaling in Microsoft Azure, see Scale up an app in Azure.
For this 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.
After you create an Azure Web App service with a Kentico application and deploy it using Visual Studio (see Setting up Kentico in Azure Web Apps), enable and configure web farms in the Kentico system:
If you have already scaled your web app to 2 or more instances, scale it back down to 1 instance:
- Open Windows Azure Management Portal -> App Services -> your web app.
- Switch to the Scale out (App Service plan) tab.
- Set the Instances count to 1.
- Click Save.
Open the Kentico administration interface of your web app.
Open the Settings application and select the Versioning & Synchronization -> Web farm category.
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.
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 if your App service). The system generates web farm servers and synchronization tasks automatically.
Disabling file synchronization
When scaling an Azure Web Apps deployment of Kentico to multiple instances, you need to disable the file synchronization functionality of web farms. Azure Web App instances use a shared file system, so synchronization is not necessary and may lead to collision errors.
Add the following key to the appSettings section of the application’s web.config file:
<add key="CMSWebFarmSynchronizeFiles" value="false" />