Difference in placing files in the container filesystem instead of on the content volume in Linux?

Melbin Mathew 40 Reputation points
2024-02-15T12:28:33.0033333+00:00

It's mentioned in the Microsoft site that the disk latency in placing files in the container filesystem instead of on the content volume is higher. Could you please give more insight into this?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,462 questions
0 comments No comments
{count} votes

Accepted answer
  1. brtrach-MSFT 17,476 Reputation points Microsoft Employee
    2024-02-17T05:47:43.5366667+00:00

    @Melbin Mathew When you deploy your app to built-in images in Azure App Service on Linux, your code and content are allocated a storage volume for web content, backed by Azure Storage. The disk latency of this volume is higher and more variable than the latency of the container filesystem. This is because the storage volume is a network file share, which means that the app has to make network calls to read and write files.

    On the other hand, if you place your files in the container filesystem instead of on the content volume, the files are stored directly on the container's local file system. This can result in lower latency and faster access times for your app. However, it's important to note that this option is only recommended for apps that require heavy read-only access to content files.

    We typically only recommend using the local cache when:

    • The content is shared across multiple virtual machine (VM) instances of the app.
    • The content is durable and can be modified by running apps.
    • Log files and diagnostic data files are available under the same shared content folder.
    • Publishing new content directly updates the content folder. You can immediately view the same content through the SCM website and the running app (typically some technologies such as ASP.NET do initiate an app restart on some file changes to get the latest content).

    Please note that local cache is not available for containerized apps. More information can be found here: https://learn.microsoft.com/en-us/azure/app-service/overview-local-cache

    0 comments No comments

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.