1

I'm looking for a way to set up my DNS so that global traffic hits different servers. At the moment, we have servers in one data-center and users from remote areas are complaining about slow speeds. So we'd like to set up servers closer to those users and have subdomain.domain.com hit those servers (very similar to a CDN, but with dynamic content)

Anyone know of a DNS host that does this? Or exactly what it's called so I can find info on it?

To clarify:

subdomain.domain.com should automatically go to one of these:

Server A (Texas)     - hosts north/south america
Server B (Amsterdam) - hosts europe/africa
Server C (Singapore) - hosts asia/australia
2

It's called Global Server Load Balancing. Akamai, Sandpiper, Amazon web services, etc can do that. If you want to do it yourself, you'll need something like a F5 Big-IP (for big bucks $$$). Keep in mind that DNS is the wrong place to do this properly which is why it's often called poor man's load-balancing.

  • Why is DNS the wrong way to do this? Sure, you could easily put redirects to "north-america.domain.com", "asia.domain.com", etc, but that would involve an initial round-trip hit to wherever the root server is. Further, sites like google do it using DNS. If I lookup google.com from Asia, I get one set of IPS, all starting with 61.91.9. If I look it up from New York, I get another set, all starting with 74.125.226. Putting the geo-ip load on the NS greatly minimizes the number of lookups and greatly increases inital load speed. – zyklus Feb 15 '14 at 9:16
  • Because the clients don't query your DNS servers directly, they query their DNS server which is not always local to them. Most organizations also use forwarders so you are two steps removed from the actual client IP. Most of the time this is "close enough" but the best place to make the decision is at the routing layer, the problem is getting the info you need to do that. Which is why everybody is still using a DNS-based approach to do GLB. It's "good enough"... attempts to add telemetry to DNS to make better routing decisions have never garnered consensus to become a standard. – milli Feb 15 '14 at 9:36
  • Okay, granted it's not perfect, but assuming I only have 4 or 5 datacenter locations spread around the world, isn't it as good as a "perfect" solution? I only see it falling apart when I have servers in 20 cities on one continent, but even then it's "decent" as it'll always return a server close to the client, if not the absolute closest. – zyklus Feb 15 '14 at 9:44
  • Yes, it's good enough. For fun, I challenge you to ask Google's DNS (8.8.8.8, which a lot of people use) about a domain name you control, capture the packets you get from Google resolving your name, and see if there is any relationship to your public IP address you used to initiate the query. Try it twice. That should clear up what I'm talking about. ;-) – milli Feb 15 '14 at 9:52
  • 8.8.8.8 is an anycast IP address, different idea though I suppose a very similar outcome. As far as I'm aware, anycast fails for what I'm trying to do since subsequent request won't necessarily hit the same server. I need user sessions to stay on the same machine – zyklus Feb 15 '14 at 9:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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