R53 — ADVANCED ROUTING_POLICY- 2024

Cloudy Buddy
12 min readDec 7, 2023

--

fd
R- 53 — GLOBAL SERVICE

TOPICS →

  • 1, What are R53 and Benifits?
  • 2, 3 — Tier Architecture
  • 3, Domain name sellers
  • 4, Hosted_Zone
  • 5, Routing_Policy = 7
  • 6, R53 — Interview Ques & Ans

_______________ R53 — THEORY ________________

1, What is R53?

  • Amazon Route 53 is a scalable and highly available Domain Name System service
  • Route 53 performs three main functions combination
  • If a web application requires a domain name, Route53 service helps to register the name for the website (i.e. domain name).
  • Whenever a user enters the domain name, Route53 helps to connect the user to the website.
  • If any failure is detected at any level, it automatically routes the user to a healthy resource.
  • Amazon Route 53 is cost-effective and secure.
  • Amazon Route 53 is flexible, highly available, and reliable.

2, Benefits of Route53?

  • Highly Reliable: Route53 is built using AWS’s highly available and reliable infrastructure.
  • Scalable: It automatically scales the resources during large traffic and also handles large queries without the user’s intervention.
  • Easy to use: It can start to answer your DNS queries within minutes. Can be mapped easily to any resource.
  • Health Check: Route 53 monitors the health of the application. If any failure is detected, it automatically redirects the user to a healthy resource before the customer can identify the problem.
  • Flexible: You can decide which policy you want to use at a given time.
  • Simple: Using routing types, Route53 helps to manage traffic globally.
  • Cost-effective: Payment is done only according to the services used.
  • Secure: By integrating it with IAM, access to Amazon Route53 is secured by giving its permissions to only authorized users.
  • Mapped with various AWS services: It can be used to map domain names to Amazon EC2 instances, S3 buckets, and other AWS resources.
1 ip = 1 Routing Policy only can attach
# DOMAIN_NAME = SELLER’S → ( R53 = COST HIGH )
1, USER TRAFFIC FIRST GOES TO GO_DADDY

3, WHAT TYPES OF ROUTING POLICY?

  • 1, Simple routing policy
  • 2, Weighted routing policy
  • 3, Latency routing policy
  • 4, Failover routing policy
  • 5, Geolocation routing policy →
  • 6, Geoproximity routing policy →
  • 7, Multivalue answer routing policy →

_______________ R53 — PRACTICAL ______________

STEP 1 — Buy a Domain via AWS ( REGISTER DOMAINS ) => Based on client's decision

STEP 2 — Create ACC @ Go-dady.com => Cost less compare to AWS domain purchase

STEP 3 — Purchase a Domain name for your practice and project session ___________________( mrcloudbuddy. in )_________________________

STEP 4 — Create 3 EC2 @ diff REGIONS = MUMBAI, SINGAPORE, SIDNEY

1, BOOTSTRAP _ MUMBAI SERVER_1 --> 
#! /bin/bash
sudo yum install httpd -y
systemctl start httpd
sudo mkdir /var/www/html
sudo echo " This is MUMBAI_SERVER_1 ">/var/www/html/index.html


2, BOOTSTRAP _ SIGAPORE SERVER_1 -->
#! /bin/bash
sudo yum install httpd -y
systemctl start httpd
sudo mkdir /var/www/html
sudo echo " This is SIGAPORE_SERVER_1 ">/var/www/html/index.html


3, BOOTSTRAP _ SIDNEY SERVER_1 -->
#! /bin/bash
sudo yum install httpd -y
systemctl start httpd
sudo mkdir /var/www/html
sudo echo " This is SIDNEY_SERVER_1 ">/var/www/html/index.html

STEP 5 — Create HOSTED ZONE @ R53 => mrcloudbuddy.in make it as public

STEP 6 — Copy Nameserver’s @ Hosted Zone to Paste Nameserver’s @ Go-Daddy

  • Traffic route from go-daddy to AWS

STEP 7 → → → → → { 1. Simple Routing Policy }

  • Use for a single resource that performs a given function for your domain, for example, a web server that serves content for the example.com website.
  • Simple Routing Policy is the most basic routing policy defined using an A record to resolve to a single resource always without any specific rules.
  • R53 > Dashboard > Hosted Zones > Domain name
  • Create Records — A Record & 1 minute simple Routing policy_ MUBBAI-SERVER 1 -PUBLIC_IP

STEP 8 → → → → → { 2. Weighted Routing Policy }

  • Weighted Routing Policy is used to route traffic to multiple resources in proportions that you specify.
  • R53 > Dashboard > Hosted Zones > Domain name
  • Delete Records — A Record & 1 minute simple Routing policy_ MUBBAI-SERVER 1 -PUBLIC_IP
  • Create an Ec2 server in the same Mumbai region with bootstrap
1, BOOTSTRAP _ MUMBAI SERVER_2 --> 
#! /bin/bash
sudo yum install httpd -y
systemctl start httpd
sudo mkdir /var/www/html
sudo echo " This is MUMBAI_SERVER_2 ">/var/www/html/index.html
  • Create Records — A Record & 1 minute Weighted Routing policy_ MUBBAI-SERVER 1 -PUBLIC_IP => Count = 100
  • Create Records — A Record & 1 minute Weighted Routing policy_ MUBBAI-SERVER 2 -PUBLIC_IP => Count = 200

STEP 9 → → → → → { 3. Latency Routing policy }

  • In Real-time we use this Policy.
  • Use when you have resources in multiple AWS Regions and you want to route traffic to the region that provides the best latency.
  • Latency Routing Policy is used when there are multiple resources for the same functionality and you want Route 53 to respond to DNS queries with answers that provide the best latency i.e. the region that will give the fastest response time.
* * Create Records — A Record & 1 minute Latency Routing policy_ SINGAPORE -SERVER 1 -PUBLIC_IP
* * Create Records — A Record & 1 minute Latency Routing policy_ SIDNEY-SERVER 1 -PUBLIC_IP

STEP 10 → → → → → { 4 . Geolocation Routing Policy }

  • Use when you want to route traffic based on the location of your users
  • A Geolocation Routing Policy is used to route the traffic based on the geographic location from where the DNS query originated.
  • This policy allows sending the traffic to resources in the same region from where the request was originated i.e. it allows to have site affinity based on the location of the users.
  • R53 > Dashboard > Hosted Zones > Domain name
  • Delete Records — A Record & 1 minute Weighted Latency Routing policy_ SINGAPORE-SERVER 1 -PUBLIC_IP
  • Delete Records — A Record & 1 minute Weighted Latency Routing policy_ SYDNEY-SERVER 1 -PUBLIC_IP
* * Create Records — A Record & 1 minute Latency GIOLOCATION Routing policy_ SINGAPORE-SERVER 1 -PUBLIC_IP
  • Create Records — A Record & 1 minute Latency GIOLOCATION Routing policy_ SYDNEY-SERVER 1 -PUBLIC_IP
  • Create Records — A Record & 1 minute Latency GIOLOCATION Routing policy_ MUMBAI-SERVER 1 -PUBLIC_IP

STEP 11 → → → → → { 5. Fail Over Routing Policy }

  • When you want to config active-passive failover- Master & Secondary
  • A Failover Routing Policy is used to create an Active/Passive setup such that one of the sites is active and serves all the traffic while the other Disaster recovery (DR) site remains on standby.
  • Route 53 monitors the health of the primary site using the health check.
