admin管理员组

文章数量:1336380

The Azure App Service load balancing setting "SiteLoadBalancing.LeastRequests" is the "Least Active Requests" algorithm, right? .azure.powershell.cmdlets.websites.support.siteloadbalancing.leastrequests?view=az-ps-latest

SiteLoadBalancing.LeastRequests

Am I understanding that correctly?

The Azure App Service load balancing setting "SiteLoadBalancing.LeastRequests" is the "Least Active Requests" algorithm, right? https://learn.microsoft/en-us/dotnet/api/microsoft.azure.powershell.cmdlets.websites.support.siteloadbalancing.leastrequests?view=az-ps-latest

SiteLoadBalancing.LeastRequests

Am I understanding that correctly?

https://learn.microsoft/en-us/answers/questions/2121068/azure-app-service-load-balancing-siteloadbalancing https://learn.microsoft/en-us/answers/questions/2121068/azure-app-service-load-balancing-siteloadbalancing

Share Improve this question asked Nov 20, 2024 at 7:49 Luke NarramoreLuke Narramore 5092 gold badges6 silver badges18 bronze badges 4
  • 1 Yes, that's correct! The SiteLoadBalancing.LeastRequests setting in Azure App Service uses the "Least Active Requests" algorithm. – Sirra Sneha Commented Nov 20, 2024 at 7:55
  • 1 It directs traffic to the server with the fewest active requests at that moment, helping to evenly distribute the load across servers. – Sirra Sneha Commented Nov 20, 2024 at 7:56
  • Thanks that does help a lot @SirraSneha :) – Luke Narramore Commented Nov 20, 2024 at 8:04
  • One of the reasons for my confusion was that things like Azure Load Balancer do not expose access to this algorithm. – Luke Narramore Commented Jan 20 at 8:06
Add a comment  | 

2 Answers 2

Reset to default 1

The Azure App Service load balancing setting "SiteLoadBalancing.LeastRequests" is the "Least Active Requests" algorithm, right?

Yes, you are correct. The Azure App Service load balancing setting SiteLoadBalancing.LeastRequests corresponds to the "Least Active Requests" algorithm.

  • It sends traffic to the server with the least number of active requests, helping to balance the load evenly across servers.
  • Please refer this doc for better understanding about load balancing.

To set the load balancing to SiteLoadBalancing.LeastRequests

Go to your Azure App Service - >Environment variables - > add below environment variable.

To test the load balancing behavior

Go to your azure app service - > click on scale out (app service plan) -> Increase the instance count to more than one

  • Use Application Insights to observe the load distribution across your instances.
  • You can also view metrics in your App Service, as following

Yes, you are correct. The Azure App Service load balancing setting SiteLoadBalancing.LeastRequests uses the "Least Active Requests" algorithm. This means that incoming requests are directed to the instance with the least number of active requests at that moment.

本文标签: