Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Mar 07, 2014 4:08 pm 
Offline
Newbie

Joined: Mon Feb 27, 2012 10:43 pm
Posts: 4
It's a bit of a long shot, but worth asking. Would Linode consider upgrading their customer DNS server infrastructure to anycast? A paid upgrade option would be fine as long as it's not too expensive. (Dollar a month?)

Here's the issue: I recently migrated one of my clients to Linode in London and, bar a couple of hiccups, everything's been great. The only nitpick with their site's performance now, after another round of optimisation and tuning (caching, image sprites, minifying, etc.), is that the DNS lookup is a bit slow and occasionally >250ms. When you're aiming for <1s pageloads that doesn't help you right at the start – the server doesn't even see the request until the client's been waiting for a quarter of a second.

Sample data:

Code:
# dig +noall +stats @ns1.linode.com www.example.com A
;; Query time: 115 msec

# dig +noall +stats @ns2.linode.com www.example.com A
;; Query time: 269 msec

# dig +noall +stats @ns3.linode.com www.example.com A
;; Query time: 87 msec

# dig +noall +stats @ns4.linode.com www.example.com A
;; Query time: 69 msec

# dig +noall +stats @ns5.linode.com www.example.com A
;; Query time: 1 msec

(trimmed extraneous info for brevity)

These queries were all run from the London Linode (>75% of the site's visitors come from the UK, hence the choice of the London DC). Linode's DNS servers don't do anycast so I assume instead operate standard round-robin, so: 20% of the time UK visitors will wait for over 1/4 second just for the DNS lookup; 20% of the time they get lucky and hit ns5.linode.com so get a 1ms lookup. On average, they wait an average of 108.2ms for a lookup. This is a physics issue: the DNS servers are spread around the globe so depending on which one you get, you have to wait for the packets to travel to it and back, which can mean over the Atlantic to Newark or Atlanta, or all the way to Japan.

If you're aiming for <1s pageloads (1000ms) then having to wait an average of 100ms before your server even gets the client request doesn't particularly help, and if you shard your assets over subdomains then this'll happen for each subdomain. Anycast DNS solves this by serving DNS requests from the geographically-closest DNS server to the client, resulting in responses that are always fast because they come from the closest server. It's also beneficial to Linode's infrastructure as it helps distribute the lookups across the DNS server network.

Here's an example of anycast DNS performance with another of my domains that uses a different DNS provider:

Code:
# dig +noall +stats @ns0.dnsmadeeasy.com example.com A
;; Query time: 1 msec

# dig +noall +stats @ns1.dnsmadeeasy.com example.com A
;; Query time: 2 msec

# dig +noall +stats @ns2.dnsmadeeasy.com example.com A
;; Query time: 1 msec

# dig +noall +stats @ns3.dnsmadeeasy.com example.com A
;; Query time: 1 msec

# dig +noall +stats @ns4.dnsmadeeasy.com example.com A
;; Query time: 1 msec

(queries are all run from the same machine as above)

So the average response time for a DNS lookup is 1.2ms. That's a lot better!

So… any chance of anycast DNS directly from Linode? :)


Top
   
PostPosted: Sat Mar 08, 2014 9:13 am 
Offline
Senior Member
User avatar

Joined: Tue Apr 13, 2004 6:54 pm
Posts: 833
DNS lookups only impact the first query; after that the client (or, at the very least, the client's nameserver) will have cached the information and linode's DNS servers aren't hit at all.

Given the chain of lookups a client nameserver needs to do to even find the nameservers for your domain for that first query, I'm not sure of the benefits of anycast DNS in terms of overall site performance.

_________________
Rgds
Stephen
(Linux user since kernel version 0.11)


Top
   
PostPosted: Sun Mar 09, 2014 12:11 pm 
Offline
Junior Member
User avatar

Joined: Tue Dec 27, 2005 1:33 am
Posts: 43
Location: USA
Quote:
Given the chain of lookups a client nameserver needs to do to even find the nameservers for your domain for that first query, I'm not sure of the benefits of anycast DNS in terms of overall site performance.

The root name servers and the major TLD name servers are all anycast so they are very fast. Anycast DNS is a widely accepted technique for reducing site latency. It may only be on the first hit, but that can make a difference to users clicking through from search results (such users have been shown by studies to be very, very impatient :wink:)

I wouldn't hold your breath for anycast DNS from Linode though, since it takes a lot of infrastructure: you have to set aside an entire /24 just for your DNS servers that you have to announce from multiple places around the Internet (and last I checked Linode wasn't even announcing its own routes). Hurricane Electric has a free DNS service that's anycast, and Amazon Route 53 (also anycast) can work out to be pretty cheap.


