WebPagetest Forums
Speed up DNS resolution - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: Web Performance (/forumdisplay.php?fid=3)
+--- Forum: Optimization Discussions (/forumdisplay.php?fid=5)
+--- Thread: Speed up DNS resolution (/showthread.php?tid=5472)

Pages: 1 2


Speed up DNS resolution - allogarage - 10-19-2011 06:43 AM

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?


RE: Speed up DNS resolution - pmeenan - 10-19-2011 06:54 AM

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).


RE: Speed up DNS resolution - allogarage - 10-19-2011 05:33 PM

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 ?


RE: Speed up DNS resolution - pmeenan - 10-19-2011 10:26 PM

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.


RE: Speed up DNS resolution - allogarage - 10-19-2011 10:44 PM

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)?


RE: Speed up DNS resolution - pmeenan - 10-19-2011 10:57 PM

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).


RE: Speed up DNS resolution - allogarage - 10-20-2011 07:59 PM

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


RE: Speed up DNS resolution - pmeenan - 10-20-2011 10:40 PM

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.


RE: Speed up DNS resolution - allogarage - 10-21-2011 06:18 PM

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


RE: Speed up DNS resolution - pmeenan - 10-21-2011 10:32 PM

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.