Note: this information is correct at the time of publishing. Things change quickly!
What is DNS?
The best analogy I’ve heard for understanding DNS is that of a phone book. IP addresses are used to identify computers on a network, and DNS maps those IP addresses to human-friendly domain names — .e.g.
By default there is a limit of 50 domains that can be managed through Route 53, but you can increase this by contacting Amazon.
There are numerous routing polices available on Route 53:
- Simple routing
- Weighted routing
- Latency-based routing
- Failover routing
- Geolocation routing
- Geoproximity routing
Let’s look at each one in turn.
Simple routing returns all the associated IP addresses with your record, in a random order. This is typically used for routing traffic to a single server.
Weighted routing allows you to split your traffic based on various pre-defined weights. When a user makes a request, Route 53 could, for example, route 20% of traffic to an EC2 instance hosted in Ireland, and the remaining 80% to London.
You can also the service to associate with health checks — this means that Amazon will remove an EC2 from the available DNS options if it fails a health check.
AWS’s latency routing policies allows you to route your traffic to provide the lowest network latency for the end user. In practice, this means the request is made against the EC2 instance in the region that will give the lowest response time.
Failover policies let you create an active:passive routing policy, which routes traffic to the secondary IP address should there be an issue with the first.
As you might have guessed, this policy allows you to route traffic to a specific server depending on the location of your user. This is useful to tailor the language, currency and content to a user’s locale.
This can be defined by continent or by country — e.g. you can route all requests originating from Africa to one server, as well as all requests originating from China.
It’s worth noting that a ‘default’ option can and should be specified, this will route all traffic that doesn’t fit into a pre-defined locations. Not setting a default will cause requests from outside of your pre-defined locations to fail.
Though this is similar to latency based routing, it’s not the same — it’s possible that in certain network conditions that your users’ requests will be routed to a server that isn’t closest to them. If this is a requirement, use geolocation routing.
Geopriximity routing (traffic flow only)
AWS traffic flow is a tool that allows you to create complex routing patterns for your traffic, using a GUI in the AWS console.
Geoproximity routing lets Route 53 route traffic to your resources based on the geographic location of your users and your resources. This routing policy is only available through traffic flow.
Multi-value answer policies operate in basically the same way as simple routing policies, but with the addition of health checks to ensure compute instances are functioning.