* * Create Record — A Record & 1 minute FAIL_OVER Routing policy_ MUMBAI-SERVER 1 -PUBLIC_IP
* * Create Record — A Record & 1 minute FAIL_OVER Routing policy_ SYDNEY-SERVER 1 -PUBLIC_IP
* * CREATE HEALTH_CHECK ( Create Health Check ( Configure PRIMARY > MUMBAI-SERVER 1 -PUBLIC_IP > index.html ) & ( Ø If want we can Create Health Check ( Configure PRIMARY SIGAPORE_SERVER 1 -PUBLIC_IP )
** Getting a Response from MUMBAI_SERVER
* * Manually stopping the Mumbai server so that traffic will redirect to the Sydney server
* * CHECKING Health Check status
* * ** Getting a Response from SIDNEY _SERVER
* * Manually START the Mumbai server so that traffic will redirect to the MUMBAI server Again
** Getting a Response from MUMBAI_SERVER

STEP 12 → → → → → { 6 . Geoproximity Routing Policy }

  • Use when you want to route traffic based on the location of your resources and, optionally, shift traffic from resources in one location to resources in another.
  • Geoproximity routing lets Amazon Route 53 route traffic to your resources based on the geographic location of your users and your resources.
  • 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. To use proximity routing, you must use Route 53 traffic flow

STEP 13 → → → → → { 7 . Multivalue Routing Policy }

  • Use when you want Route 53 to respond to DNS queries with up to eight healthy records selected at random.
  • Multivalue answer Routing Policy is like Simple Routing Policy but it can return multiple values, such as IP addresses for your web servers, in response to DNS queries.
  • You can specify multiple values for almost any record, but multivalue answer routing also lets you check the health of each resource, so Route 53 returns only values for healthy resources.
  • It’s not a substitute for a load balancer, but the ability to return multiple health-checkable IP addresses is a way to use DNS to improve availability and load balancing.

Be sure to terminate all Ec2 to avoid incurring charges.

Do add some claps, if you liked the article 👏

Follow for more such content ❤

If you want any personal suggestions or a one-to-one call with me, will be more than happy to have one🌿🌾
Let me know on
linkedin.com/in/umasankar1993
Now, Take a deep breath and Go get it🌏

#AWS #Docker #Kubernetes #Terraform #Devops #Skills #Roadmap #R53

AWS

Sns

Sqs

Metrics

Cloudwatch

__________R53 INTERVIEW_QUESTIONS __________

1. What is AWS Route 53?

AWS Route 53 is a highly scalable Domain Name System (DNS) web service offered by Amazon Web Services. It is designed to provide reliable and cost-effective domain registration, DNS routing, and health monitoring for your applications.

2. How does Route 53 help in achieving high availability?

Route 53 offers features such as DNS failover and health checks, which enable automatic failover to healthy resources in the event of an outage, ensuring the high availability of your applications.

3. What types of routing policies does Route 53 support?

Route 53 supports several routing policies, including Simple, Weighted, Latency-based, Failover, Geolocation, and Multi-value routing.

4. Explain Latency-based routing and when it should be used.

Latency-based routing directs traffic to the AWS region with the lowest latency, ensuring optimal user experience. It is ideal for applications where latency is a critical factor.

5. How can you route traffic based on the geolocation of users?

Geolocation routing allows you to route traffic based on the geographic location of your users, helping you deliver region-specific content.

6. What is Weighted Routing and how is it implemented in Route 53?

Weighted routing enables you to distribute traffic across multiple resources based on assigned weights. This is useful for conducting A/B testing or gradually migrating traffic to new resources.

7. Explain the concept of health checks in Route 53.

Health checks monitor the health of your resources by periodically sending requests and verifying their responses. Unhealthy resources are automatically removed from DNS responses.

8. How can Route 53 contribute to disaster recovery scenarios?

Route 53’s DNS failover feature can redirect traffic to a standby resource in a different region or data center, aiding in disaster recovery efforts.

9. What is the difference between CNAME and Alias records?

CNAME records are used to map one domain name to another, while Alias records are used to map a domain name to an AWS resource, such as an S3 bucket or a CloudFront distribution.

10. How do you migrate DNS service to Route 53?

Migrating DNS to Route 53 involves updating the nameservers of your domain to the ones provided by Route 53 and recreating your DNS records in the Route 53 hosted zone.

11. Can Route 53 be used for routing non-DNS traffic?

Yes, Route 53 can be used for routing other types of traffic, such as HTTP, HTTPS, and TCP, through its support for routing policies.

12. Explain the process of setting up a failover routing policy.

A failover routing policy directs traffic to a standby resource when the primary resource is unhealthy. It requires the configuration of health checks and the definition of primary and secondary resources.

13. How can you achieve global load balancing using Route 53?

Global load balancing can be achieved by using Route 53’s Multi-value routing, which routes traffic to multiple resources in different regions while considering health and latency.

14. What are the benefits of using Route 53 Resolver?

Route 53 Resolver allows you to resolve DNS queries between your on-premises network and your AWS resources, simplifying hybrid cloud architectures.

15. How can Route 53 integrate with other AWS services for automatic resource updates?

Route 53 can be integrated with AWS CloudWatch, AWS Lambda, and Amazon S3 to automate resource updates based on health checks and other triggers.

16. Explain the routing flow for a geolocation routing policy.

Geolocation routing first checks if there’s an exact match for a user’s location. If not, it falls back to a default resource. This allows you to serve content tailored to specific regions.

17. What is the difference between Alias and Non-Alias records in Route 53?

Alias records are used to map a domain name to AWS resources, while non-Alias records are used for mapping to non-AWS resources.

18. How does Route 53 prevent DNS query attacks?

Route 53 employs measures such as rate limiting and query whitelisting to protect against DNS query attacks and help maintain service availability.

19. Can Route 53 be used for routing traffic between regions of the same AWS service?

Yes, Route 53 can be used for routing traffic between regions of services such as Amazon S3 or CloudFront.

20. How can Route 53 enhance application performance?

Route 53’s latency-based routing ensures that users are directed to the region with the lowest latency, enhancing application performance and responsiveness.

21. Explain the process of setting up a weighted routing policy.

In weighted routing, you assign different weights to resources, indicating the proportion of traffic they should receive. This is useful for conducting controlled experiments.

22. What is the significance of the TTL (Time to Live) value in DNS records?

The TTL value in DNS records determines how long DNS resolvers should cache the records. A shorter TTL allows for quicker updates but may increase the DNS query load.

23. How does Route 53 support IPv4 and IPv6?

Route 53 enables you to create both IPv4 and IPv6 records, allowing your resources to be accessible over both protocols.

24. Can Route 53 be used for routing traffic to non-AWS resources?

Yes, Route 53 can be used to route traffic to non-AWS resources by creating Non-Alias records.

25. What is the cost structure for using Route 53 services?

Route 53 pricing is based on factors such as the number of hosted zones, the number of queries, and the use of additional features like health checks and domain registration.

--

--