---
title: Enabling web farms on Azure Web Apps
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

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](https://docs.microsoft.com/en-us/azure/app-service-web/web-sites-scale).

For this functionality to work with Kentico, you need to enable and configure [Web farms](https://docs.kentico.com/k9/configuring-kentico/optimizing-website-performance/setting-up-web-farms.md).

> **Info:** We only support this functionality for [web hosting plans](https://docs.microsoft.com/en-us/azure/app-service/azure-web-sites-web-hosting-plans-in-depth-overview) with a **Basic** or higher [pricing tier](https://azure.microsoft.com/en-us/pricing/details/app-service/).

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](https://docs.kentico.com/k9/running-kentico-on-microsoft-azure/running-kentico-in-azure-web-apps/setting-up-kentico-in-azure-web-apps.md)), enable and configure web farms in the Kentico system:

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](https://portal.azure.com/) -> 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](https://docs.kentico.com/k9/configuring-kentico/optimizing-website-performance/setting-up-web-farms.md) for more information.
5. [Configure storing of session state data](https://docs.kentico.com/k9/running-kentico-on-microsoft-azure/storing-cache-and-session-state-data-in-azure-environment.md).

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.

> **Note:** **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:
>
> ```xml
>
> <add key="CMSWebFarmSynchronizeFiles" value="false" />
>
> ```
