Affinity cookie is used to control the effective loading of the website and to ensure that all user requests are directed to the same server in any browsing session.
Enable Affinity Cookie on Azure Function :
- Navigate to Azure Portal
- Locate your Function App
- In Setting Pane, select Configuration
- Add New application setting
- Add Name as : PreferConnectionAffinity and Value : true
- click OK and save the setting
- Now when ever request will be send, it will be appending a affinity cookie to it and reach a dedicated server

- Navigate to Azure Portal
- Locate your Function App
- In Setting Pane, select Configuration
- Add New application setting
- Add Name as : PreferConnectionAffinity and Value : false
- click OK and save the setting
- Now when ever request will be send, it will be distributed across servers


I tried above approach and the results were amazing, My…
View original post 76 more words