Friday, 22 March 2019

What is DNS Cache?

DNS cache or DNS resolver cache is a temporary database regarding the domains that we have visited recently. This cache contains all the recent visits and attempted visits to websites and other internet domains. 

All this is maintained by a computer's operating system in order to fix an internet connectivity issue. In simple words, all this is done so you don’t need to memorize the IP addresses of each website. 

The Purpose of a DNS Cache

On Internet, all network devices communicate with each other using an IP address. So if I talk about a website, then it has an IP… it is loaded on an IP. But as we can’t memorize each and everyone’s phone numbers… we can’t memorize the IP addresses of each and every website.

To solve this issue… DNS concept came and hence DNS cache.  

DNS keep all indexes. It has the website name and their IP.  So when you type a website name then DNS looks for the IP and fulfil your request. 

Here’s is a very simple example:
  1. You type > DNS will check the IP (here is the IP - 
  2. Now this will be called and as per your request the page will be displayed. 

So this is the concept of DNS, which keeps the record of every domain and upon call it calls the specific IP to fulfil the request.


What is the use of DNS Cache?

Up to here you know what DNS is, but you don’t know what the purpose of DNS cache is. Well guys… when you request a website… its IP will be checked and thereafter the request will be fulfilled.

Like: > DNS > > page will be displayed.

So here if you request the same website or page again then it will take again the same time or may be more. Again the DNS lookup process will be followed… IP will be checked and the requested page will be displayed.

It's a waste of time because we have to go through DNS lookup process for the same website again and again. 

What if we avoid DNS lookup process for the same website request?

Yes, it is possible using the DNS cache concept. Using DNS cache, we can request the IP address ( directly and fulfil the request in quick way. 

Keeping a local copy of a DNS lookup allows your OS or browser to quickly retrieve it and thus a website’s URL can be resolved to its corresponding IP much more efficiently.

Here are some benefits of DNS cache…

  1. Avoid DNS lookup process for same Website.
  2. IP locating time gets reduced.
  3. Also, it saves a lot of bandwidth.

The DNS caching has one well known disadvantage. This cache concept is used for redirecting devices to malicious websites. Sometimes this cache gets poisoned when unauthorized domain names or IP addresses are inserted into it. This is called DNS Cache Poisoning and to solve it we flush DNS from system.

So this is how the DNS cache works. If you have any questions, then don’t forget to share it on social sites.

No comments:

Post a Comment