Special Offer - Enroll Now and Get 2 Course at ₹25000/- Only Explore Now!

All Courses
Route 53 Policies

Route 53 Policies

September 11th, 2019

Route 53 Policies: Latency- Based Routing vs Geolocation Routing

When creating a record, you can choose an policies that accept how Amazon Route 53 reply to queries. There are various types of routing policies such as basic routing policies, failover routing policies, geolocation routing policies, latency routing policies and so on. In this article, we will be looking at Latency-based routing and Geolocation routing. Both policies apparently route the traffic request to the closest resource from whether a query originates. However, they also have distinct features which differentiates its use cases.

Latency-based routing

Performance plays a critical role in the success of a website. There is strong correlation between the response time of a website and the traffic to the website. In case you have an application which is being hosted in several AWS Regions, you can improve the performance for your users by serving their requests from the AWS Region which provides the lowest latency.

For example, you wish to restore a website’s IP address to the customer which has a lower idleness when contrasted with its indistinguishable companions that are facilitated in different AWS Regions.

Let’s say, if you have set up two similar looking websites in different geographic locations, one in Delhi and one in Malaysia, the intention can be that users who are located closer to Delhi would have access to the website hosted in Delhi and users located closer to Malaysia would have access to the website in Malaysia. Once it is set up, Route 53 intelligent returns the IP address with low bandwidth to its client. For this configuration, you will have to select the Latency Routing Policy. You can configure two DNS resource records that corresponds to the websites you configured in different regions.

However, it should also be noted that it does not ensure that users from the same geographic region would be served from the same location. It can be ideally implemented in situations where you have resources located in multiple AWS Regions and you want to route the traffic to the region which provides the best latency. If a website or CRM application has customers from several locations, then it can be hosted across multiple AWS Regions and requests on the website can be services from the AWS Region which offers the lowest latency on order to increase or improve customer satisfaction.

Click here to get free AWS Tutorial

 Geolocation-based routing

Geolocation routing allows you to choose the resources that serve your traffic in accordance with the location of users, i.e.  the location where the DNS queries come from. For instance, you may want all queries from America to be routed to an ELB load balancer in a specific region. By using geolocation routing, your contents can be localized and your websites can be displayed in the language of the user’s country.

Geolocation routing can also be used to restrict distribution of content to certain regions. Another way to use it is for balancing loads across endpoints in a way that is easy to manage and predictable so that each user location is routed to the same endpoint consistently. Geolocations work by mapping IP addresses to appropriate locations. In some cases, the IP addresses do not map to geographic locations which comprises all the 7 continents and Amazon Route 53 would receive DNS queries from locations which it cannot identify.

As a result, Route 53 returns a “no answer” response for queries from those locations. For such cases, you can create a default record which can manage queries from IP addresses that aren’t mapped to a location.

Become an AWS Certified Professional in 35Hours

Use Case Scenario

Let’s assume that you are design an international travelling websites based on a different-region architecture using Amazon web services Cloud. When user’s login to this website, they need to have a good experience. Moreover, the users need to be able to view the contents of this website in the official language of the country from where the user is logging in from. Because of compliance reasons, the Canadian customer data needs to be stored in Canada and the US customer data needs to be stored in the US.

Considering this scenario, we may say that latency-based routing policy would ensure a good user experience in terms of latency. Even so, latency-based routing does not always guarantee that the traffic is routed to the nearest resource based on the proximity to the source of the query. With latency-based routing, you create records for your resources in several AWS regions. Upon receiving a DNS query by Route 53 for a domain, it checks the latency records. It would then evaluate which region has offers the lowest latency to users. It then chooses a suitable latency record for the respective region.

Get Prepared for Interviews

Despite of this, latency does not remain the same always. It is influenced based on the network connectivity, routing and traffic as that changes over time. Latency-based routing works depending on the latency measurements over time and these changes are evident in the measurements that have been taken. As such, the latency routing policy would not be suitable as the routing changes over time.

If we consider Geolocation routing, it allows Route 53 to route the traffic to the resources based on geographic location of query. Your contents can be localized and shown in your website in your own language with Geolocation routing. Also, if you have country-specific distribution rights, you can control the content distribution to specific countries. For instance, if you have a user from Los Angeles, the user would be directed to a resource in the US region. Likewise, a user from Orleans will be directed to France region.

By using the geolocation routing policy, a user from Orleans will be able to view the contents in French and a user from Los Angeles would be able to view the contents in English. As geolocation routing policy maps IP address to locations and can also allow a default record to be created to handle queries from IP addresses which are not mapped to any location, it is suitable in such a scenario as this.

Enroll Now !

Related Blogs: