Domain Name System (DNS)
- The Internet Protocol (IP) address of your website is like your phone number. DNS is like the phonebook.
- Domain Name System is a globally-distributed service that is foundational to the way people use the Internet.
- DNS uses a hierarchical name structure, and different levels in the hierarchy are each separated with a dot
- Amazon Route 53 is an authoritative DNS system.
- It answers DNS queries, translating domain names into IP addresses
- Top-Level Domains (TLDs)
- Last part of the domain name separated by a dot
- Ex: .com, .in, .gov, .org
- Domain Names
- A domain name is the human-friendly name that used to associating with an Internet resource.
- Ex: google.com
- IP Addresses
- An IP address is a network addressable location.
- Each IP address must be unique within its network.
- IPv4 32 bit, IPv6 128 bits
- Within a domain, the domain owner can define individual hosts, which refer to separate computers or services accessible through a domain.
- Most domain owners make their web servers accessible through the base domain (example.com)
- DNS works in a hierarchal manner and allows a large domain to be partitioned or extended into multiple subdomains.
- TLDs can have many subdomains under them. Ex: amazon.com, google.com
- Each SLD can have subdomains located under it. Ex: api.example.com, app.othersite.com
- Fully Qualified Domain Name (FQDN)
- A Fully Qualified Domain Name (FQDN), also referred to as an absolute domain name, specifies a domain’s location in relation to the absolute root of the DNS.
- Name Servers
- A name server is a computer designated to translate domain names into IP addresses. These servers do most of the work in the DNS.
- Name servers can be authoritative, meaning that they give answers to queries about domains under their control.
- Zone Files
- A zone file is a simple text file that contains the mappings between domain names and IP addresses.
- This is how a DNS server finally identifies which IP address should be contacted when a user requests a certain domain name.
Domain Name System (DNS) Resolution
- When you type a domain name into your browser, your computer first checks its host file to see if it has that domain name stored locally.
- If it does not, it will check its DNS cache to see if you have visited the site before. If it still does not have a record of that domain name, it will contact a DNS server to resolve the domain name.
- DNS is a hierarchical system. At the top of this system are root servers. When a request comes in for a domain that a lower-level name server cannot resolve, a query is made to the root server for the domain.
- In order to handle the incredible volume of resolutions that happen every day, these root servers are mirrored and replicated.
- They will, however, be able to direct the requester to the name servers that handle the specifically-requested TLD.
DNS Record Types
Each zone file contains records. A record is a single mapping between a resource and a name.
- Start of Authority (SOA) Record
- A Start of Authority (SOA) record is mandatory in all zone files, and it identifies the base DNS information about the domain.
- Each zone contains a single SOA record
- A and AAAA
- Both types of address records map a host to an IP address. The A record is used to map a host to an IPv4 IP address, while AAAA records are used to map a host to an IPv6 address.
- Canonical Name (CNAME)
- A Canonical Name (CNAME) record is a type of resource record in the DNS that defines an alias for the CNAME for your server
- Name Server (NS)
- Name Server (NS) records are used by TLD servers to direct traffic to the DNS server that contains the authoritative DNS records.
What is Amazon Route 53
- Amazon Route 53 is a highly available and scalable Domain Name System (DNS) web service.
- Its functionalities include
- Domain registration
- DNS routing
- Health checking
- Register domain names
- You need a website name, such as mycompany.com.
- Route 53 provides a option register a domain name for your website or web application.
- DNS Routing
- Route the internet traffic to the resources for your domain
- When a user opens a web browser and enters your domain name in the address bar, Route 53 helps connect the browser with your website or web application.
- Health checking
- Route 53 sends automated requests over the internet to your resources, to verify that it’s reachable, available, and functional.
- You also can choose to receive notifications when a resource becomes unavailable or unhealthy.
- You can search and register a domain name in AWS Route 53.
- If you already registered a domain name with another registrar, you have the option to transfer the domain registration to Amazon Route 53.
- Amazon Route 53 supports domain registration for a wide variety of generic TLDs
Domain Name System (DNS) Service
- Amazon Route 53 is an authoritative DNS service that routes Internet traffic to your website by translating friendly domain names into IP addresses.
- If you register a new domain name, Amazon Route 53 will be automatically configured as the DNS service for the domain, and a hosted zone will be created for your domain.
- You add resource record sets to the hosted zone, which define how you want Amazon Route 53 to respond to DNS queries for your domain
- If you’re using Amazon CloudFront, Amazon Simple Storage Service or Elastic Load Balancing, you can configure Amazon Route 53 to route Internet traffic to those resources.
- A hosted zone is a collection of resource record sets hosted by Amazon Route 53.
- A hosted zone represents resource record sets that are managed together under a single domain name.
- Each hosted zone has its own metadata and configuration information.
- There are two types of hosted zones: private and public.
- A private hosted zone is a container that holds information about how you want to route traffic for a domain and its subdomains within one or more Amazon VPCs
- A public hosted zone is a container that holds information about how you want to route traffic on the Internet
Route 53 Routing Policy
- When you create a record in Route 53, you have to choose a routing policy, which determines how Amazon Route 53 responds to DNS queries. As of now, following routing policy are supported.
- Simple routing policy
- Failover routing policy
- Weighted routing policy
- Latency routing policy
- Geolocation routing policy
- Geoproximity routing policy
- Multivalue answer routing policy
- Simple Routing Policy
- Use for a single resource that performs a given function for your domain, for example, a web server that serves content for the example.com website.
- Weighted Routing Policy
- Route traffic to multiple resources in proportions that you specify. You have to specify the weight of traffic to split and rout to different endpoints
- Latency Routing Policy
- When you have resources in multiple AWS Regions and you want to route traffic to the region that provides the best latency.
- Failover Routing Policy
- When you want to configure active-passive failover.
- Create Active/Passive set-up such that one of the site is active and serve all the traffic. Other site remains on the standby. Route 53 monitors the health of the primary site using the health check.
- Geolocation Routing Policy
- When you want to route traffic based on the location of your users.
- Geoproximity Routing Policy
- When you want to route traffic based on the location of your resources and, optionally, shift traffic from resources in one location to resources in another.
- Geoproximity routing lets Amazon Route 53 route traffic to your resources based on the geographic location of your users and your resources.
- You can also optionally choose to route more traffic or less to a given resource by specifying a value, known as a bias.
- Multivalue Answer Routing Policy
- When you want Route 53 to respond to DNS queries with up to eight healthy records selected at random.
- Multivalue answer routing lets you configure Amazon Route 53 to return multiple values, such as IP addresses for your web servers, in response to DNS queries
- You can specify multiple values for almost any record, but multivalue answer routing also lets you check the health of each resource, so Route 53 returns only values for healthy resources.