Session affinity is not working with Automatic scale out for Application service. Will it work with either Manual or Rules Based?

Baskar Mani 20 Reputation points
2024-10-09T05:26:03.37+00:00

Hi Team,

We are using Aure Application service with 3 instance and also enabled Session affinity. But Session Affinity is not working with "Automatic" scale out method where each request is going to different instances hence session is not maintained.

Actually, Azure App service also has following 2 Scale out options

  1. "Manual "
  2. "Rules Based"

My question is whether any of the above 2 options (Manual or Rules based) support Session Affinity?

User's image

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

Accepted answer
  1. Deepanshu katara 16,565 Reputation points MVP Moderator
    2024-10-09T05:46:27.52+00:00

    Hello , Welcome to MS Q&A

    Azure WebApps by default have ARR Affinity cookie enabled, this cookie pairs a client request to a specific server. However, Azure Web Apps is a stateless platform and, in an environment, where we are scaling the Website across multiple instances, the ARR Affinity cookie will be bound to a specific server. In case, the server is no longer in rotation, then all the requests corresponding to the ARR Affinity cookie will fail. It’s advisable to avoid the use ARR cookies in a scaled environment where we have multiple instances that serve our application requests. Disabling ARR cookies is a sustainable resolution for issues related to ARR Affinity cookies in scaled environments, where these cookies rely on the relationship with the worker machine they are paired with.

    Hence , Azure App Service does support Session Affinity, but it's not directly tied to the "Manual" or "Rules Based" scale-out options. Instead, Session Affinity (also known as ARR Affinity) is a feature that ensures a user's session is consistently routed to the same instance of your application, regardless of scaling configurations.

    To Summarize:

    • Manual and Rules-Based scale-out options both support ARR Affinity (Session Affinity).
    • ARR Affinity will ensure requests are routed to the same instance as long as that instance is available

    Please let us know if you have any further questions

    Kindly accept answer if it helps

    Thanks

    Deepanshu


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.