Reputation: 45761
I am wondering how distributed web site traffic is balanced. For example, I have a web site which has the single domain name (www.foo.com) and supposing physically it is setup as three web servers in US, EU and Asia separately. When the end user is located in the US, I want the user to access US physical web server when he requests www.foo.com in his browser. When the end user is located in the EU, I want the user to access EU physical web server. And similar for Asia. The benefit is the end user could access the nearest server, which will give the best performance.
I believe most big and distributed web sites are implemented in this way, e.g Google. I am wondering how it is implemented internally? In more details, how the magic of finding the nearest server is implemented?
Upvotes: 3
Views: 331
Reputation: 9415
Here you go. A perfect article for you and me to understand how this works. Like @omar it's something to do with DNS.
Global DNS Load Balancing, direct the users based on their geography.
Quick Info:
A special DNS server, or a module attached with DNS server, return different answer to different request based on the request (generally another DNS server, which is your DNS server of your ISP) IP geo-location :
www.yourdomain.com ---[CNMAE Record] ---> geo.yourdomain.com --- [ GSLB handdling, CNAME ]--> us.geo.yourdomain.com -- [A record] --> 68.178.110.21
Please don't hesitate to have a look at this: http://dev.robertmao.com/2007/06/30/global-dns-load-balancing-for-free/
Some of the players who give service:
Amazon Route 53, Cloudlevarage, f5, zeus, etc
Some of the ways you can build your own Geo-DNS:
Upvotes: 2
Reputation: 1609
This is done by using professional DNS services. They have world wide DNS servers who support DNS resolution from countries and return specific IP.
Upvotes: 0