How do web apps load balance with ARR affinity turned off?

Niharika Koneru 441 Reputation points Microsoft Employee
2021-03-29T16:31:56.667+00:00

For my Azure Web App I noticed in General Settings that my ARR affinity is set to “On” by default. I want to turn this setting off as the message states it improves performance of stateful apps, while my app is stateless. If I turn this setting off, how will it impact my application request routing? Will requests be routed randomly? Will they be evenly distributed?

82400-image.png

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,858 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ryan Hill 25,486 Reputation points Microsoft Employee
    2021-03-29T18:49:16.073+00:00

    When trying to Load Balance evenly between instances of a single Azure Web App, disabling ARR Affinity will accomplish this. As a PaaS service, each instance of the application is deployed with a load balancer over it.
    More information on the Azure App Service architecture can be seen here, https://learn.microsoft.com/en-us/archive/msdn-magazine/2017/february/azure-inside-the-azure-app-service-architecture#:~:text=%20Inside%20the%20Azure%20App%20Service%20Architecture%20,acting%20as%20a%20proxy,%20distributing%20incoming...%20More

    With that said, disabling ARR Affinity is a best practice to achieve highest uptime for your application. This will ensure that requests will be evenly distributed between instances and not overload a single instance.
    More information on this and other best practices can be seen here, https://azure.github.io/AppService/2020/05/15/Robust-Apps-for-the-cloud.html#update-your-default-settings

    Although ARR Affinity will help with distribution of traffic between instances, for distributing traffic between Deployment Slots or between different Web Apps requires a different solution.

    For Deployment Slots, the percentage of traffic that you would like routed to each instance can be set from the Portal.

    82532-image.png

    For managing traffic between apps (for example, three apps deployed to different regions), a traffic manager offering would need to be used. Traffic managing offerings such as Azure Traffic Manager, Azure Application Gateway, or Azure FrontDoor can help in these multi-app scenarios.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful