Amazon Route 53 is a Managed DNS (Domain Name System). In AWS, Route 53 is global managed DNS (Domain Name System) & we already know DNS is a collection of rules and records which helps clients understand how to reach a server through URLs. DNS operates on port 53. Amazon decided to call it route 53 so that’s where the name comes from.
AWS Route 53 a global service. You need to buy a domain in order to work with Route53, Go to Route53 Service & Click on register domain. Enter the domain name & check availability, Add to cart & click on continue.
Amazon Route 53 can use:
- public domain names you own (or buy) for example: application1.mypublicdomain.com
- private domain names that can be resolved by your instances in your VPCs. for example: application1.company.internal
Route53 has advanced features such as:
- Load balancing (through DNS – also called client load balancing)
- Health checks (although limited…)
- Routing policy: simple, failover, geolocation, latency, weighted, multi value
You pay $0.50 per month per hosted zone.
AWS Route 53 Key Features:
Traffic flow—routes end users to the endpoint that should provide the best user experience
Latency-based routing—routes users to the AWS region that provides the lowest latency
Geo DNS—routes users to an endpoint, depending on detected user geography
Private DNS—for users of Amazon VPC, defines custom domain names without exposing DNS information publicly
DNS failover—automatically redirects users to an alternative service in case of outage
Health checks—monitors health and performance of applications
Domain registration—AWS acts as a domain registrar, allowing you to select domain names and register for them with the AWS console
Weighted round-robin load balancing—spreads traffic between several services via a round-robin algorithm.
Benefits of Amazon Route 53:
1) Easy to register your domain − We can purchase all level of domains like .com, .net, .org, etc. directly from Route 53.
2) Highly reliable − Route 53 is built using AWS infrastructure. Its distributed nature towards DNS servers help to ensure a consistent ability to route applications of end users.
3) Scalable − Route 53 is designed in such a way that it automatically handles large volume queries without the user’s interaction.
4) Can be used with other AWS Services − Route 53 also works with other AWS services. It can be used to map domain names to our Amazon EC2 instances, Amazon S3 buckets, Amazon and other AWS resources.
5) Easy to use − It is easy to sign-up, easy to configure DNS settings, and provides quick response to DNS queries.
6) Health Check: Route 53 monitors the health of the application. If an outage is detected, then it automatically redirects the users to a healthy resource.
7) Cost-Effective − Pay only for the domain service and the number of queries that the service answers for each domain.
8) Secure − By integrating Route 53 with AWS (IAM), there is complete control over every user within the AWS account, such as deciding which user can access which part of Route 53.
DNS record types that Amazon Route 53 support
Amazon Route 53 currently supports the following DNS record types:
- A (address record)
- AAAA (IPv6 address record)
- CNAME (canonical name record)
- CAA (certification authority authorization)
- MX (mail exchange record)
- NAPTR (name authority pointer record)
- NS (name server record)
- PTR (pointer record)
- SOA (start of authority record)
- SPF (sender policy framework)
- SRV (service locator)
- TXT (text record)
Amazon Route 53 also offers alias records, which are an Amazon Route 53-specific extension to DNS. You can create alias records to route traffic to selected AWS resources, including Amazon Elastic Load balancers, Amazon CloudFront distributions, AWS Elastic Beanstalk environments, API Gateways, VPC interface endpoints, and Amazon S3 buckets that are configured as websites. Alias record typically have a type of A or AAAA, but they work like a CNAME record. Using an alias record, you can map your record name (example.com) to the DNS name for an AWS resource(elb1234.elb.amazonaws.com). Resolvers see the A or AAAA record and the IP address of the AWS resource.
Please find below DNS record types which are mainly used –
1- A Record (URL to IPv4)
The “A” record stands for Address record. The A record is used by computer to translate the name of the domain to an IP address.
Eg: (http://cloudsnclear.com/ might point to http://22.214.171.124)
2- CNAME (Canonical Records- URL to URL)
CNAME Points a URL to any other URL. (rohit.sharma.com => sharma.example.com), We use it only for Non-Root Domain(aka. something.mydomain.com)
3- Alias Record:
Alias record points a URL to an AWS Resource, Alias record are used to map resource record sets in your hosted zone to Elastic Load Balancer, CloudFront or S3 Buckets websites.
4- AAAA: (URL to IPv6)
An AAAA record maps a domain name to the IP address (Version 6) of the computer hosting the domain. An AAAA record is used to find the IP address of a computer connected to the internet from a name.
CNAME vs Alias:
- Points a hostname to any other hostname. (app.mydomain.com => blabla.anything.com)
- ONLY FOR NON ROOT DOMAIN (aka. something.mydomain.com)
- Points a hostname to an AWS Resource (app.mydomain.com => blabla.amazonaws.com)
- Works for ROOT DOMAIN and NON ROOT DOMAIN (aka mydomain.com)
- Free of charge
- Native health check
DNS Records TTL (Time to Live):
TTL is mandatory for each DNS record. So TTL is length that a DNS records is cached on either the resolving server or user own Laptop. The Lower the TTL, the faster changes to DNS records. Whenever you created record set, you need to define TTL for it.
High TTL: (e.g. 24hr)
- Less traffic on DNS
- Possibly outdated records
Low TTL: (e.g 60 s)
- More traffic on DNS
- Records are outdated for less time
- Easy to change record
Amazon Route 53 Routing Policies:
There is total 6 types of routing policy in Route53, let’s talk about one by one.
1) Simple Routing Policy:
In case of simple routing policy, you can have only one record with multiple IP addresses. If you specify multiple values in record, Route53 returns all values in random order to the user.
Maps a domain to one URL, Use when you need to redirect to a single resource. You can’t attach health checks to simple routing policy. If multiple values are returned, a random one is chosen by the client.
2) Weighted Routing Policy
Weighted Routing Policy controls the what percentage % of the requests that go to specific endpoint. It’s helpful to test 1% of traffic on new app version. It is also helpful to split traffic between two regions. We can associate Health checks with it.
3) Latency Routing Policy
4) Failover Routing Policy
Failover routing lets you route traffic to a resource when the resource is healthy or to a different resource when the first resource is unhealthy. The primary and secondary records can route traffic to anything from an Amazon S3 bucket that is configured as a website to a complex tree of records.
5) Geo Location Routing Policy
Geolocation routing lets you choose the resources that serve your traffic based on the geographic location of your users, meaning the location that DNS queries originate from. For example, you might want all queries from Europe to be routed to an ELB load balancer in the Frankfurt region.
6) Multi Value Routing Policy
It helps distribute DNS responses across multiple resources. For example, use multivalue answer routing when you want to associate your routing records with a Route 53 health check.
Use multivalue answer routing when you need to return multiple values for a DNS query and route traffic to multiple IP addresses. Up to 8 healthy records are returned for each Multi Value query. Multi Value is not a substitute for having an ELB.
Difference Between Route 53 routing policies:
|Simple Routing Policy||Weighted Routing Policy||Latency Routing Policy||Geo Location Routing Policy||Multi Value Routing Policy||Failover Routing Policy|
|• Maps a hostname to another hostname
• Use when you need to redirect to a single resource
• You can’t attach health checks to simple routing policy
• If multiple values are returned, a random one is chosen by the client
|• Control the % of the requests that go to specific endpoint
• Helpful to test 1% of traffic on new app version for example
• Helpful to split traffic between two regions
• Can be associated with Health Checks
|• Redirect to the server that has the least latency close to us
• Super helpful when latency of users is a priority
• Germany may be directed to the US (if that’s the lowest latency)
|• Different from Latency based!
• This is routing based on user location
• Here we specify: traffic from the UK should go to this specific IP
• Should create a “default” policy (in case there’s no match on location)
|• Use when routing traffic to multiple resources
• Want to associate a Route 53 health checks with records
• Up to 8 healthy records are returned for each Multi Value query
• Multi Value is not a substitute for having an ELB
|With Failover Routing, you specify the primary(active) or secondary(passive) site while Multivalue Routing automatically handles where to failover the traffic depending on the health check of the resource for your record set . Choosing where to failover is automatically handled by Multivalue Routing based on the health check of the resource.|
- Have X health checks failed => unhealthy (default 3)
- After X health checks passed => health (default 3)
- Default Health Check Interval: 30s (can set to 10s – higher cost)
- About 15 health checkers will check the endpoint health
- one request every 2 seconds on average
- Can have HTTP, TCP and HTTPS health checks (no SSL verification)
- Possibility of integrating the health check with CloudWatch
- Health checks can be linked to Route53 DNS queries
Amazon Route 53 as a Registrar
- A domain name registrar is an organization that manages the reservation of Internet domain names
- Famous names: GoDaddy/Google Domains/Etc… And also… Route53 (e.g. AWS)!
3rd Party Registrar with AWS Route 53
If you bu y your domain on 3rd party website, you can still use Route53.
1) Create a public Hosted Zone in Route 53
2) Update NS Records on 3rd party website to use Route 53 name servers
This is all about Route53 & it’s records & policy.
Happy AWS Learning 😊
Amazon Web Service – AWS Tutorial
Top 13 Reasons to Why Learn AWS in 2022
AWS VPC – Amazon Virtual Private Cloud || Benefits & Components
What is Amazon API Gateway? Benefits, Features of Amazon API Gateway