Shared persistent memory for Azure Web app

johananmahendran 120 Reputation points
2023-11-01T06:44:42.1+00:00

Hi,

I want to store data as a JSON blob, that will shared by all users of my web app. I want to store common questions asked by my users and save any facts that the user submits. All users are allowed to and should be able to access this data. This file may be accessed frequently, both to read and to write.

I have around 10GB of storage in the Azure web app, and was wondering if this storage is persistent. Would I be able to save a file and modify it whenever, even when the app is stopped or restarted? I am using Python to build my app.

And if not, are there any cheap alternatives? I don't want to create an entire CosmosDB or Blob Storage just to store a single file.

Thanks!

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
1,173 questions
{count} votes

Accepted answer
  1. VenkateshDodda-MSFT 24,951 Reputation points Microsoft Employee Moderator
    2023-11-02T14:37:02.2366667+00:00

    @johananmahendran Thanks for reaching out to Microsoft Q&A apologize for any inconvenience caused on this.

    By default, when you create an app service, each app service plan is allotted with some amount of storage based on their tier. Azure App service file system has three types of files Persistent, temporary and Machine level read-only files and each type have certain threshold as well refer to Github documentation to understand more about them.

    Azure Web Apps provide a limited amount of persistent storage that can be used to store files and data. However, this storage is not intended for long-term storage of large amounts of data, and it is not recommended to use it for storing data that needs to be frequently accessed or modified.

    In your case, since you want to store a JSON blob that will be shared by all users of your web app and accessed frequently, it is not recommended to use the Azure Web App storage for this purpose. The storage provided by Azure Web Apps is intended for temporary storage of application data, such as session state and cache data.

    Instead, you can mount Azure storage account as a local file share to store your JSON blob. Azure Blob storage is a cost-effective way to store large amounts of unstructured data, such as JSON files. Refer to this documentation on how to mount storage account in azure app service.

    Feel free to reach back to me if you have any further questions on this.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.