Domain Name System | Primer for Route53
What’s the magic soup which gives us the ability to type medium.com and internet connects us to the servers of the medium. In simple terms what translates a string name to IP address of the servers? DNS. Domain Name System. In simple term, DNS is a lookup system which takes a set of strings separated by . (medium.com) and returns IP address of the server.
example.com(domain name) : xxx.xxx.xxx.xxx(IP)
But an entry in DNS system seldom has only this. It contains other information as well. Actually, it maps a domain name to a resource on the internet. Represented as a resource record. Below is an example of one such record.
example.com(domain name) : A(record type) : xx.xxx.xx.xx(record data here IP)
www.example.com(domain name): Alias(record type) : example.com(record data here a domain name)
The type value can be alias, CNAME or A record or AA record. So, DNS is a lookup system which takes a set of strings separated by . and returns a resource record.
With millions of websites, the Internet needs a scalable DNS. So it has been categorized in 300+ top level domain servers. We have root servers, gTLD (like .com, .net) servers, org servers (.org domain), sTLD (specials like .air) and ccTLD(like .in, .uk). Finally, we have Name servers for specific domains. Each server only holds a certain part of the domain name space. There are various companies or organizations that manage these servers.
AWS Route53 which is way more than just a DNS. In its console, you will not find the option to create a resource record. In turn, you will find Recordset.
It is a set of records clubbed together for simplicity. Record is a recordset with a single entry.
Let us see how we arrive at a resource record. We keep on looking for an authoritative server for a name. Once we arrive at the server corresponding record is served. Let us take an example of finding “www.asrathore.co.in”. Here root server in response gives us the authoritative server(TLD server) for the .in domain. Next server give the authoritative server for .co.in and so on till it reaches at the “www.asrathore.co.in”. Which will return its A record(ip address).
This authoritative server stores the info in a zone file. This zone file records like A record, CNAME or Alias record or Authoritative name servers for a domain.