Home > OS >  Should Http 500 error trigger azure app service plan scale out?
Should Http 500 error trigger azure app service plan scale out?

Time:08-22

We use azure app service and this is our scale out setting.

enter image description here You can see that the scale out and in are based on app service plan's load (memory, cpu) and how many http 500 errors the site receive.

However, is there any point of having the http 500 error rule in scale out? When I think this way:

If the memory is ok, cpu is ok and queue is ok, but we got a burst of http 500. Will scale out actually give us anything?? It certainly won't solve the 500, as the timeout (assume 500 is triggered because of timeout) will still happen in the new instance as we have no pressure on hardware, they are just slow requests.

CodePudding user response:

http 500 error is a very generic error. If your web app contains a bug that can cause an http 500 error. Also, say a downstream server is down. That might also lead to an http 500 error. When that happens your app will scale out, but it won't help anything.

I'd start with scaling based on CPU and memory consumption. If you do have requests that are prone to timeouts, why not try to offload those to some background worker process using a queue for example.

Instead of scaling out on timeouts you should think about a strategy avoiding them, especially since you you say we have no pressure on hardware, they are just slow requests.

  • Related