Yesterday, I was doing some researching on a new Twitter app site I was making. Since I was going to be dealing with a heap of data, I needed to make sure the web server was optimized as much as it can. One of the way to optimize your web server (or even your Linux desktop), is to install “DNS Cache”.
DNS Cache basically caches your DNS queries so if you try to access the same domain name again later, it’s retrieved from the cache in less than 1ms instead of taking another 20 to 500ms. (This depends but usually, it takes anywhere between 20 to 500ms for a DNS fetch.)
Especially for servers that do a lot of aggregating, (like this site does about 8 RSS aggregates for other blogs in the network) installing DNS cache will save you a lot of time in your website loading faster. After I installed DNS cache on this site, the site loads about 0.10 seconds faster. You might not notice it but it’s still a lot of time you save.
If you want to learn how to do this, (and btw, it’s very simple as couple lines of code and editing couple files), check out the article on WebUpD8.org here.
Some notes on CentOS users:
You can do “yum install bind-utils” to get the dig program.
Also, if you are on the new servers, you might want to edit the “/etc/dhcp6.conf” file instead of the dhpclient.conf.