Route 53

Route-53 viblo.asia | DNS's FAQ | FAQs | Routing policy |

Overview

  • Can be used to manage both public and private domain.

  • user can access app using these domain name.

  • provice health check for resources -> route traffic away from unhealthy resouces.

  • Route53 responses to DNS queries.

Benefits

  • Performance

    • Low query latency for end-user

    • Low update latency for DNS record management

  • Scalable

    • Can handle large query volume.

  • Flexibility

    • Route policy

Record types

  • CNAME:

    • point host name to another hostname. ex: app.mydomain.com -> blabla.anything.com

    • ONLY FOR NON ROOT domain. ex: aka.sth.mydomain.com

  • Alias (A or AAAA)

    • free

    • point a host name to ONLY ONE AWS resource.

      • ex: app.mydomain.com -> blabla.amazonaws.com

    • work for both ROOT and NON-ROOT domain.

    • Always of type A or AAAA

      • A: IPv4

      • AAAA: IPv6

  • NS: Name Server for Hosted Zone

  • MX: mail exchange record

-CNAMEALIAS

Target group

point to the host

point to AWS resources

Target group value

DNS or Hostname

DNS

Response

return DNS/Hostname. Need to query Alias to know the IP

A or AAAA

$

Yes

No

TTL

Yes

No

Root domain

No

Yes

Features

Hosted Zone

  • Public: how traffic is routed in the internet.

  • Private: determine how traffic is routed within VPC

Weighted routing policy

  • Weighted: eg 5% traffic go to production environment.

    • Sum of total weighted % is not neccessary 100%

    • DNS record need to be same type, same domain or subdomain.

    • If you set weight = 0 for all records, the traffic will be balanced for all.

  • Latency: evaluate the latency between your users & AWS regions, to minimize the latency.

  • Use cases:

    • Load balancing

    • Testing new software version.

Latency Routing

  • Letting Route 53 serve user requests from the AWS Region that provides the lowest latency.

  • Use case: improve performance / reduce latency.

Geolocation Routing

Lets you choose the instances that will serve traffic based on the location of your users

For example: US -> instance-1, France -> instance-2

Geoproximity Routing

  • Lets Amazon Route 53 route traffic to your resources based on the geographic location.

  • You can also optionally choose to route more traffic or less to a given resource by specifying a value, known as a bias. A bias expands or shrinks the size of the geographic region from which traffic is routed to a resource.

Health check

  • HTTP Health check are only for PUBLIC resouces.

    • If you want to check the health of PRIVATE resources, then use CloudWatch Metric. This means healthcheck just monitor the Metric, not that PRIVATE resources 😂

  • Health check -> Automated DNS Failover.

  • Route53 can monitor (the health) of the end-point

  • Support methods: HTTP, HTTPS, TCP

  • PASS only when the response code is 2xx or 3xx.

  • Health check can work with other healthchecks.

Trivia

  • TTL is required setting value for all record types, except A

  • Check TTL by nslookup -q=SOA google.com or dig google.com SOA

  • Health check in Route53 are only for PUBLIC resources. 😂

  • Each Amazon Route 53 account is limited to a maximum of 500 hosted zones and 10,000 resource record sets per hosted zone.

Concepts

  • DNS (Domain Name Service): map domain name to IP addresses, or resources (EC2, ELB, S3 buckets, CloudFront...). For example:

    172.217.18.36  => www.google.com
  • Domain Registra: Godday, お名前.com, Route53...

  • Name server: server that converts name -> ip

  • Top Level Domain: .com, .vn

  • Second Level Domain: google.com, aws.com

  • TTL (Time to live): the client will cache the result (return from DNS server) for TTL minutes. To save cost, set the TTL value higher for lesser requests to DNS server.

Last updated