Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

web site traffic load balancing issue

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?

like image 689
George2 Avatar asked Nov 19 '25 23:11

George2


1 Answers

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:

  1. Bind & MaxMind
  2. Bind & MaxMind
like image 184
Rakesh Sankar Avatar answered Nov 22 '25 03:11

Rakesh Sankar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!