Do Nameservers affect website speed?
I have been doing some speed improvements on my website. Usual things like turning cache on, moving sites to one of our Linode servers, then there are some server improvements to make… each step my monitoring system clearly records a faster response. I got it down to 200ms now which is great.
BUT when I changed nameservers to Linode's from my own, there was another speed improvement. I am sure it related to the nameserver change. I may be wrong, but looked like hence this question.
I thought nameservers are just the master record of DNS, so if I go to a domain my ISP knows the IP address and serves it and does not use the nameservers. If thats true then nameservers dont seem to have an effect on speed, and I may have confused the drop with something else.
Just wondered if anyone knew for sure, because if nameservers do affect speed then I'll be moving them all to Linode (or another good one)!
8 Replies
@amityweb:
I dont know if this is a silly question or not, I used to think so, until recently…
I have been doing some speed improvements on my website. Usual things like turning cache on, moving sites to one of our Linode servers, then there are some server improvements to make… each step my monitoring system clearly records a faster response. I got it down to 200ms now which is great.
BUT when I changed nameservers to Linode's from my own, there was another speed improvement. I am sure it related to the nameserver change. I may be wrong, but looked like hence this question.
I thought nameservers are just the master record of DNS, so if I go to a domain my ISP knows the IP address and serves it and does not use the nameservers. If thats true then nameservers dont seem to have an effect on speed, and I may have confused the drop with something else.
Just wondered if anyone knew for sure, because if nameservers do affect speed then I'll be moving them all to Linode (or another good one)!
On the client side you have (caching) resolver servers configured in the OS (in /etc/resolv.conf or similar depending on OS), often but not necessarily those servers are provided by the ISP (often autoconfigured via dhcp).
The client just passes all its DNS queries to these servers. These servers, however, do not have any inherent knowledge of the full DNS tree, only the root. Unless they happen to have the results cached they will proceed to traverse the DNS tree to find the requested records.
The results are then cached so that this server can immediately respond to subsequent queries for the same thing (until the cached values expire, based on the TTL of the records).
So yes, for a "first hit" from the group of machines using any particular caching server it will matter slightly.
You'll see the most improvement for every visitor with anycast dns providers such as cloudflare. The best combo is cloudflare for your sites and open dns on your router. Speeeed
I moved a customers Wordpress site to an old server of mine yesterday. Problem it was really slow. The server IS old, and I thought Wordpress uses a lot of server resources ("top" shows the account using as high as 50% CPU sometimes when just clicking on a page). I installed a Wordpress caching plugin and it sped it up some but still slow. I put it down to an old server.
Anyway, I use POintHQ for DNS management on some domains. AS soon as I changed to PointHQ for the domain in question, the site is now super fast… not just initial load, but every page. Every page was really slow even with WP cache plugin, but now every page is super fast.
It could be a coincidence that the server happens to have resources free this time, and before it didn't, but its quite a coincidence.
The previous DNS was using the Cpanel server itself where the website is hosted. So instead of using its own Cpanel server for the nameservers, its now PointHQ.
Could this really impact on the speed so much? If so my hunch is what if there is an issue using the CPanel server for DNS lookups, what if that part is slow.
Most clients will cache DNS lookups and only perform it on first connection. DNS speed, there, isn't necessarily so much of an issue.
Go take your spam elsewhere.
You don't even host on Linode - so it's all
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
DNS is critical, never neglect it.