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?

samfromlv
  • 1,001
  • 1
  • 10
  • 17
  • 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? – Nancy Oct 03 '18 at 06:58
  • 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. – samfromlv Oct 03 '18 at 08:30
  • 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. – samfromlv Oct 03 '18 at 08:35
  • 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](https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/dd443524(v=ws.10)). – Nancy Oct 03 '18 at 09:04
  • 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. – samfromlv Oct 03 '18 at 11:05
  • Just a thought, have you tried to verify it from a different region. This latency tool may be helpful http://www.azurespeed.com/ – DevDisrupt Oct 03 '18 at 18:33
  • You could take a look at this [case](https://serverfault.com/questions/884554/azure-webservices-auto-scale-and-load-balancers-does-auto-scale-handle-load). The scale-out itself is the load balance. – Charles Xu Oct 04 '18 at 08:30

0 Answers0