Using AzureARR Sticky Sessions in Azure

AzureARR is an example project which configures Application Request Routing on a web role, to enable sticky session load balancing in Windows Azure.

How it works

In the solution are three projects.

  • Two10.Azure.Arr.Cloud The Cloud project which will deploy the solution to Azure.
  • Two10.Azure.Arr A Web Role which contains the ARR installation files, and code to configure ARR to load balance requests to your servers using client affinity (sticky sessions).
  • WebRole1 An example web application, which displays the Azure the instance id, for you to check that the load balancing works. This should be replaced by your application.

Incoming requests to Azure are handled by one of the ARR Roles. If this is the first request made by a client, they will be directed to a WebRole instance using a round robin algorithm. A cookie will be issued, which allows the ARR Role to direct subsequent requests to the same machine (i.e. a sticky session).

The ARR Roles continually query the instances running in your deployment to keep the web farm up-to-date with the current network topology.


Two10.Azure.Arr has the following settings:

  • RoleName: The name of the role you wish to load balance to (i.e. WebRole1).
  • PublicUrl: The public address of the site (i.e.

The role being load balanced much have an internal endpoint configured, called ‘Internal’ (case sensitive).