AWS Route 53 Routing Policy
AWS Route 53 routing policy is how AWS will respond to DNS queries. There are multiple routing policy options.
Simple Routing Policy
Simple routing policy is a round-robin policy that can be applied to domains where there is only one resource performing the function. web server that provides content for the website.
Simple routing allows you to configure standard DNS records using no special Route 53 routing, such as weighted routing or latency.
Route 53 responds on DNS queries based upon the values in the resource records set, e.g. IP address in an A-record
Simple routing doesn’t allow multiple records to be created with the same type and name, but multiple values can still be specified in the same record such as multiple IP addresses.
Route 53 displays all values necessary to resolve the query recursively in random ordering. The resolver displays the client’s values. The client chooses a value to resolve the query and then resends it.
Simple routing policies do not support health checks. The record would be returned to client even if it was unhealthy.
Alias record enabled means that only one AWS resource, or one record, can be specified in the current zone. Weighed routing policy
A weighted routing policy is a way to route traffic to different resources in a specified proportion (weights), e.g. 75% to one server and 25% the other during a pilot release.
Weights can be assigned to any number between 0 and 255 inclusive.
When multiple resources perform the same function, such as webservers that serve the same site, weighted routing policy may be applied.
Weighted resource records allow multiple resources to be associated with a single DNS address.
Use cases for weighted routing policies include load balancing between different regions
Piloting and A/B testing new software versions
Two or more resource records sets can be created to create a group of weighted resources record sets. Each resource record set is assigned an identifier and a relative amount.
Route 53 searches for the resource record set or group of resource records sets that match the requested name and type when processing a DNS query.
Route 53 selects one of the group. The probability that any one resource records set is selected depends on how much it weighs relative to the total weight of all resource record sets within the group. For example, let’s say has three resource records sets with weights of 1 (20%) 1, 1 (20%) and 3 (60%) (sum = 5). Route 53 selects the first two resource record sets approximately one-fifth of all the time and returns third resource record sets three-fifths.
Policy on weighted routing supports health checks. Latency-based routing (LBR) policy
Latency-based routing policy responds to DNS queries based on which datacenter has the lowest latency.
A latency-based routing policy is used when multiple resources perform the same function. Route 53 must be configured to respond quickly to DNS queries with the lowest latency and the fastest resources.
A latency resource record can be created for each EC2 region that hosts the application. Route 53 receives a query from the domain and selects the EC2 region with the lowest latency. Route 53 responds to the query with the value associated that resource record set. For example, you might have web servers at in the EC2 Data Centers in Ireland and Tokyo. Route 53 will pick up the Tokyo data center (Tokyo), which is the closest to the user’s location when a user visits from Singapore.
Changes in routing and network connectivity can cause latency between hosts on an Internet network to change over time. Latency-based routing relies on latency measurements that were taken over a time period.