Route 53

Recently I had a chance to work on resources including Route53. Since I had no understanding on Route53 before, I would like to summarize some information about Route53 that I learned during my experience.

What is Route53

Route53 is DNS (Domain Name Service) provided by AWS. This is equivalent to Google Cloud DNS (GCP) and Azure DNS (Azure).

Why is it named Route53? This refers to port 53 where DNS server requests are handled.

Route53 provides mainly three functionality:

  • Domain Registration
    With Route53, you can register a domain. AWS will let you know what domains you can use and the expected pricing of the domain. You can also register the domain that you have bought outside of AWS. You can created a hosted zone and input domain you have bought, and choose private/public hosting (If private, it will only route traffic inside Amazon VPC). Using a name server that was created by hosted zone (four of them will be automatically created, and SOA will be also created), if you register nameserver in your own exterior hosting service, you can now use your own domain name.

  • DNS Routing
    dns_routing
    Here is the process of how Route53 routes traffic to my domain.

  1. User types and enters www.example.com in the address bar.
  2. The request will be routed to the DNS resolver.
  3. The DNS resolver will forward the request to the DNS root name server. The DNS root name server will guide DNS resolver to visit the name server for .com TLD.
  4. The DNS root name server will forward the request to one of the TLD name servers. The name server of .com will respond with names of the four Route53 name servers. DNS resolver will cache this Route53 name servers.
  5. The DNS resolver forwards the request to Amazon Route53 name server.
  6. The Route53 name server will look into the hosted zone of example.com, and get the example.com record. The Route53 name server will return the associated value, including the IP address. The DNS resolver also caches this IP address.
  7. The DNS resolver returns the IP address to the web browser.
  8. The web browser will send a request to the IP address that it got from DNS resolver.
  9. The web server at the IP address will return the web page.

During the process, I mentioned that the Route53 name server will get the record. Each record contains information about how you want to route traffic for your domain, including name (all name must end with hosted zone), type and value. Let us look into some types of the record.

Types of the record

  • A/AAAA record type
    A/AAAA record type is used to route traffic to a resource using IPv4/IPv6 address value. Domain name can be mapped to multiple ip addresses (and vice versa). A/AAAA record is faster than CNAME record type.
  • CAA record type
    Record that species allowed certificate authorities (CAs)
  • CNAME record type
    CNAME record maps the name of the current record (EX: acme.example.com) to another domain (EX: example.com, example.net) or subdomain (EX: acme.example.com, zenith.exmaple.org). CNAME record type is suitable for cases where IP address frequently changes. However, it can be slower than A record since DNS request should be done multiple times compared to A record.
  • MX record type
    MX record illustrates the name of the mail servers.
  • NS record type
    Name server of the hosted zone. This is automatically created when you create the hosted zone.
  • PTR record type
    PTR record maps an IP address to the corresponding domain name. This can be understood as an opposite of A record type.
  • SOA record type
    A start of authority (SOA) provides information about both domain and corresponding hosted zone. This is automatically created when you create the hosted zone. Each domain will contain one SOA record, and domain without SOA will not work properly in name server. SOA contains host name, administrator's mail address, refresh interval, retry interval, serial and etc.
  • SRV record type
    SRV record type contains four space-sperated values - priority, weight, port and the domain name.
  • TXT record type
    TXT record type is where you can enter the text. This is useful to leave a memo.
  • Health Checking
    You can easily create a health check with Route53 by setting the IP address/domain name, protocol, request interval, failure threshold and notification method. You can monitor AWS CloudWatch to see if your web servers/ mail servers are working properly.

Route53 is suitable when you are relying on AWS since it can easily connect with AWS resources like EC2 and S3. For next article (possibly), I will illustrate how we can use Route53 with the combination of AWS AWS Load Balancer and External DNS.

Reference

https://digitalcloud.training/amazon-route-53/
https://inpa.tistory.com/entry/AWS-%F0%9F%93%9A-Route-53-%EA%B0%9C%EB%85%90-%EC%9B%90%EB%A6%AC-%EC%82%AC%EC%9A%A9-%EC%84%B8%ED%8C%85-%F0%9F%92%AF-%EC%A0%95%EB%A6%AC
https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/Welcome.html
https://kanoos-stu.tistory.com/43
https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html