nanog mailing list archives

Re: Question regarding anycasting in CDN setup


From: Anurag Bhatia <me () anuragbhatia com>
Date: Thu, 9 Feb 2012 01:28:07 +0530

Mike

 I can also have a single DNS
server give 192.0.2.80 out to queries sourced from a US IP Address,
198.51.100.80 for queries sourced from a German IP Address and
203.0.113.80 to queries sourced from a Chinese address (djbdns has a
module for this for example).


I have never did such setup, but I assume it works as you say. I wonder how
it finds a US based system from IP quickly (since it's DNS server)?


Thanks.
On Thu, Feb 9, 2012 at 1:21 AM, Anurag Bhatia <me () anuragbhatia com> wrote:

Nice explanation!


Thanks Mike.

Appreciate it.

On Thu, Feb 2, 2012 at 6:08 AM, Mike Jones <mike () mikejones in> wrote:

On 1 February 2012 20:25, Anurag Bhatia <me () anuragbhatia com> wrote:
<snip>
Now my question here is - why this setup and not simply using having a A
record for googlehosted.l.googleusercontent.com. which comes from any
anycasted IP address space? Why not anycasting at CDN itself rather then
only at DNS layer?

You are confusing anycasting with offering different results.

I can have an anycast DNS setup where all my servers give the same
response (example: most DNS providers), I can also have a single DNS
server give 192.0.2.80 out to queries sourced from a US IP Address,
198.51.100.80 for queries sourced from a German IP Address and
203.0.113.80 to queries sourced from a Chinese address (djbdns has a
module for this for example).

I would guess that google probably have a highly customised algorithm
which uses a combination of source IP and the node that your query
arrived at as part of the process for deciding what answer to give
you, along with dozens of other internal factors.

Although I do sometimes wonder why they use CNAME chains in cases
where the same servers are authoritative for the target name anyway.

If you were wondering why they direct you to the unicast addresses for
the local datacentre instead of just giving an anycast address which
your nearest datacentre would answer, well their algorithm might
decide that it wants to serve you content from the second closest
datacentre because the closest one is near capacity, anycast can't do
that.

- Mike




--

Anurag Bhatia
anuragbhatia.com
or simply - http://[2001:470:26:78f::5] if you are on IPv6 connected
network!

Twitter: @anurag_bhatia <https://twitter.com/#!/anurag_bhatia>
Linkedin: http://linkedin.anuragbhatia.com




-- 

Anurag Bhatia
anuragbhatia.com
or simply - http://[2001:470:26:78f::5] if you are on IPv6 connected
network!

Twitter: @anurag_bhatia <https://twitter.com/#!/anurag_bhatia>
Linkedin: http://linkedin.anuragbhatia.com


Current thread: