CloudPundit: Massive-Scale Computing

the business of Internet infrastructure, cloud computing, and virtual worlds

The nameserver as CDN vantage point

Posted by Lydia Leong on October 15, 2008

I was just thinking about the nameserver as a vantage point in the Microsoft CDN study, and I remembered that for the CDNs themselves, the nameserver is normally their point of reference to the customer.

When a content provider uses a CDN, they typically use a DNS CNAME to alias a hostname to a hostname of the CDN provider. For instance, www.nbc.com maps to www.nbc.com.edgesuite.net; the edgesuite.net domain is owned by Akamai. That means that when a DNS resolver goes to try to figure out what the IP address of that hostname is, it’s going to query the CDN’s DNS servers for that answer. The CDN’s DNS server looks at the IP address of the querying nameserver, and tries to return a server that is good for that location.

Notably, the CDN’s DNS server does not know the user’s actual IP. That information is not present in the DNS query (RFC 1035 specifies the structure of queries).

Therefore, what nameserver you use, and its proximity to where you actually are on the network, will determine how good the CDN’s response actually is.

I did a little bit of testing, which has some interesting results. I’m using a combination of traceroute and IP geolocation to figure out where things are.

At home, I have my servers configured to use the UltraDNS “DNS Advantage” free resolvers. They return their own ad server rather than NXDOMAIN, which is an annoyance, but they are also very fast, and the speed difference makes a noticeable dent in the amount of time that my mail server spends in (SpamAssassin-based) anti-spam processing. But I can also use the nameservers provided to me by MegaPath; these are open-recursive.

UltraDNS appears to use anycast. The DNS server that it picks for me seems to be in New York. And www.nbc.com ends up mapping to an Akamai server that’s in New York City, 12 ms away.

MegaPath does not. Using the MegaPath DNS server, which is in the Washington DC area, somewhere near me, www.nbc.com ends up mapping to a server that’s directly off the MegaPath network, but which is 18 ms away. (IP geolocation says it’s in DC, but there’s a 13 ms hop between two points in the traceroute, which is either an awfully slow router or more likely, genuine distance.)

Now, let’s take my friend who lives about 20 miles from me and is on Verizon FIOS. Using Verizon’s DC-area nameserver, he gets the IP address of a server that seems to live off Comcast’s local network — and is a mere 6 ms from me.

For Limelight, I’m looking up www.dallascowboys.com. From UltraDNS in NYC, I’m getting a Limelight server that’s 14 ms away in NYC. Via MegaPath, I’m getting one in Atlanta, about 21 ms away. And asking my friend what IP address he gets off a Verizon lookup, I get a server here in Washington DC, 7 ms away.

Summing this up in a chart:

My DNS / CDN PingAkamaiLimelight
UltraDNS12 ms14 ms
MegaPath18 ms21 ms
Verizon6 ms7 ms

The fact that Verizon has local nameservers and the others don’t makes a big difference as to the quality of a CDN’s guess as to what server it ought to be using. Here’s a callout to service providers: Given the increasing amount of content, especially video, now served from CDNs, local DNS infrastructure is now really important to you. Not only will it affect your end-user performance, but it will also affect how much traffic you’re backhauling across your network or across your peers.

On the surface, this might make an argument for server selection via AnyCast, which is used by some lower-cost CDNs. Since you can’t rely upon a user’s nameserver actually being close to them, it’s possible that the crude BGP metric could return better results than you’d expect. AnyCast isn’t going to cut it if you’ve got lots of nodes, but for the many CDNs out there with a handful of nodes, it might not be that bad.

I went looking for other comparables. I was originally interested in Level 3, and dissected www.ageofconan.com (because there was a press release indicating an exclusive deal), but from that, discovered Funcom actually uses CacheFly for the website. funcom.cachefly.net returns the same IP no matter where you look it up from (I tried it locally, and from servers I have access to in Colorado and California). But traceroute clearly shows it’s going to different places, indicating an anycast implementation. Locally, I’ve got a CacheFly server a mere 6 ms away. From California, there’s also a local server, 13 ms away. Colorado, unfortunately, uses Chicago, a full 32 ms away. Unfortunately, this doesn’t tell us much, beyond the fact that CacheFly has limited footprint; we’d need to look at a CDN with enough footprint that uses AnyCast to see whether it actually return results better than the nameserver method does.

So here’s something for future researchers to explore: How well does resolver location correspond to user location? How much optimization is lost as a result? And how much better or worse would AnyCast be?

Bookmark and Share

3 Responses to “The nameserver as CDN vantage point”

  1. Lydia,

    I’d love to hear your results comparing OpenDNS in that mix. OpenDNS has been providing anycated recursive DNS and security service for years to millions of consumers, SMBs and enterprise customers.

  2. Lydia Leong said

    Both of your nameserver addresses seem to map to someplace close to me — my last hop has a label of Equinix Ashburn, in the ‘burbs of DC, and my ping to them is 7 ms.

    They both result in the same Akamai edge servers for me, connected via NTT’s network, also marked Ashburn. My ping to those is 6 ms. Note that these are different servers than the ones that Verizon returns to my friend, yet they are equally close to me.

    Both of your nameservers also return identical Limelight servers. These are the same servers that Verizon returns to my friend, the ones that are 7 ms and regional to Washington DC.

    What this also tells me is that I can immediately get an improvement in my content download performance from Akamai and Limelight, by switching my nameservers to yours, which I am going to do now. (Sadly, OpenDNS also does the NXDOMAIN hijack, but I’ve learned to live with it, even though it drives me batty every time I mistype a hostname when doing app development.)

    I’ve also tried the same experiment on my server in Colorado (off Time Warner Telecom), where the difference is pretty significant. UltraDNS and OpenDNS both have identical Akamai results, 34 ms away; its ISP nameserver results in an Akamai server 49 ms away. UltraDNS and OpenDNS return identical Limelight results 33 ms away, in Chicago. But the ISP nameserver has a much better result, 15 ms away, in Dallas.

  3. Lydia,

    Create an OpenDNS account and disable “typo correction.” We’ll provide you standard NXDOMAIN responses then. Everything we do is for your benefit, and if you don’t like a feature, you can disable it. We’ve been doing this a long time and have millions of happy customers; no advertising or marketing; just word-of-mouth from IT person to IT person.

    Thanks for the great feedback and tests.

    -David

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>