What is DNS?

What is DNS and how does it work?

The DNS is the reason why the Internet is even possible. It is the backbone. It is the one that facilitates the connection between hostnames, services, servers, IP addresses, and more. The DNS is a complicated, a bit old system that we use hundreds or even thousands of times a day.  

What is DNS?

DNS means domain name system. It is a hierarchy directory, where hostnames (domains) match IP addresses (numbers). It is the so much needed translator between us, the humans and the machines – servers.  We use easy to remember names that finish with TLDs (top-level domains like .com). Computers, on the other hand, work with IP addresses (like 130.211.0.0). 

DNS is used for:

Now the DNS is used for many purposes, including: 

  • Resolution of domain names
  • Routing services
  • Routing messages to mail servers
  • Verifying servers, emails, or services
  • VPN
  • Load balancer
  • and more

DNS elements

  • DNS record. The DNS records are small text files that serve a specific purpose. The A record, for example, connects domain names and IP addresses. There are plenty of DNS types.
  • DNS query. Each query searches for a DNS record. The query starts from a device and hops from a DNS server to another until one can resolve it. 
  • DNS authoritative server. This is the primary server that has the zone file. It could be further away from the users, but it will have the most up to date data. 
  • DNS recursive server. This one is kind of a middle man. It has a cache memory where it can save DNS records. The recursive server will save the information from the moment a DNS query gets successfully answered and passes through it until the moment the DNS record gets too old (depends on the TTL value). Such a server searches for the DNS records if it does not have it.  

How does it work?

When a person wants to access a site, he or she does the following. Open their browser and type a domain name like Google.com. This is a request for an A or AAAA record that can resolve this host in text format Google.com to an IP address (IPv4 like 130.211.0.0 or IPv6 like 2001:4860:4860:8888 for the AAAA). If the device of that person doesn’t have the record in its cache, it needs to find a nameserver with the answer to its DNS query.  

The query will hop to the nameservers of the ISP (the internet providers). There are recursive DNS servers that might have the answer in their memory. If they have it, they return it. If no, the query will go on searching for an authoritative nameserver, which definitely knows the answer to the DNS query. 

To find the authoritative server for the particular domain, first, it will pass through the root servers and then the TLD nameservers. The TLD nameservers will redirect to the right authoritative nameserver. 

That server will provide the A or the AAAA record, and the record will stay saved in the cache memory of the recursive servers, as long as the TTL value says.   

Can I use a free DNS service? 

Yes! There are free DNS service providers, and you can start learning Domain Name System with them. For basic needs, they can provide enough number of queries per month. If you need to load balance e-commerce, you will need to check paid DNS service with Anycast for managing the traffic.

Conclusion

DNS is more than an essential part of the Internet. You are planning to use a server for your application, have a large e-commerce site, provide services to many users, you will need to use DNS. It will provide smooth work and traffic balancing.

Leave a comment

Your email address will not be published. Required fields are marked *