question

BewesAnt-2234 avatar image
0 Votes"
BewesAnt-2234 asked BewesAnt-2234 commented

Azure Session Affinity issue

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-webapps
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Just checking in to see if the below answers helped. If this answers your query, do click “Accept Answer” and Up-Vote for the same. And, if you have any further query do let us know.

0 Votes 0 ·

1 Answer

SnehaAgrawal-MSFT avatar image
0 Votes"
SnehaAgrawal-MSFT answered BewesAnt-2234 commented

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.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I followed your advice and now the active/active app services we have in both regions share the same domain name as the AFD say x.co.uk
Sadly session affinity is still not working, to the point that I can see the ARRAffinity cookie being correctly returned to AFD which I know originated from the UKWest app service and AFD is sending that request wrongly to UKSouth, in the response is a new set-cookie for ARRAffinity coming from UKSouth. Why is AFD ignoring the ARRAffinity cookie?

0 Votes 0 ·