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

I have one web site and 3 servers in different location Asia, Europe, US. I am new in this things but what I want to do is implement ARR load balancing by geolocation (like CDN). Anyone know tutorial how to achieve it or from where to start?

share|improve this question
up vote 2 down vote accepted

Geograpic load balancing (sometimes called "Global Server Load Balancing" or GSLB) as traditionally done has little to do with web servers, and everything to do with DNS. You need a DNS server that will give people the IP they want based on their geography. See pGeoDNS for a simple example written in Perl that will run on most systems, and uses a free database of IP locations. There are lots of commercial solutions as well, including appliances from people like F5, or outsourced services from folks like DynDNS.

Now, another option would be to do the redirection at the IIS layer. You publish "" in DNS with all three of your locations as possible answers. Then, when a user connects, you do a redirect to "" or "" based on a quick lookup in a Geo-IP database hosted on each web server. You should probably set a cookie or something to prevent having to do that lookup every time. You will also need monitors that will not do the redirect if say "" is down. You could use the information in the vistors "Accept-Language" header as well, perhaps creating a composite score with their IP which indicates where the user should be redirected.

You can of course combine the approaches, or do something even sexier, like anycast for DNS or even HTTP, but it sounds like that is too complicated and expensive for your needs.

share|improve this answer
+1 for pGeoDNS, that looks interesting – Mike Pennington Jun 15 '12 at 16:41

Please see the bellow tutorial and for more information you could go here where it's explained exactly what you want to accomplish and for the whole series (it free! ) you can go here .

Hope this helps .

share|improve this answer

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.