What is AAR (Application Request Routing) Affinity?
Application Request Routing (ARR) is a feature where when a client (or browser) request to any Azure based website, a cookie will be created and stick to the first time request received web site instance.
The same cookie will be used for subsequent requests from this client or browser and these requests will be guided to the same web site instance the one which was served for the first time.
With this feature, we can get an advantage if in case the web site instance is maintaining lots of data in his memory and moving the subsequent requests to other instance leads to copy entire data to other instance and this is a more performance and pain to the system.
We can see many disadvantages when compared with advantages. If a client request and unfortunately the sticky instance is not available, this request cannot be guided to any other available instance instead it will send an unavailable message to the client.
Also, In case if an instance is a too much load with other request and this request will be in request queue instead can guide to other instance to balance the load.
This ARR Affinity feature can be disabled for a particular web site or server by adding the following code in the configuration file.
<system.webServer> <httpProtocol> <customHeaders> <add name="Arr-Disable-Session-Affinity" value="True"/> </customHeaders> </httpProtocol> </system.webServer>