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.
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
Post a Comment