Top
   
PostPosted: Mon Mar 10, 2014 12:53 pm 
Offline
Senior Member

Joined: Thu Feb 20, 2014 5:06 pm
Posts: 58
AGWA wrote:
Amazon Route 53 (also anycast) can work out to be pretty cheap.


This is what I use. It's very cheap (~$5/month for a moderately-popular website) and has a slick API. I just did a server migration and was able to easily script all the DNS changes using cli53 (https://github.com/barnybug/cli53).


Top
   
PostPosted: Wed Mar 12, 2014 11:28 am 
Offline
Newbie

Joined: Mon Feb 27, 2012 10:43 pm
Posts: 4
AGWA wrote:
I wouldn't hold your breath for anycast DNS from Linode though, since it takes a lot of infrastructure: you have to set aside an entire /24 just for your DNS servers that you have to announce from multiple places around the Internet (and last I checked Linode wasn't even announcing its own routes). Hurricane Electric has a free DNS service that's anycast, and Amazon Route 53 (also anycast) can work out to be pretty cheap.


Ah, thanks for the info, I didn't realise Linode wasn't announcing its own routes. Suspected there may be significant infrastructure required to get anycast up and running, and I'm sure the Linode staff are busy enough already! I'd just like it as an option as it'll potentially shave up to 1/4 second+ off pageloads – selfish, I know :)

@sweh: yeah, I know how it works ;) Hence why I'm asking for anycast. As AGWA points out, the benefits are widely accepted. Look at the numbers in my post: if a visitor hits your site and the visitor's ISP's local DNS resolver hasn't cached your site's DNS or the TTL has expired (setting TTL values is a fine balance), it gets looked up again. That introduces a worst-case ~270ms delay just for the DNS lookup, and that's without taking into account any other sources of latency between the client and their ISP (on 3G mobile it's ~100ms per request). With anycast DNS, as per my example, the lookup's always ~1ms instead, so your site appears 270ms faster. That's over quarter of a second before the client HTTP request even hits your server, never mind how fast your backend appserver generates content or how quickly the frontend webserver responds. And if you spread your assets over domains, for example with a single media.example.com subdomain, which is known as domain sharding and is still useful for the moment (until SPDY/HTTP2.0 becomes popular), there's a possible extra worst-case ~270ms delay for looking that up, too. So your client's just waited over half a second for the DNS lookups alone. Are you sure it's not beneficial to improve that?

To quote Luke Wroblewski (author of the excellent Mobile First book):
Quote:
There’s study after study done by companies like AOL, Yahoo, Google, Microsoft that show 100 ms delays in loading web pages on a desktop, where generally networks are much less spotty than they are on mobile, can cost them significant amounts of revenue, can degrade user engagement, can result in less overall traffic, you name it. There are multiple compilations of these kind of studies. In fact Google even did one where they dropped performance on search for people and then they brought it back. And even three weeks after they brought back performance to the level they had had it, they saw people engaging less with the product. So performance has long term residual effects too.
– http://www.forbes.com/sites/anthonykosner/2012/01/30/the-qofc-interview-luke-wroblewski-author-of-mobile-first/


I use DNSMadeEasy for my own personal stuff and it's good (consistently fast, decent web admin panel, reasonably priced). Have heard good things about Dyn, too (and Fastly recommend them). But for my clients hosted on Linode it'd be really good to have everything under one roof. Trying to explain how clients can benefit from a separate provider for DNS to give them faster pageloads is a fiddly sell – it's tricky enough convincing them how much page performance matters, even when there's plenty of evidence – whereas if Linode offered anycast DNS it'd be relatively easy to convince them to just pay an extra charge to get it, and they also wouldn't have to go through each of their domains in their registrar's panel to change the nameservers, which is another point of friction.

But anyway, it was worth asking. Thanks for the comments!


Top
   
PostPosted: Mon Jul 07, 2014 6:34 pm 
Offline
Senior Newbie

Joined: Sat Jul 05, 2014 1:48 pm
Posts: 12
Location: United Kingdom
I too would anycast DNS offered by Linode. In the meantime however could you not set ns5 as your first nameserver?


Top
   
PostPosted: Mon Jul 07, 2014 6:54 pm 
Offline
Newbie

Joined: Mon Feb 27, 2012 10:43 pm
Posts: 4
kcaj wrote:
I too would anycast DNS offered by Linode. In the meantime however could you not set ns5 as your first nameserver?


'First' nameserver doesn't really mean anything, unfortunately: when you specify multiple nameservers they are looked up 'round robin' so the client query gets a random server each time.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group