PolarSPARC |
AWS Route 53 - Quick Notes
Bhaskar S | 12/26/2023 |
AWS Route 53
AWS Route 53 is a highly available, scalable, and fully managed Domain Name System (or DNS for short) service that can handle domain registration, DNS routing, and health checking.
The following is the summary of the various features/capabilities of Route 53:
Only service in AWS that provides 100 percent availability SLA
Translates human-friendly Domain Names to target IP address(es)
When one registers a domain, it automatically creates a Zone File for the domain (also referred to as a Hosted Zone)
A Zone File contains all the DNS records which map the domain names to target values
A Hosted Zone costs $ 0.50 per month
Each DNS record contains of the following elements:
Domain (Ex: example.com) or Subdomain (Ex: quotes.example.com) Name
Record Type - A (for IPv4), AAAA (for IPv6), CNAME, Alias
Value (typically IP address)
Routing Policy - How to respond to DNS queries
Time-to-Live (TTL) - Amount of time the results of a DNS query can be cached
A DNS record of type A maps a domain name to an IPv4 address
A DNS record of type AAAA maps a domain name to an IPv6 address
A DNS record of type CNAME maps a domain name to another domain name (Ex: an ALB domain name alb.us-east-1.amazonaws.com to another domain name such as alb.example.com ), with the following constraints:
The target domain name MUST have an associated A or AAAA record
The source domain name CANNOT be a root domain such as example.com, but only for sub-level domain such as dev.example.com
A CNAME can point to any domain name hosted anywhere
There is a charge associated with CNAME queries
A DNS record of type Alias is a custom extension to the DNS functionality that allows one to route traffic to select AWS resources (Ex: CloudFront, API Gateway, ELB, Elastic Beanstalk, S3 static website) or another record in the Hosted Zone. It has the following features:
The TTL is automatically set and cannot be changed
The source domain name CAN be a domain such as example.com or a sub-level domain such as api.example.com
The source domain name CANNOT be an EC2 Instance
There is NO charges associated with Alias queries
Health Checks
Route 53 Health Checks monitor the health and performance of specified resources such as a load balancer, a web application, or other public resource.
The following is the summary of the various features/capabilities of Health Checks:
Can monitor the status of other health checks
Can monitor the status of an CloudWatch alarm
Has health checkers in locations around the world
Supports HTTP, HTTPS, and TCP
Routing Policies
When a DNS record is created, one chooses a Routing Policy, which determines how Route 53 responds to DNS queries.
The following is the summary of the various types of Routing Policies:
A Simple routing policy can be used for a single target resource associated with a domain name. It has the following features:
If Alias is enabled, one can only specify a single target value in the A record
If there are multiple target values in the A record, a random value is chosen by the client
Cannot have Health Checks
A Weighted routing policy can be used to route traffic to multiple resources in proportions as specified by the user. It has the following features:
Control the percentage of requests that are routed to each specific target
The DNS records for all targets must have the same name and type
Assign each target record a relative traffic proportion
A proportion value of zero means stop sending traffic to that specific target
Can be associated with Health Checks
Useful for load balancing between regions, testing new app version, etc
A Latency routing policy can be used when one has resources in multiple Regions and want to route traffic to the Region that provides the lowest latency. It has the following features:
The latency is based on the traffic between users and the Regions
Useful for customers whose main priority is low latency
Can be associated with Health Checks
A Failover routing policy can be used when one wants to configure active-passive failover strategy. It has the following features:
Health Check is MANDATORY
There can be only a Primary and a Secondary resource
Can have a primary resource in one Region and if the Health Check reports unhealthy, switch to a secondary resource in another Region
A Geolocation routing policy can be used when one wants to route traffic based on the location of the users. It has the following features:
Can specify the location based on a continent, a country or a US state
There MUST be a default record if there is no location match
Can be associated with Health Checks
A Geoproximity routing policy can be used when one wants to route traffic based on the location of the resources and optionally shift traffic from resources in one location to resources in another location. It has the following features:
The Traffic Flow feature MUST be enabled
Ability to shift traffic to resources based on a defined bias value
To shift traffic to resources, specify bias values - more value (1 to 99) means more traffic, lower value (-1 to -99) means lesser traffic
A IP-based routing policy can be used when one wants to route traffic based on the IP addresses of the users. It has the following features:
Provide a list of CIDRs of the users and the corresponding locations to route to
A Multivalue routing policy allows one to return multiple values. It has the following features:
Can be associated with Health Checks
Only returns values for resources that are healthy
With multiple target values, a random value is chosen by the client
References