12
Stack Exchange
votes

Azure App Service load balancing settings

Posted on 9/25/2018
UQ ID:384
Technology
Stack Overflow
Original

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?

Keywords & Tags
azure
azure-web-app-service
azure-load-balancer
Model Answers (9)
Submitted answers from various AI models
Unsolved
No reviews yet

K2-Think

Pending UQ Validation
Needs Human Verification
MBZUAI-IFM
Qwen2.5-32B
Sep 18, 2025, 01:50 PM

The loadBalancing setting in Azure App Service's ARM template does work, but its behavior depends on the App Service Plan tier and underlying infrastructure. Here's a breakdown of the key factors:

1. Tier Dependency

The advanced load balancing algorithms (e.g., LeastRequests, LeastResponseTime, WeightedTotalTraffic, RequestHash) are **only supported for Premium-tier App Service ...

0 model reviews
0 human reviews
No reviews yet

GPT-5

Failed UQ Validation
Needs Human Verification
OpenAI
Sep 2, 2025, 06:56 AM

Short answer: In the multi-tenant App Service (Free/Shared/Basic/Standard/Premium/Px), the loadBalancing setting in Microsoft.Web/sites/siteConfig is a no-op. The platform uses its own front-end routing (ARR) and you cannot change the per-app algorithm. That’s why all options behaved the same in your S1 test.

Where it does apply: The loadBalancing setting is only honored in App Service Environmen...

0 model reviews
0 human reviews
No reviews yet

o3 Pro

Failed UQ Validation
Needs Human Verification
OpenAI
Aug 1, 2025, 12:00 AM

Short answer
The setting is ignored in the public Azure App Service platform.
Every multi-instance web app (S, P, Isolated/ASE, Windows or Linux, functions, etc.) is load-balanced by the front-end Application Request Routing (ARR) servers with a simple weighted round-robin algorithm; the only thing you can turn on or off is the ARR-affinity cookie. The other algorithms that appear in the ARM/R...

0 model reviews
0 human reviews
No reviews yet

o4 mini

Failed UQ Validation
Needs Human Verification
OpenAI
Aug 1, 2025, 12:00 AM

In short – nothing is “wrong” with your test, the loadBalancing property in siteConfig today is only honored in an App Service Environment (ASE) (the isolated, customer‐owned version of App Service). On the public multi-tenant tiers (Basic/Standard/Premium on the shared platform) you always get a simple weighted-round-robin (no matter what you put in siteConfig.loadBalancing).

Explanation

  1. Wha...
0 model reviews
0 human reviews
No reviews yet

Gemini 2.5 Pro

Failed UQ Validation
Needs Human Verification
Google
Aug 1, 2025, 12:00 AM

This is an excellent and well-researched question. Your experiment is logical, and your conclusion that the setting doesn't seem to have an effect in your configuration is correct.

Here is a breakdown of why you are seeing this behavior and when this setting is actually used.

The Short Answer

The siteConfig.loadBalancing setting does not apply to the standard, multi-tenant Azure App S...

0 model reviews
0 human reviews
No reviews yet

DeepSeek R1

Failed UQ Validation
Needs Human Verification
DeepSeek
deepseek-ai/DeepSeek-R1
Aug 1, 2025, 12:00 AM
<think> We are given a question about Azure App Service load balancing settings. The user has tested various load balancing algorithms (WeightedRoundRobin, LeastRequests, LeastResponseTime, WeightedTotalTraffic, RequestHash) in an App Service Plan with two instances. One instance responds without delay, the other with a 3-second delay. They observed that regardless of the setting, the requests wer...
0 model reviews
0 human reviews
No reviews yet

o3

UQ Validated
Needs Human Verification
OpenAI
Aug 1, 2025, 12:00 AM

Short answer
────────────────
In the public-cloud Azure App Service the value that you put in siteConfig.loadBalancing is ignored; internally the platform always uses the same algorithm – a simple weighted round-robin (all instances have the same weight) with an optional ARR-affinity cookie for stickiness.
The other five algorithms that appear in the ARM schema exist only because the same Si...

0 model reviews
0 human reviews
No reviews yet

Claude Opus 4

Failed UQ Validation
Needs Human Verification
Anthropic
Aug 1, 2025, 12:00 AM

Based on your testing and the documentation, you've encountered a common point of confusion regarding Azure App Service load balancing settings. Let me clarify what's happening:

The Load Balancing Setting Context

The loadBalancing setting in the ARM template is indeed a valid configuration option, but it only applies to App Service Environments (ASE), not to standard App Service plans l...

0 model reviews
0 human reviews
No reviews yet

Claude 3.7 Sonnet

Failed UQ Validation
Needs Human Verification
Anthropic
Aug 1, 2025, 12:00 AM

Azure App Service Load Balancing Settings Explained

Based on your testing and observations, you've raised a valid question about how the load balancing algorithms actually function in Azure App Service. Let me clarify how this works:

How Azure App Service Load Balancing Works

Azure App Service uses Application Request Routing (ARR) for load balancing between instances. The loadBalancing ...

0 model reviews
0 human reviews
Submit Your Model's Answer
Your submission will be validated by our LLM validator and then by human experts

You need to be logged in to submit an answer