Skip to main content

Data disk limit on App Service Plan and Web Apps

This post is dedicated to Web Apps and how we should handle that case when we are out of disk space.

Context
When hosting our web applications as Web Apps inside App Service Plan we are limited to a specific number of GB that can be used by our web applications to store content. Depending on what kind of tier we are using we can have from a few GB of disk space up to 1TB of disk space.
Inside an App Service Plan, we can host multiple Web Apps that are sharing the resources between each other, including the disk space. This means that if we have 4 Web Apps that are requiring 5GB of disk space each, at App Service Plan level we would require and consume 20 GB of disk space.

Problem
There are special cases when the disk storage space is not enough for our web apps. For example, there are cases when because of our business use cases we might need more data on disk that we have available inside the App Service Plans.

Let's take a look at what are the options that we have at the moment when the disk space inside App Service Environment it is not enough for our web apps.

Tier up
The first option that we have is to change the App Service Plan tier. Each App Service Plan tier has a different disk space, starting from 1GB up to 1024GB.
Changing the App Service tier from one to another comes with additional cost. Changing the App Service tier will double the running cost. Because of this, many companies and customer are looking for other options to increase the disk space without doing this change.

Attach disks
At this moment there is no possibility to attach a disk to App Service or to a Web App. This is something normal because at Web App level we don't have any control at OS level. Even if this solution would be super simple to implement and cheap it is not possible inside a Web App.

Azure Files
Using Azure Files, we would be able to share content using network drive or other capabilities. Unfortunately, Azure Files cannot be attached to Web Apps and App Services. The root cause is similar with the previous options, based on the network share and attach disks.

Azure Blob Storage
Blob storage it is a good option to be used in combination with App Services. Blobs are a cheap location where we can store content used by our Web Apps. The storage can be accessed directly by our application layer or we can redirect clients directly to our blob storage.
This solution works great as long as we have control at the application layer and we can change the code or how we fetch data.
If we don't have the possibility to modify the application to fetch data from different sources, then we cannot use this option.

Static web content inside Azure Storage
These capabilities enable us to host static content directly to Azure Storage. Clients can fetch content from Azure Storage as it would be under our Web App. It works great for cases when data disk is required to store content that it is required by our clients and not by our web application layer.

Conclusion
When you have such an issue related to disk space, in most of the cases the web application footprint it is so big that you consume all disk space available inside the App Service. The extra space required by your web application might be fetched from external sources, but not all the time. For this scenarious, the best possible solution is to split the application. More about this will be presented in the next post.

Comments

Popular posts from this blog

Windows Docker Containers can make WIN32 API calls, use COM and ASP.NET WebForms

After the last post , I received two interesting questions related to Docker and Windows. People were interested if we do Win32 API calls from a Docker container and if there is support for COM. WIN32 Support To test calls to WIN32 API, let’s try to populate SYSTEM_INFO class. [StructLayout(LayoutKind.Sequential)] public struct SYSTEM_INFO { public uint dwOemId; public uint dwPageSize; public uint lpMinimumApplicationAddress; public uint lpMaximumApplicationAddress; public uint dwActiveProcessorMask; public uint dwNumberOfProcessors; public uint dwProcessorType; public uint dwAllocationGranularity; public uint dwProcessorLevel; public uint dwProcessorRevision; } ... [DllImport("kernel32")] static extern void GetSystemInfo(ref SYSTEM_INFO pSI); ... SYSTEM_INFO pSI = new SYSTEM_INFO(...

How to audit an Azure Cosmos DB

In this post, we will talk about how we can audit an Azure Cosmos DB database. Before jumping into the problem let us define the business requirement: As an Administrator I want to be able to audit all changes that were done to specific collection inside my Azure Cosmos DB. The requirement is simple, but can be a little tricky to implement fully. First of all when you are using Azure Cosmos DB or any other storage solution there are 99% odds that you’ll have more than one system that writes data to it. This means that you have or not have control on the systems that are doing any create/update/delete operations. Solution 1: Diagnostic Logs Cosmos DB allows us activate diagnostics logs and stream the output a storage account for achieving to other systems like Event Hub or Log Analytics. This would allow us to have information related to who, when, what, response code and how the access operation to our Cosmos DB was done. Beside this there is a field that specifies what was th...

Cloud Myths: Cloud is Cheaper (Pill 1 of 5 / Cloud Pills)

Cloud Myths: Cloud is Cheaper (Pill 1 of 5 / Cloud Pills) The idea that moving to the cloud reduces the costs is a common misconception. The cloud infrastructure provides flexibility, scalability, and better CAPEX, but it does not guarantee lower costs without proper optimisation and management of the cloud services and infrastructure. Idle and unused resources, overprovisioning, oversize databases, and unnecessary data transfer can increase running costs. The regional pricing mode, multi-cloud complexity, and cost variety add extra complexity to the cost function. Cloud adoption without a cost governance strategy can result in unexpected expenses. Improper usage, combined with a pay-as-you-go model, can result in a nightmare for business stakeholders who cannot track and manage the monthly costs. Cloud-native services such as AI services, managed databases, and analytics platforms are powerful, provide out-of-the-shelve capabilities, and increase business agility and innovation. H...