Increasing storage capacity on Azure Web Apps
By default on Azure Web Apps, all files are stored in the file system with the application, including the media files. However, the capacity of the storage space is limited – the Basic plan has 10 GB storage available, see Websites Limits for details. When you exceed the capacity, for example by uploading large media files, you have the following options:
- Raise the web hosting plan.
- Configure your system to use Azure Blob Storage and store the media files there.
Configuring Azure Web Apps to use Azure Blob Storage
If you want to connect your Web App service to the Azure Blob Storage and store files there, you have two possibilities depending on the amount of files you want to store there:
Store only specific media libraries on Azure Blob Storage (recommended).
- When you run out of space, map some of your media libraries to the Blob storage without needing to change anything else.
Store all files on Azure Blob Storage.
- This includes for example media files, locally stored search indexes and web analytics log files. With this approach, you need to enable processing of local search tasks using a scheduled task and remap the web analytics log storage folder.
- Choose this option only if you are sure you need to have your project configured this way. For example if you need to have all media files stored in one place.
Azure CDN
Azure CDN can only be enabled for files stored in the Azure Blob Storage.
Storing only specific media libraries on Azure Blob Storage
- Proceed according to Configuring Kentico to store only media files on Azure storage.
- Re-deploy your project to the Azure Web Apps.
Notes:
- Links to the media files will be different for files in the file system and files located on the Blob Storage.
- Everything else apart from the media library files will be stored on the Web App server file system.
Storing all files on Azure Blob Storage
Open the Azure management portal, select Storage and create a new Azure Blob Storage.
Add keys to the web.config file according to Configuring Kentico to map its file system to Azure storage.
Add the following key to the appSettings section of your web.config file:
<add key="CMSProcessSearchTasksByScheduler" value="true" />
Make sure that the Execute search tasks scheduled task is enabled and set to a reasonable value (for example one hour).
- This scheduled task and the web.config key ensure that the system processes search tasks on a shared storage (Blob storage).
Re-deploy your project to the Azure Web Apps.
From now on, the system uses the Azure Blob Storage to store new media files, local search indexes and web analytics logs.
Notes:
- Already existing media library files are stored in the file system. No action is needed, however, if you wish, you can move them to the Blob Storage as well. This would require re-saving of the links to the media library files from content (Pages application).
- By default, web analytics logs are also stored on the Blob Storage. The Web analytics module writes and processes logs every minute, which can cause latency problems on the Blob Storage. We strongly recommend that you map the folder which stores Web analytics data to the file system of the Web App server. See Mapping the Web analytics storage folder to the server file system for instructions.