Share via

Azure Session Affinity issue

Anonymous
2021-06-28T07:37:16.19+00:00

We’ve hit an issue with azure session affinity using the ARRAffinity cookie. We have an AFD domain of say x.co.uk which routes 50/50 to 2 AS’s one in uk south and one in uk west.

The problem is the cookie domain returned to the client is for the AS domain like either uks.azurewebsite.net or ukw.azurewebsite.net and this is rejected by the client which only allows x.co.uk.

What’s the best practice to fix this? Without this cookie returned by the client on subsequent requests the session affinity is broken.

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.


1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 22,721 Reputation points Moderator
    2021-06-30T13:17:29.773+00:00

    Thanks for asking question! It seems that the Custom domain of AFD and custom domain of App service are different.
    Just to confirm have you setup custom domains on your app service.

    Further if you are looking about AFD automatically configuring custom domain on backend app service then this feature is not available and there is ongoing feedback on this.

    So as a workaround you need to manually register the custom domain by changing the CNAME record to each of the App Services in turn, and then point the custom domain back to Azure Front Door. This way both AFD and App service will have same custom domain and session affinity will work.

    You may refer this blog might be helpful.

    Let us know if further query on this or issue remains.

    Disclaimer: This response contains a reference to a third-party World Wide Web site. Microsoft is providing this information as a convenience to you.

    Was this answer helpful?


Your answer

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