4

I have a domain-name, and I want to host the website on two servers. One server is located in Europe and one in Asia. How can you route European people to the European server and Asian people to the Asian server?

I want to do this, because if you access a European website in Asia it's very slow and visa versa. I know/think some big websites are doing this too (like Google, Facebook, etc.).

Is it possible to do this? Or is there another way to manage this problem? And I'm not thinking of two domainnames.

0

4 Answers 4

2

You can use a DNS server that returns the IP address that is closest to the requesting IP address.

I have never used such a service, but the Server Fault post Geo-DNS providers? discusses many providers.

2
  • I think this is a helpfull link. And another option is, as suggested in the link, to use different subdomains for the regions.
    – Yoni
    Commented Apr 20, 2011 at 7:05
  • I couldn't find the link when I answered but this one geoscaling.com is free and I have heard good things about. Sub domains is easier and can be done with "normal" DNS but they will be seen as separate sites by search engines so very bad for SEO.
    – ollybee
    Commented Apr 20, 2011 at 9:11
1

Easy, just put script ip detect geolocation in your header index.php. Example: if IP from asia, redirect to asia.yourcompany.com else redirect to www.yourcompany.com

Yahoo will redirect to id.yahoo.com if visitors from Indonesia :)

1
  • 3
    DNS and routing before users hit your web server is much faster. Your method relies on the web servers application to manage routing. That means if you had millions of visitors your web server is getting hit 1 time from each then redirected to the next web server. It's not an ideal method, Amazon Web Services has some pretty simple to use load balancers.
    – Anagio
    Commented Feb 28, 2012 at 7:56
0

Yoni, large companies do this with DNS load-balancing appliances like Cisco's Global Site Selector.

0

I would investigate multiple A records in the DNS. It appears that may do what you want. It is worth researching.

1
  • I will investigate this option but I don't think it is going to work because of what I've read it only changes the IP if the other IP is unavailable or if you have multiple requests when loading a page he switches between the 2 IP's.
    – Yoni
    Commented Apr 20, 2011 at 7:04

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