AWS Route 53 - The Easy Way!

Route 53 name refers to port number 53 used for DNS traffic.firstly

Firstly let's understand, What are DNS & DNS Records?

DNS stands for Domain Name System.

It resolves or translates the Domain name to its corresponding IP address or we can say, map a domain name to an IP address so that we don't have to remember the IP address of the application to access it. This process is also known as DNS lookup.

A DNS record is a database used to map URLs to an IP address. DNS records are stored in DNS Server and work to help users connect their websites to the outside world.

For example, these are some important DNS Record types:

  • A (Address) Record: Maps a domain name to an IPv4 address.

  • AAAA Record: Maps a domain name to an IPv6 address.

  • CNAME (Canonical Name) Record: Specifies an alias for a domain name and points it to another domain's A or AAAA record.

  • MX (Mail Exchange) Record: Identifies the mail server responsible for accepting incoming emails for a domain.

  • NS (Name Server) Record: Specifies the authoritative name servers for a domain.

Route 53 is DNS Service offered by AWS to manage and route internet traffic for your Domains.

What are Hosted Zones in Route 53?

In Route 53, a hosted zone is a container for DNS records that correspond to a specific domain. It is the fundamental unit for managing and configuring DNS for your domain names.

A hosted zone in Route 53 contains the DNS records that define how traffic is routed for a domain. When you create a hosted zone, Route 53 automatically creates a set of name servers that are associated with the zone. These name servers are responsible for resolving DNS queries for the domain.

AWS Route 53 Routing Policies.

A routing policy is a set of rules that determines how traffic is routed between different endpoints, such as servers or services.

We have in total 8 routing policies in Route 53. Let's see what are they and how they work.

  1. Simple Routing: This is the default routing policy. It allows you to associate a single resource (such as an EC2 instance or an S3 bucket) with a domain or subdomain. When a DNS query is received, Route 53 responds with the IP address associated with that resource.

  2. Weighted Routing: With this policy, you can distribute traffic across multiple resources in proportions that you specify. Each resource is assigned a weight, and Route 53 responds to DNS queries based on the weights you set. This enables you to control the percentage of traffic each resource receives.

  3. Latency-Based Routing: This policy directs traffic to the resource that provides the lowest latency for the end user. Route 53 measures the latency between various endpoints and routes traffic to the one with the lowest latency at the time of the query.

  4. Failover Routing: This policy is used for creating active-passive setups or implementing high availability. You can configure resources in different AWS regions and define a primary resource and a secondary (failover) resource. Route 53 monitors the health of the primary resource and, if it becomes unavailable, automatically directs traffic to the secondary resource.

  5. Geolocation Routing: With this policy, you can route traffic based on the geographic location of the DNS resolver or the end user's IP address. You can create routing rules for different geographic regions and specify different resources to be associated with each rule. For example, if a user is accessing a website from India this policy will direct the request to a server in India rather than a server present in the US.

  6. Geoproximity Routing: This policy allows you to route traffic based on the geographic location of your resources and the geographic location of the end user. You can define geolocation regions and associate resources with them. Route 53 then directs traffic to the nearest or most optimal resource based on the end user's location.

  7. Multivalue Answer Routing: This policy enables you to specify multiple resources for a single DNS name and Route 53 responds with multiple IP addresses in the DNS response. This can be used for load balancing or to provide fault tolerance by associating multiple resources with a single DNS record.

Health Checks in Route 53 :

Amazon Route 53 offers health checks as a feature to monitor the health and availability of your resources, such as web servers, load balancers, or endpoints. Health checks in Route 53 periodically send requests to your resources and evaluate the responses to determine their health status. This information is used to route traffic intelligently and maintain the availability of your applications. Here are some key points about Route 53 health checks:

  1. Health Check Types: Route 53 supports various types of health checks, including HTTP, HTTPS, TCP, and HTTP/HTTPS with string matching. You can choose the appropriate health check type based on the protocol and requirements of your resources.

  2. Endpoint Monitoring: Health checks can be configured to monitor specific endpoints, such as URLs, IP addresses, or domain names. You can define the frequency of health check requests and the number of consecutive failures required to mark a resource as unhealthy.

  3. Failure Thresholds and Retries: Route 53 allows you to specify failure thresholds and retries for health checks. You can define the number of consecutive failures before considering a resource unhealthy and the number of retries to attempt before marking it as healthy.

  4. Advanced Configuration: Health checks offer advanced configuration options, such as defining the regions from which the checks originate, specifying request headers, configuring SSL certificate validation, and setting up string matching for HTTP/HTTPS checks.

  5. Health Check Status: Route 53 provides real-time health check status, which indicates whether a resource is healthy or unhealthy based on the configured checks. You can view the status in the Route 53 console or retrieve it programmatically through the API.

  6. Integration with Routing Policies: Health checks play a crucial role in routing traffic using policies such as failover routing and latency-based routing. Route 53 uses health check status to determine the availability and health of resources and make intelligent routing decisions.

  7. Notifications and Alarms: Route 53 allows you to configure notifications and alarms for health check status changes. You can receive notifications through Amazon SNS (Simple Notification Service) or trigger other actions based on health check events.

By leveraging health checks in Amazon Route 53, you can proactively monitor the health and availability of your resources and ensure that traffic is directed to healthy endpoints, contributing to the overall reliability and performance of your applications.

Thank you if you read till the end!

*[ pics used credit: pythoholic youtube channel ]

Did you find this article valuable?

Support Sukhpreet Singh by becoming a sponsor. Any amount is appreciated!