Amazon Route 53 — Routing Policies

Girish V P
Tensult Blogs
Published in
4 min readAug 16, 2018

This Blog has moved from Medium to blogs.tensult.com. All the latest content will be available there. Subscribe to our newsletter to stay updated.

Amazon Route 53 is a highly reliable and scalable Domain System Service. Along with all the common features of traditional DNS service, Route 53 has many other features. Route 53 can resolve and return the IP Address of the server which has the least latency to the client from the list servers. This is a DNS service with configurable health checks which return only healthy node’s IP address. In Route 53, the Routing Policy decides the behavior of the service. Let us see the various Routing Policies,

  • Simple
  • Multivalue Answer
  • Weighted
  • Latency based
  • Failover
  • Geolocation

Simple: Simple routing is the most simple and common DNS policy which can accommodate a single FQDN (fully qualified domain name) or IP address. In case of an A record, you have to enter the IP address as the value. For load balancers, you use CNAME type.

Multivalue Answer: Multivalue answer Routing Policy is like Simple Routing Policy but it can return multiple IP addresses associated with an FQDN. Here there is more than one resource record for the same FQDN, pointing to different IP addresses, load balancer etc. DNS queries return the result in random order, which means that when you query next time, the IP address corresponds to the FQDN is in different order or sequence. This concept was traditionally used for load-balancing.

Weighted: Result is returned based on a weight of the DNS record. This is used for distributing the number of sessions equally or unequally among the servers. Let us consider a scenario you have identical web sites with the same site name in different AWS Regions. Here, simple routing policy is not adequate since it allows only one value against an FQDN or hostname. So you will be creating two DNS records with the same FQDN, but each point to a different IP address or CNAME. You select Routing Policy Weighted and add Weight as “1" for both records. So the first query returns the first IP address and for next query, it returns a second IP address and so on. This distributes the sessions among the servers equally. Some times you may want unequal distribution of sessions like you have a smaller size server in a different Region. You can enter an integer value between 0 and 255 to distribute your traffic unequally.

Latency: You want to return a website’s IP address to a client which has lower latency compared to its identical peer hosted in a different AWS Region. For example, you have configured two identical websites one in the Mumbai region and the other in the Singapore region. The intention is, the users closer to India have to access the website hosted in the Mumbai region and users closer to Singapore to Singapore’s website. Once configured, Route 53 intelligently returns the IP address with lower latency to the client. To configure this, you have to select the Latency Routing Policy. You can configure two DNS resource records corresponding to the web sites you configured in different Regions, say Mumbai and Singapore. Mumbai’s record you have to set the Region as “ap-south-1” and Singapore’s record specify “ap-east-1”.

Geolocation: Geolocation Routing Policy allows access to the resources based on the geographic location of the users or client. Here, you have multiple records with the same FQDN. Based on the Location, Value (IP Address) is different for each record . You can specify geographic locations by continent, by country, or by state in the United States. So an e-commerce web site you configured for India might have products available in India with INR. Whereas site you configured for US might contain Dollar, yet with a same website name for the users.

Failover: Failover routing allows you to route traffic to a resource when the resource is healthy and to another resource when the first one is unhealthy. This is mainly used when you have the primary site and a disaster recovery site. Here, the Route 53 you have two records, one for primary and other for secondary. You have to create a health check in Route 53 and associate with the Primary record. Sample screen shot of health check configuration is given below.

Conclusion

DNS is a most important service in an IT infrastructure. Route 53 is the DNS service solution introduced by AWS and has a lot of useful features compared to traditional DNS. It can help administrators with its capability of failover routing and Geolocation records.

--

--