How can my host's DNS outshine Amazon Route 53?

I have a server at Linode and use their nameservers for a .com domain (say, example.com). Due to certain restrictions, I’m currently unable to register example.com.au, example.id, and other such country-specific extensions. As a workaround, I use subdomains, such as au.example.com, id.example.com, etc. One performance issue here is that for every person in Australia who wants to visit au.example.com, a connection to Linode’s nameservers must be made. While their five nameservers are geographically dispersed to some extent (4x US, 1x UK), I would expect some latency for connections coming from and going to Australia.

So I thought I’d put some alternatives to the test, throwing DNS Made Easy and Amazon Route 53 into the mix. That is to say, I’ve been comparing DNS lookup times for some spare .com domains, one of which uses Linode’s nameservers, another DNS Made Easy’s, and yet another Amazon Route 53’s. I ran these domains through the WebPagetest here from a variety of locations.

AM = Amazon
LI = Linode
EZ = DNS Made Easy

Lookup times in ms. Best lookup times per set have been made bold.

FROM SYDNEY, AU

A (AM) 261 212 256
B (LI) 214 52 54
C (EZ) 213 56 54

FROM MOSCOW, RU

A (AM) 706 62 56
B (LI) 444 58 79
C (EZ) 3527 60 2196

FROM CHICAGO, US

A (AM) 55 47 99
B (LI) 75 47 46
C (EZ) 53 46 47

FROM TOKYO, JP

A (AM) 801 50 526
B (LI) 345 106 51
C (EZ) 318 47 44

GENEVA, CH

A (AM) 445 58
B (LI) 257 60
C (EZ) 95 59

WELLINGTON, NZ

A (AM) 596 52
B (LI) 423 55
C (EZ) 60 51

BRUSSELS, BE

A (AM) 574 58
B (LI) 134 56
C (EZ) 114 56

Lookup times on all first runs are noticeably higher, I would assume that’s related to caching. Now, if I add up these scores, one point for each ‘best score (or tie)’, I end up with: Amazon - 2, Linode - 6, DNS Made Easy - 12. Clearly, DNS Made Easy performs best overall, despite some odd numbers when testing from Russia. They have a pretty solid Anycast network, so this is basically how I expected them to perform.

What I cannot understand is how Linode’s nameservers, which are mostly US-based (5 POPs), can often match, sometimes even outperform, DNS Made Easy (12 POPs), and are in nearly every case more responsive than Amazon Route 53 (26 POPs).

If we take Brussels, for example, then it would make much more sense for Amazon to be fastest, since they have a POP in Amsterdam, whereas the closest for Linode is London, and for DNS Made Easy it’s Frankfurt and/or London.

How is this possible? What am I missing?

I’ll see if I can dig up the thread but there was a recent discussion on DNS performance which included some good dedicated services for doing global testing.

Are the DNS settings the same for the tests you ran across all of the providers (TTL’s, any CNAME chaining, etc)? Caching and how the provider is architected (anycast vs just supplying a list of resolvers) are going to have a big impact too.

Here is the thread: http://www.webpagetest.org/forums/showthread.php?tid=3326 (DNS performance and testing is discussed towards the end).

Hi Patrick,
That was an incredibly illuminating thread. I went with Amazon’s route 53 and Cloudfront primarily for cost reasons, but it turns out DNS Made Easy doesn’t really cost that much more.

I’ve been consistently getting a latency of ~50ms for DNS lookups for my site according to webpagetest.org, for most places where my users are located. Is this considered a “good” number?

Just wondering if its worth the effort to switch DNS hosters. I think I may be stuck with longer DNS lookup times for my Cloudfront CNAMEs because AWS crams so many records into it.

Thank you for a wonderful tool. I have no idea what I’d do without webpagetest.org.

Thanks for the link, Patrick, I’d seen the thread but hadn’t read through it all. The service mentioned in that discussion, however, gives results that vary quite wildly with each run, so I’m not sure what to think of it (I requested an account at Watchmouse several days ago, but they have yet to respond).

TTL is pretty much the same across the domains, and I’m only pointing the tests toward A records. Today’s repetition of the test somewhat confirms the earlier results, though the difference between Amazon and Linode is a little less pronounced.

Would it make any sense to combine DNS Made Easy with other nameservers, e.g. those of Route 53 or Linode, for extra coverage, as it were? Or would that be pointless, considering that in most cases, DNS Made Easy trumps the others?

I would say so, yes. That’s pretty much what I’m seeing on repeated lookups, and what I tend to consider an acceptable reponse.

If you are testing with a DSL connectivity profile then 50ms is the configured last-mile latency which means the records are probably cached in the ISP’s resolver (essentially 0ms lookups on the wire).

I don’t know if I’d bother with mixing multiple authoratative sources. Bind 8 will favor faster resolvers but it has to discover them first so you’re more likely to hit slower resolvers more often.

I see. It seems I have a bit to learn still when it comes to the inner workings of DNS. Are there any books or other resources on the subject that you would particularly recommend?

Sorry, I’ve just accumulated what I know over several years of working around it but usually as a result of a lot of searching. Maybe start with something like “how DNS works” and go from there.