Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Let’s talk about AWS Route 53

What is AWS Route 53

Today I’m going to talk about AWS Route 53 service. But before moving to the main topic, let’s get a brief idea of DNS because it is essential knowledge to understand Route 53.

What is DNS

DNS or Domain name is responsible for translating or mapping hostnames with IP addresses. This concept is the backbone of the internet. For example, once we search “www.google.com", DNS will translate this hostname to “172.217.18.36”.

In the 1st step, the browser enters a human-friendly hostname, and then the DNS server finds and returns the IP address according to the hostname. Then the browser can find the web service with the help of an IP address that returns from the DNS server.

Now is the time to move for AWS route 53

What is this route 53?

AWS route 53 is a fully managed High scalable and available DNS service. This is not just a DNS service, route can register domains and continuous health checks of your resources.

Before moving to deep dive on this topic we need to get understand some domain Terminologies.

  1. Domain name — eg: www.example.com
  2. Record types — there are so many record types available and a few of the will discuss below. For example, Route 53 supports the following DNS record types -A / AAAA / CNAME / NS / CAA / DS / MX / NAPTR / PTR / SOA / TXT / SPF / SRV.
  3. value — 12.34.56.78
  4. Routing Policy — how Route 53 responds to queries
  5. TTL — how Route 53 responds to queries
Let’s talk about Record types

Basically, Record types define what kind of relationship will build between two entities. let’s talk about the main basic record types one by one.

  1. A — “A” type record maps a hostname to IPv4
  2. AAAA — “AAAA” type record maps a hostname to IPv6
  3. CNAME — “CNAME” type records maps hostname to another hostname

Let’s talk about how to create a record in the AWS console.

Once you try to create a record you can see the similar simple form that I have attached below. let’s see what are the available options one by one.

Basically, route 53 is responsible for mapping one address to another address, the address could be IP or hostname.

Name (1) -> Route 53 name server returns the IP address of the domain name to the DNS resolver. Most of the time this will be the hostname (ex: http://petstore-demo-endpoint.execute-api.com/petstore/pets)

Type (2) -> As we mentioned before there are few record types available. we need to choose what kind of record we need. This option affects the Value section. because the value section depends on the record type.

TTL (3) -> TTL or time to leave responsible for caching results of the records. And we can define the expiration time for caching. Until the cache is expired, the client will not request to route 53, instead of requesting to the route 53, client gets the information from the cache.

Value (4) -> Once the client requests route 53, route 53 will map with NAME and VALUE. This field is relay on the Type of record. If we use A type of record Value expects IPv4 or if we use AAAA type of record, the value expects IPv6.

CNAME vs Alias

let’s assume you need to map the load balancer to another hostname, So, route 53 map lb1–1234.us-east-2.elb.amazonaws.com to myapp.mydomain.com.

You can do this with the CNAME record because CNAME records map the host to another host. But

CNAME: ONLY FOR NON-ROOT DOMAIN (aka. something.mydomain.com)

According to this example, we can use CNAME, but what if you need to point to mydomain.com instead of myapp.mydomain.com?

We cannot use CNAME records, So what is the solution for it? the answer is We can use Alias record.

Alias record works for ROOT DOMAIN and NON ROOT DOMAIN (aka mydomain.com)

And there are other advantages if we are moving with Alias instead of CNAME. which are

  1. Alias is free of charge
  2. Provide native health check

But you cant set TTL with Alias records

We can set Alias records with multiple targets like Elastic Load Balancers. CloudFront Distributions, API Gateway, Elastic Beanstalk environments, S3 Websites, VPC Interface Endpoints, Global Accelerator accelerator and Route 53 record in the same hosted zone.

But you cant set an ALIAS record for an EC2 DNS name.

Route 53 — Routing policies

under this topic, we will see how route 53 responds to DNS queries. There are 6 types available

  1. Simple — Typically, route traffic to a single resource and can specify multiple values in the same record.

2. Weighted — We can set weight ht to each instance then according to that weight route 53 points to instances. Assign a weight of 0 to a record to stop sending traffic to a resource. If all records have the weight of 0, then all records will be returned equally.

3. Failover — AWS route 53 regularly checks the connected instances and checks whether it is healthy or not. whenever instance going down, route 53 is able to handle the failure with this policy.

4. Latency-based — Redirect to the resource that has the least latency close to us. Super helpful when latency for users is a priority and Latency is based on traffic between users and AWS Regions

5. Geolocation — We can set a routing policy based on the geolocation. with this policy, we can define backlisted or whitelisted locations based on the request coming.

6. Multi-Value Answer — Use when routing traffic to multiple resources. Use when routing traffic to multiple resources. Can be associated with Health Checks (return only values for healthy resources) and Up to 8 healthy records are returned for each Multi-Value query

So, that’s it about AWS Route 53.

I hope you got something new!

Have a great day! See you soon in the following incredible story.


Let’s talk about AWS Route 53 was originally published in Enlear Academy on Medium, where people are continuing the conversation by highlighting and responding to this story.



This post first appeared on Enlear Academy, please read the originial post: here

Share the post

Let’s talk about AWS Route 53

×

Subscribe to Enlear Academy

Get updates delivered right to your inbox!

Thank you for your subscription

×