Do Nameservers affect website speed?

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

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.

I think it must have been something else I did, it was a clear drop in speed and maintained. Weird. I will do the experiment again on another site sometime :). Thanks.

Yes before levels of caching - browser, OS, router, dns provider, etc. You could be benefiting from a namseserver closer to you (lower latency) and/or potentially quicker DNS responses. Unless if you see speed improvements with every page load which would rule out (cache) dns.

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'd like to resurface this post because I just have an interesting observation…

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.

If your server is configured to do DNS lookups for each request and isn't caching results locally then, yes, DNS speed can impact performance. It'd depend on your resolv.conf settings. There's a reason why web servers typically do not do DNS lookups on each request :-)

Most clients will cache DNS lookups and only perform it on first connection. DNS speed, there, isn't necessarily so much of an issue.

Absolutely Correct @ sweh

@aryan554

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 effects web load speeds in much the same way as foundations affect high rise buildings.

DNS is critical, never neglect it.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct