My web application is deployed on Azure App Service with multiple instances (scale out). It has a an API to generate a report. I want that a request to this API only go to a specific instance.
So I am thinking about writing a Javascript code to modify the value of ARR Affinity cookies before seding a request to the API so that the request go to the specify instance id.
I found an SO post in 2017 with an example code to set the cookies.
How to get access to azure app service instances directly
But I also found another SO post with someone stated that we should not interfere with this cookies value.
Azures Arr Affinity response cookie
I aslo asked ChatGPT and it told me it is valid to modify the cookies.
But all the resource URLs it gave me are expired and return 404.
Now I cannot find any Azure documentation that mentioned about the possiblity to modify this cookies manually.
So the question is can/should I write code in my application either front-end or back-end to modify the ARR Affinity cookies?