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(

Azure AD and AWS Cognito side-by-side

In the last few weeks, I was involved in multiple opportunities on Microsoft Azure and Amazon, where we had to analyse AWS Cognito, Azure AD and other solutions that are available on the market. I decided to consolidate in one post all features and differences that I identified for both of them that we should need to take into account. Take into account that Azure AD is an identity and access management services well integrated with Microsoft stack. In comparison, AWS Cognito is just a user sign-up, sign-in and access control and nothing more. The focus is not on the main features, is more on small things that can make a difference when you want to decide where we want to store and manage our users.  This information might be useful in the future when we need to decide where we want to keep and manage our users.  Feature Azure AD (B2C, B2C) AWS Cognito Access token lifetime Default 1h – the value is configurable 1h – cannot be modified

ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded

Today blog post will be started with the following error when running DB tests on the CI machine: threw exception: System.InvalidOperationException: The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application config file for the ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information. at System.Data.Entity.Infrastructure.DependencyResolution.ProviderServicesFactory.GetInstance(String providerTypeName, String providerInvariantName) This error happened only on the Continuous Integration machine. On the devs machines, everything has fine. The classic problem – on my machine it’s working. The CI has the following configuration: TeamCity .NET 4.51 EF 6.0.2 VS2013 It see