DNS stands for Domain Name System and is responsible for mapping your server’s IP to the domain name. For example, 80.0.1.2 → www.google.com.
Some DNS servers allow you to route traffic through various methods:
- Weighted Round Robinthat prevents traffic from going to servers that are under maintenance, you do A/B testing or balance between different clusters
- Latency based
- Geolocation-based
How does it work
Transclude of DNS.excalidraw
Types of records
- NX record (Name Server) - Specifies the DNS servers for your domain/subdomains
- MX record (mail exchange) - Specifies the mail servers for accepting messages
- A - Stands for Address Record. The purpose of it is to map a domain name to the IPv4 address (192.0.2.1). It helps to point a domain (or subdomain) to the server’s IP address.
- AAAA
- CNAME stands for Canonical Name Record. It maps a domain name to another domain name (an alias). It is commonly used to allow domain to point to another domain instead of an IP address. It helps to simplify DNS management by pointing to another domain
www.example.com IN CNAME example.com
Examples of services
Cloudflare and Route53 provide managed DNS services.