haproxy on Fedora or Application Request Routing (ARRv2) for IIS7?
I’ve been investigating solutions for Layer 7 load balancing today, well, tonight actually, mainly for my own use initially but obviously in my line of work I’m sure the knowledge will come in handy at some point in the future.
The main reason for someone like me to want or need to fiddle with Layer 7 load balancers (despite it being a part of my job as a SysAdmin) is because most ISPs these days provide nothing more than a single dynamic IP address. When (if you’re anything like me) you want to host multiple websites from multiple platforms such as Windows and Linux from that same IP address (and port!), you pretty much need a Layer 7 load balancer to do the job of distinguishing requests and routing them to the correct content server. A simple port forward on your £20 router won’t cut the mustard! So, a DynDNS account, CNAMEs for the websites in question and a Layer 7 load balancer will achieve the desired effect. It sounds like a lot of work really but I am a SysAdmin and I like to tinker. I’ll amaze you with a Visio diagram later…
On my first search for a Layer 7 load balancer, I came across haproxy for Linux which looks like it would do the job very nicely and fairly cheaply with decent preformance. It was only after I started tinkering with it and I was looking for a solution to the content servers seeing the proxy’s IP (which is what the X-Forwarded-For header resolves) that I happened across Microsoft Application Request Routing for IIS 7.
On a side note: If you’ve happened upon this post looking for answers to why your IIS 7 content servers see the proxy server’s IP address instead of the client, you would do well to read the following blog post by an IIS Core Developer, Anil Ruia:
If you’re looking for a solution for content servers that run Apache, take a look at mod_remoteip.
So, given that I’m a Microsoft guy I’ll do some comparisons of haproxy and ARRv2 to see which is the easiest to deploy and maintain (I think we know which is cheapest already). I’ll hopefully also put together a set of instructions for how to configure the end-to-end solution (and the reason why I needed it) in the coming weeks and months.
Initially I’ll be tinkering with haproxy and once I’ve passed my 70-647, I’ll free up some space on my ESXi server (I’ve only got 12GB RAM!) and have a play with ARRv2 on IIS 7.