6

Context: I am designing the auto-scaling (scale out) configuration for my .NET Framework 4.7 web app hosted on a Microsoft Azure App Service. I am using the P3V2 pricing tier. The application is CPU-bound. The app's 30 day CPU average is 30% usage while running on 2 instances, according to the stats indicated in the App Service plan. We occasionally have traffic spikes which will overwhelm the 2 instances: I want to implement auto-scaling.

I want to take into account the App Service Provisioning + App Startup Time when designing the metrics thresholds that decide when my app service scales out. I need to make my thresholds low enough to give Azure time to spin up a new app service instance but not so low that I am paying unnecessarily for processing power that's not needed. Budget is a significant factor.

Question: How long does it take for an Azure App Service instance to be available after a scale out? In other words, how long does it take for an Azure App Service to scale out?

P.S. I recognize that there is a lot more to scaling in/out that I am not addressing here. I'm trying my best to be succinct. :)

Vince Horst
  • 4,134
  • 1
  • 20
  • 33
  • It can take very different time for the same project. For exemple, for the same project, first time it took me 1 minute. Second time, same ASP, same project, took 10 minutes. Can't figure out the real reason behind that. – Alvard May 10 '22 at 09:30

1 Answers1

4

Generally, not long at all. By that I mean typically under one minute, but the time will vary depending on several factors, such as application size, time of day, region of deployment.

You could scale out manually and inspect the run history logs on the scale out tab.

FYI you can also use Azure Monitor to create auto-scale policies, in case this is of any use to you.

Architect Jamie
  • 1,621
  • 4
  • 18
  • Thanks for the advice and great suggestion to inspect the run history (seems obvious in hindsight)! I verified that when scaling the app service manually, the new instance starts serving traffic in 45 seconds. That's impressively quick. – Vince Horst Oct 29 '19 at 21:16
  • @VinceHorst How did you confirm the new instance was serving traffic in 45 seconds? I'd like to test how long it takes to see traffic routed to the new instance as well. – jjaguirre394 Aug 28 '20 at 23:05
  • 1
    To the HTML body (or HTTP header) of each response we added a unique string which identifies the server that generated the response. Using a browser's F12 Dev Tools we inspect the response to see the identifier. For example we usually use the last octet of the server's IP address, or last 5 characters of the server's machine name. Scale up and them immediately make browser requests until you see a new identifier. – Vince Horst Aug 29 '20 at 15:18