Running a shared local DNS cache and unclear docs mistaken as a bug.

submited by
Style Pass
2022-06-23 15:30:06

If you have ever worked on website performance you will be familiar with the term “time to first byte” (TTFB). The laymens explaination of TTFB would be from the moment you have a website in your URL bar and hit enter, how long does it take for the first byte of content to be received.

This can be deceptive as this does not mean that the rest of the page loaded quickly, you could have a great TTFB speed but then load 50 10MB images into the page which will greatly increase the time until your browser can paint content.

A large portion of the time incurred while connecting to a website is during DNS resolution. The other is establishing a TLS connection. We can speed up DNS resolution by running our own recursive DNS server on our LAN network while also heavily caching responses.

We are going to setup Unbound as a recursive caching DNS server that runs on your local network which will allow all of your devices connected to the same network to get answer to DNS queries. There will be a number of devices querying this DNS server which will build up the cache and keep it hot and in turn greatly decrease the time it takes to answer and query.

Leave a Comment