article
DNS (Domain Name System)
DNS, Domain Name System is a hierarchical system composed of multi-layer DNS severs in order to translate the human readable domain names into IP addresses that computers actually can understand. DNS is analogous to phonebook of the internet as you can get the IP addresses of what you want to search and it works layer by layer, caching is processed at every layer of the DNS.
The flow of how DNS works can be summarised as follow. When you request a domain name, your browser first checks its DNS cache to see if the IP address of the domain has already been translated. If not found, your OS has its own DNS cache. If still not found, the request is sent to the the DNS sever called Recursive Resolver, usually provided by your ISP or something like CloudFlare DNS or Google Public DNS. Then, recursive resolver queries a DNS root server which in turns return the name server of TLD (Top Level DNS) server. It queries the TLD server which responses the name server of the Authoritative DNS Server. Finally, it returns the IP address of the domain.
OS level layer and Resolver has their own DNS cache and the system checks first in the cache and only send request up to the upper layer if specific domain is not found in the cache in order to reduce repeated queries and improve performance. DNS cache system uses TTL (Time To Live) value in seconds which tell the cache duration and when to refresh of the IP address of specific domain.