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
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 with61.91.9
. If I look it up from New York, I get another set, all starting with74.125.226
. Putting the geo-ip load on the NS greatly minimizes the number of lookups and greatly increases inital load speed. – zyklus – 2014-02-15T09:16:23.170Because 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 – 2014-02-15T09:36:32.193
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 – 2014-02-15T09:44:29.787
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 – 2014-02-15T09:52:06.910
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 – 2014-02-15T09:56:17.317Yes, but anycast is good for your purpose, right? Your users will get routed to a local instance and thus you'll send them to the closer server farm, right? – milli – 2014-02-15T10:04:45.110
yeah, but unless I'm mistaken anycast needs to be implemented at a router level, and therefore the hosting provider needs to support it. This involves us switching providers to a likely far more expensive one (if one even exists -- I'm not aware of any VPS hosts that support it). The DNS solution can be implemented by adding a DNS host and changing NS records. – zyklus – 2014-02-15T10:09:24.167
Thanks for the info, at least I know what to search for now :) nsone seems like a good place for us to start looking at gslb, as they have a free tier with 5M queries/month.
– zyklus – 2014-02-15T10:16:55.257Not suggesting you do anycast here, just what you proposed. And think about how that'll work with other resolution fabrics out in the real world (like Google). – milli – 2014-02-15T10:17:32.480