2

Our customer has a web server in China that they want to use for their Chinese customers because of speed issues. Their main web server is in Amsterdam. Do you guys have any ideas how best to accomplish this? We tried simply entering 2 different IP addresses in ISPconfig DNS records but that simply randomizes the resultant IP address.

Any better ideas?

SamTzu
  • 33
  • 6

5 Answers5

3

You can'd do that on your own; you need some sort of system which intercepts the user requests and directs them to the "nearest" or "better" server. This kind of service is usually offered by big service providers with a geographical infrastructure, which can provide different contents do different regions; see here for more info:

http://en.wikipedia.org/wiki/Content_delivery_network
http://en.wikipedia.org/wiki/Anycast

Massimo
  • 70,200
  • 57
  • 200
  • 323
  • Sure you can do it on your own. You can do it with a max mind database and a programmable DNS server like power DNS pretty easily. – dmourati May 07 '15 at 08:06
  • 2
    Well, ok, you *can* do it on your own, but you need to set up your own DNS/proxy/cache/whatever, in order to build what essentially amounts to a small-scale CDN. It's a lot more work than adding two records with the same name in the DNS. – Massimo May 07 '15 at 08:13
  • Agree. We're talking about much more work but the magic that geo DNS providers use is now available to the masses thanks to max mind and programmable DNS servers. – dmourati May 07 '15 at 22:49
  • dmourati is right. PowerDNS with geo IP map's was fairly easy solution. – SamTzu May 12 '15 at 11:40
1

If you put a DNS server in China pointing to your web server in China and a DNS server in Holland pointing to your web server in Holland that will get you most of the way there.

If you want more control, you should investigate Geo DNS service either in a roll your own solution or something from a vendor.

dmourati
  • 25,540
  • 2
  • 42
  • 72
  • GeoDNS seems like the best answer so far. Adding geoDNS to existing servers with PowerDNS seems like the easiest and cheapest solution so far proposed. – SamTzu May 12 '15 at 11:34
1

See this question for more answers: How can I force users from USA to go the USA server and visitors from UK to go to the UK server

The "build your own big solution" would be anycast routing. On a smaller scale it is much easier to use a CDN or a DNS service with some kind of latency based routing (link to AWS but others offer similar features).

mschuett
  • 3,146
  • 21
  • 21
1

One fairly common method (I'm thinking of Citrix Netscaler) does this is a concept called Global Server Load Balancing.

Fundamentally, you end up have making your DNS name a CNAME to some (less-friendly) subdomain which is delegated to a special load-balancer which has ways of determining relative proximity. I'll see if I can dig up a link; I must admin I was glossing over that part when I was on the course for that...

Here is it: http://support.citrix.com/proddocs/topic/netscaler-traffic-management-10-5-map/netscaler-gslb-gen-wrapper-10-con.html

You would want a 'proximity' configuration type.

Cameron Kerr
  • 4,069
  • 19
  • 25
  • We don't reject this option. It's just not OpenSource option and since there seem to be similar OpenSource options available like PowerDNS we will likely go that route. – SamTzu May 12 '15 at 11:35
  • GSLB is a technique, not something proprietary to NetScaler AFAIK. It is similar to what you can do with PowerDNS I suppose. – Cameron Kerr May 13 '15 at 00:22
0

What you want here is called split-horizon DNS . At least this is the proper way of doing this. For that to work you have to control the authoritative DNS.

Cameron Kerr
  • 4,069
  • 19
  • 25
Konrad Gajewski
  • 1,518
  • 3
  • 15
  • 29
  • Actually no. That would not work because with "normal" DNS like Bind you can't determine what country the query was made from so you could not point it to the right server. – SamTzu May 12 '15 at 11:29
  • With Bind you can make views that have ACLs generated from geolocation services like http://www.wipmania.com/. Of course no geolocation is perfect, but it's better than nothing. In fact the geolocation may not be precise, but as far as a country is concerned it is accurate. – Konrad Gajewski May 12 '15 at 13:45