I’ve already written some notes about Route 53. It’s pretty feature-rich, allowing you to set up weighted, geo, latency, and fail-over routeing. Setting these up is pretty straightforward. All you need to do is create multiple entries with the same name and type, but different routeing rules. When it comes time for Route 53 to resolve those entries, it will parse your routeing rules and return the appropriate response.
For example, to create weighted routeing for example.com, you would create 2 A-record entries for example.com, but with different weights. One could have a weight of 1, and the other a weight of 2. So when Route 53 needs to resolve, it will look at entries with the same name and type, and find our example.com A records. It would then parse the routeing rules, see that one record needs to be returned twice as many times as the other, and pick the appropriate one. This is routeing 101 in Route 53. For more complex configurations, we have to combine the different routing rules in a tree-like configuration.
Consider this complex scenario for example.com:
To implement this, we would have 3 levels.
The flow would look like this: