Route 53 & DNS

Published on
Reading time
2 min read

Overview

When a client initiates a request to a public EC2 instance, several steps occur behind the scenes to resolve the domain name into an IP address. The client will issue a DNS query to the local DNS resolver which will then query the Root DNS servers to find out where the top-level domain (TLD) name servers are for that domain. They return the location of the authoritative name servers for the domain. Finally, the authoritative name servers will send the resolved IP to the local DNS resolver to be returned to the client. All of this happens at the beginning of the request.

In AWS, Route 53 can act as an authoritative DNS Service, the authoritative name servers that ultimately resolve the domain to an IP address. It will send back the IP to the client as described previously which allows the request to reach the destination such as an EC2 instance, CloudFront, or an Elastic Load Balancer. Additionally, Route 53 provides domain registration and management services and can also be used to configure routing rules based on lowest latency or geolocation.

Flowchart of DNS Resolution

[Client] -- URL Request --> [Local DNS Resolver]
  |                                    |
  |                                    v
  |                          [Root DNS Servers]
  |                                    |
  |                                    v
  |                          [TLD Name Servers]
  |                                    |
  |                                    v
  |                    [Route 53 - Authoritative DNS Service]
  |                                    |
  |                                    v
  |                   [Local DNS Resolver] -- IP Address --> [Client]
  |
  v
[Client] -- HTTP GET Request --> [EC2 Instance]
  |
  v
[EC2 Instance] -- Response --> [Client]