Menu
Amazon Route 53
Developer Guide (API Version 2013-04-01)

Using Traffic Flow to Route DNS Traffic

If you use multiple resources, such as web servers, in multiple locations, it can be a challenge to create resource record sets for a complex configuration that uses a combination of Amazon Route 53 routing policies—weighted, latency, failover, and geolocation. You can create resource record sets one at a time, but it's hard to keep track of the relationships among the resource record sets when you're reviewing the settings in a table in the console.

If you're using the Amazon Route 53 console, Amazon Route 53 traffic flow provides a visual editor that helps you create complex trees in a fraction of the time with a fraction of the effort. You can save the configuration as a traffic policy and then associate the traffic policy with one or more domain names (such as example.com) or subdomain names (such as www.example.com), in the same hosted zone or in multiple hosted zones. (You can only use traffic flow to create configurations for public hosted zones.) You can also use the visual editor to quickly find resources that you need to update and apply the updates to one or more DNS names such as www.example.com. In addition, you can roll back the updates if the new configuration isn't performing as you expected it to.

For example, using the traffic flow visual editor, you can easily create a configuration in which you use geolocation routing to route all users from one country to a single endpoint and then use latency routing to route all other users to AWS regions based on the latency between your users and those regions. You might also use failover routing to route users to a primary ELB load balancer within each region when the load balancer is functioning or to a secondary load balancer when the primary load balancer is unhealthy or is offline for maintenance.

Here's an overview of how traffic flow works:

  1. You use the visual editor to create a traffic policy. A traffic policy includes information about the routing configuration that you want to create: the routing policies that you want to use and the resources that you want to route DNS traffic to, such as the IP address of each EC2 instance and the domain name of each ELB load balancer. You can also associate health checks with your endpoints so that Amazon Route 53 routes traffic only to healthy resources. (Traffic flow also lets you route traffic to non-AWS resources.)

  2. You create a policy record. This is where you specify the hosted zone (such as example.com) in which you want to create the configuration that you defined in your traffic policy. It's also where you specify the DNS name (such as www.example.com) that you want to associate the configuration with. You can create more than one policy record in the same hosted zone or in different hosted zones by using the same traffic policy.

    When you create a policy record, Amazon Route 53 creates a tree of resource record sets. The root resource record set appears in the list of resource record sets for your hosted zone. The root resource record set has the DNS name that you specified when you created the policy record. Amazon Route 53 also creates resource record sets for the entire rest of the tree, but it hides them from the list of resource record sets for your hosted zone.

  3. When a user browses to www.example.com, Amazon Route 53 responds to the query based on the configuration in the traffic policy that you used to create the policy record.