High latency for hosted site from container

Mazurek, Jakub 100 Reputation points
2025-02-03T10:58:40.26+00:00

hi!

I have a problem with high latency despite using premium plans and am not sure how to debug it anymore.

Our application structure goes something like this:

Linux hosted VM pulls from content provider Contentful, then does a build process on the VM and pushes it to mounted azure storage and it's hosted on the static web app.

Now I tried to change the storage plan to Premium-ZRS-FileStorage and changed it in webapp setting but the latency(E2E success) is even higher than on the normal storage(Standard-ZRS-StorageV2 (general purpose v2)) : on premium max is 19s while on standard it's 8s, which looks pretty weird to me.

Also the build times and time to move files from VM to Storage are the same or within margin of error, which makes me think that there is some bottleneck between VM and the web app rather than storage itself.

VM doesn't seem to be limited as CPU usage is averaging 30%.

AppServiceHTTPLogs report the Time taken as long as between 10-60k which is very long for the website.

What could be the issue and the possible debug/ solution?

Thank you in advance!

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

Accepted answer
  1. Shree Hima Bindu Maganti 2,895 Reputation points Microsoft Vendor
    2025-02-05T16:24:28.0166667+00:00

    Hi Mazurek, Jakub,
    Thanks for the question and using MS Q&A platform.
    To address the high latency issues observed after transitioning to Premium-ZRS-FileStorage,
    To make sure that your App Service plan has sufficient resources (such as CPU and memory) for the app you are trying to deploy. If you are on a premium plan and are still experiencing lag, consider scaling up or increasing the number of instances to handle the load. Monitoring CPU and memory usage can also be done with the App Service diagnostics to identify any resource bottlenecks. methods on App Service enable diagnostic logs to gain insights into how the app is performing.

    They are particularly useful for tracing requests and dependencies that are taking too long through Azure Application Insights. Try determining what is causing the problem through the Application Insights Profiler, which helps in analyzing how the application performs at the code level.

    Make sure to consider the network latency. The location of the App Service and these resources should ideally be in the same region to avoid unnecessary delays. Also, VNET integration might be something that adds some additional latency, so pay attention there too.

    To reduce latency, consider an upgrade when serving static content from Premium-ZRS-FileStorage to Standard-ZRS-BlobStorage. Also, do not forget to check the IOPs and throughput limits on your storage ac.
    Let me know if you have any assistances.
    If the answer is helpful, please click Accept Answer and kindly upvote it so that other people who faces similar issue may get benefitted from it.
    https://learn.microsoft.com/en-us/azure/app-service/troubleshoot-performance-degradation
    https://learn.microsoft.com/en-us/troubleshoot/azure/azure-storage/blobs/alerts/troubleshoot-storage-performance#metrics-show-low-successe2elatency-and-low-successserverlatency-but-the-client-is-experiencing-high-latency


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.