Azure Dotnet Core 5 App loads slowly after not used for a while

Scott C 1 Reputation point
2021-11-16T07:02:01.82+00:00

I have a dotnet core 5.0 web application that loads quickly when running on my local machine. When published to Azure, it also loads quickly. However, it is a portfolio application that only receives traffic from myself on occasion or an employer checking it out. When the app is idle for a while, then I visit it, I sometimes have 4-8 second load time for a simple login page. Otherwise, it loads very quickly once warmed up, even from another browser that hasn't cached the request. App memory is at 60% and CPU usage is low. I have the app set to "always on" mode, which supposedly does a GET request to the home page every 10 mins. However, I'm linking from my portfolio page to the login page of the app, not the home page, so I don't know if that makes any difference in keeping the app warmed up. Any ideas on how to speed up initial load after inactivity would be appreciated.

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

1 answer

Sort by: Most helpful
  1. Jaliya Udagedara 2,836 Reputation points MVP Volunteer Moderator
    2021-11-16T20:28:57.287+00:00

    Technically Always On, should keep the App Service Warm.

    When Always On is not turned on (default), the app is unloaded after 20 minutes without any incoming requests. The unloaded app can cause high latency for new requests because of its warm-up time. When Always On is turned on, the front-end load balancer sends a GET request to the application root every five minutes

    https://learn.microsoft.com/en-us/azure/app-service/configure-common#configure-general-settings

    Can you have a look at the below article, it has some nice solutions:
    https://www.telerik.com/blogs/nine-performance-tips-for-azure-app-services

    0 comments No comments

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.