Azure App Service load balancing settings
Asked Answered
U

0

11

ARM template for Azure App Service has setting to configure load balancing algorithm - loadBalancing. According to documentation it's available through SiteConfig object and can have following values: WeightedRoundRobin, LeastRequests, LeastResponseTime, WeightedTotalTraffic, RequestHash.

We performed some testing with Standard S1 app service plan with two instances. First instance was responding to all request with no delay, second instance was responding to all requests with 3 seconds delay, ARR affinity was turned off.

Test showed that all settings perform the same - after some ramp up time all requests spread evenly between two instances. It was not expected at least for LeastResponseTime, which intuitively suppose to direct more traffic to first instance (with low response time).

So the questions is, does this setting even work? And if it does, in what app service configuration it's respected?

Undenominational answered 25/9, 2018 at 7:3 Comment(9)
Not sure your question, could you describe what you have done in your test? or what is load balancing setting? and what do you expect in the result?Calefactory
We used Netling to generate lot of HTTP GET requests to app service. App service was running simple ASP.NET MVC application that respond HTTP 200 to all get requests with "OK" in response body. App was configured in such a way that first instance was responding immediately (response time below 100 ms) and second instance was adding 3 second delay. We tried to simulate case when one of the servers experiencing high load with this test.Undenominational
Azure app service has setting inside ARM template called "loadBalancing". Setting name and supported values suggest that it should somehow specify how requests are distributed between instances. However we were not able to see any difference using different values for "loadBalancing" setting for our test case. 50% of request was server by first instance, 50% of requests were server by second instance, for all supported setting value values: WeightedRoundRobin, LeastRequests, LeastResponseTime, WeightedTotalTraffic, RequestHash.Undenominational
For Weighted round robin, you can set the weight 5 for instance1, and weight 1 for instance2, what is the result? and you can refer to these load balancing algorithm description.Calefactory
Azure App Service uses internal load balancer that is not exposed and not configurable directly (except misterios loadBalancing setting in ARM). So there is no way to change the weights.Undenominational
Just a thought, have you tried to verify it from a different region. This latency tool may be helpful azurespeed.comAlodium
You could take a look at this case. The scale-out itself is the load balance.Marino
The specific implementation of these algorithms by Azure might not exactly match their traditional definitions. For example, LeastResponseTime might require a significant difference in response times or a larger sample size to alter the routing decisions noticeably.Fastback
The App Service Plan level might also play a role. In some cases, certain features or their behaviors might differ based on whether you're on a Standard, Premium, or Isolated plan. Although documentation doesn't typically specify this, service level might impact the sophistication of load balancing features.Fastback

© 2022 - 2024 — McMap. All rights reserved.