Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is the best way to handle session affinity (sticky session) with Azure IaaS VMs? We have 2 load balanced web servers. Right now they are setup and use the Azure Round Robin approach. The issue is we need to setup session affinity. It seems we can do so with ARR, but will that require another server to support it? We actually host several sites across several ports on these servers, so we need to support multiple ports as well. Can we do this with Network Load Balancing? What is the best way to handle this?

We use a 3rd party control now that is not serializable so we have to use session affinity.

share|improve this question

migrated from Sep 18 '13 at 18:27

This question came from our site for professional and enthusiast programmers.

Looks like this is now supported, but by IP only:

share|improve this answer

If you're going through the Azure load balancer (e.g. through the public IP address), you will have no control over the load-balancing algorithm, and there is no support for server affinity.

You would need to have another VM set up to handle load-balancing, whether it's IIS with ARR or something else such as nginx, haproxy, etc. You can then direct all traffic to your load-balancer VM (instead of your IIS VMs). Your load-balancer would then direct traffic to your IIS VM's via their internal IP address.

share|improve this answer
David, That's what I figured. We have now setup an Azure VM with IIS and ARR and have it pointing to our 2 web servers. When I try and hit the public endpoint of the ARR server, it is not displaying the web servers, and just gives me a 404. How can I test that we set this up properly? – Noah Sep 9 '13 at 14:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.