What was recommended to disable or enable session affinity in Azure App Service if the plan was having 3 instances. Also, app service was configured in Front Door.

Sai Kiran Maturi 61 Reputation points
2024-07-17T13:19:10.8+00:00

in our app service plan, we have 3 instances. Also, do we need to enable session affinity or disable it? Also, we configured this application in Front Door.

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

Accepted answer
  1. ajkuma 25,236 Reputation points Microsoft Employee
    2024-07-23T11:21:51.6133333+00:00

    Firstly, apologies for the delayed response.

    Based on my understanding of your issue from the description, when using Azure App Service with 3 instances and configuring it with Azure Front Door, it is generally recommended to disable session affinity (ARR Affinity) on the App Service and enable session affinity on the Front Door instead. This approach helps ensure that the session is pinned to a specific backend pool rather than a specific instance of the App Service.

    By default, Azure App Service uses ARR (Application Request Routing) Affinity, which ensures that subsequent requests from the same client are routed to the same instance. This is useful for stateful applications where maintaining session state is crucial.

    Just to highlight, some key points to consider:

    • Enable Session Affinity: If your application depends on session state and needs subsequent requests from the same client to be directed to the same instance, it's important to enable session affinity in both Azure App Service and Azure Front Door.
    • Disable Session Affinity: If your application is stateless or utilizes a distributed caching mechanism to manage session state, you can opt to disable session affinity. This enables Azure Front Door to evenly distribute requests across your instances, potentially enhancing both load balancing and fault tolerance.

    Ref: Traffic routing methods to origin

    Kindly let us know if you still have any specific questions.


    If the answer helped (pointed, you in the right direction) > please click Accept Answer to benefit the community find answers quickly to similar question.

    0 comments No comments

0 additional answers

Sort by: Most helpful