1
votes

SUMMARY: Can I use an Azure Storage Plan as additional storage that is available to an Azure Web App?

DETAILS: We have a very simple Web App using a low amount of CPU and large amount of storage (all it does is list and allow you to download files). I need at least 50GB of storage for video and audio files for this app and to get that amount of storage on a plan pushes me up to unreasonable CPU and other resources that I don't need with the consequences of a much higher price.

My plan (hope) is that I could create a Web App and remap the root directory of the Web App to a Storage Plan that is 50GB. Two challenges that I have spent the last day researching but at this point, I have not been able to find an answer.

I have created the Web App. I see that /wwwroot is on the D: drive of the Web App. I also created a storage plan and have created a sharable area of 50GB on the storage plan.

So... Can anyone give me some insight into the following:

  1. How do I tell the Web App to use the 50GB of storage which is now available to it?
  2. How can I map a drive letter to the area in the storage plan?
  3. How do I tell the Web App that it should use the 50GB area on the storage plan as the root drive instead of using D:/Webroot

Many Thanks!

2
You definitely do NOT want to use Azure Blob Storage to handle files? - Rob Reagan
Not sure if this is a question or a statement but.... I am open to using whatever file storage type is best. I will be storing .MP4 and .XML and .doc file (and others) but you get the idea. - FreddyDaBitMan

2 Answers

0
votes

Refer this feedback link on a similar request: https://feedback.azure.com/forums/169385-web-apps/suggestions/13536996-the-ability-to-store-iis-logs-in-azure-file-storag - it has been denied.

By default, on Azure WebApps, all files are stored in the file system with the application, including the media files. You may wish to know about the main types of files (https://github.com/projectkudu/kudu/wiki/Azure-runtime-environment) that are dealt on Azure WebApp (Persisted files, Temporary files and Machine level read-only files)

Refer to the article (https://github.com/projectkudu/kudu/wiki/File-structure-on-azure) File structure on azure to know the sets of files & dirs on Azure WebApp, and check the directories which include the possible increasing files, such as LogFiles, site/repository, site/deployments(for deployment slots) and your directory for uploading files.

To verify you can go to your scm site's debug console (https://{sitename}.scm.azurewebsites.net/DebugConsole) and query for the free space on d:\local. The “Disk Space” depends on the App Service plan you're using. It's 1 GB for Free, 10 GB for Basic, 50 GB for Standard and 250 GB for Premium, refer the document for more details on these limits: https://azure.microsoft.com/en-us/pricing/details/app-service/.

If your requirement fits you may use ASE - Azure App Service Environment is an Azure App Service feature that provides a fully isolated and dedicated environment for securely running App Service apps at high scale. https://docs.microsoft.com/en-us/azure/app-service/environment/app-service-web-how-to-create-a-web-app-in-an-ase

0
votes

According to Microsoft Azure Support:

"... since the Product Group confirmed that it is not possible to mount additional storage to the web app, you can integrate Azure storage with the Azure SDK or rest API. But you can't mount the drive and use it as storage.

Another option that you have would be to replicate the scenario on a Virtual Machine where you can choose its capabilities (Number of cores, RAM, and Storage Memory)."

So there you have it. It appears that WebApps are pretty fixed configurations which means that when you scale up a Web App, you get more CPU resources AND more Disk storage. It's a packaged deal most likely designed for ease of deployment. Nothing, it appears, you can do about that.

The best alternative, it seems, is to spin up a VM with your chosen OS and then add additional disk storage as needed. It's a "do-it-yourself" approach but the best solution that seems to be available.