Speed up DNS resolution

Hello,

I search for a long time a way to improve DNS lookup time. Recently, I found that glue record can speed up things and avoid multiple queries. Now I try with primary NS server with my www url and glue record. Is it useful? I think instead of querying NS server, system will use IP adress directly?

Is there some other tip in order to improve DNS lookup time?

Your best bets are to:

  • Use a DNS service that uses Anycast for their servers
  • Make sure the DNS provider has servers distributed globally (and that perform well)
  • Try to avoid long CNAME chains (try to avoid them at all if possible)
  • Use a long Time To Live (TTL) on your records so they can be cached by the ISPs and users

Glue records are really meant just for the name server IP’s. Using them for normal records may provide faster performance in some cases but it’s really not the intended use and they are quite a bear to change (and propagating the change can take days).

Ok thanks for all the tips. I already know the last two ones. I will put longer TTL after tests.
For anycast DNS, it’s not plan. Is it useful to make regular lookup on main servers in my country, in order to put records in cache ?

The cache would only get filled for the ISP that you are using to do the lookups so it’s not really worth the effort.

And if I do this for (for example in France : Orange, Free, Bouygues Telecom, SFR and perhaps also google public dns and open dns?) in a cron every x hours (depending on TTL)?

Assuming you have ANY users visiting your site within the TTL from those domains it really isn’t worth it. If your end users are all in France then just make sure the authoratative servers for your domain are also in France with good connectivity and that the records have a long TTL and that will make the DNS times as fast as if they were always cached at the ISP (the recursive times from the ISP to your servers should be in single-digit ms).

There are 10 000 unique visitors a day, 95% from France.

Assuming you have a TTL of at least a few hours, the natural visitor traffic should keep the records fresh in the ISP caches. You wouldn’t be able to predict when it got stale in the cache to force a refresh anyway.

For TTL value, I read from MT that 12 hours is a good value. Do you agree or I may put a longer value?

As with just about everything else - “It depends”. How long can you afford for the site to be pointing to that IP address if you need to change it for some reason?

If the hardware completely fails or something goes catastrophically wrong at your hosting provider, can you move the same IP address somewhere else to get the service back up quickly or will it be down for 12+ hours? If you need to move the site for a non-emergency you can plan that and it’s not a problem, it’s the unexpected emergencies that usually drive lower TTL’s.

0162compare auto insurance quotes4120
3141compare insurance quotes5281
3192compare car insurance quotes5613

Patrick, you have chosen a TTL of 1 day:
http://www.nabber.org/projects/dnscheck/?domain=www.webpagetest.org

So that is the time that is best from your point of view for a website like yours?
http://www.alexa.com/siteinfo/webpagetest.org

I had it at 3 hours and bumped it up to one day because of a surge in traffic with the Google Page Speed Service launch and I wanted to keep my DNS queries well under my limit for my DNS Made Easy account :slight_smile:

The server is on a static IP and I can easily move that IP to another physical box if there are any production problems. If my hosting site goes down it will take me a while to bring it up somewhere else so 1 day is reasonable for my specific needs.

Thank you for the explaination, Patrick.

This is an interesting DNS help for me. I’ve will try to apply this to some of my domain names.

From mentioned about I think that most effective is focus on 2nd option. My server is in Praque, my domain registrar (eNOM) is in US. I was not able to find if they use some kind of distributed DNS (SE Asia region has too long DNS look up).

I found out that Cloudflare has free globally distributed DNS network.

I’d recommend first installing a RUM monitoring solution like Soasta’s mPulse that will report the DNS times that your users are seeing. Then if you experiment with a change you can see what the actual impact was (if any). If you do experiment, make sure to give it several days for the various DNS caches to update (the authoratative DNS provider switch sometimes takes a few days to propagate).