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

Using Latency and Weighted Resource Record Sets in Amazon Route 53 to Route Traffic to Multiple Amazon EC2 Instances in a Region

If your application is running on Amazon EC2 instances in two or more Amazon EC2 regions, and if you have more than one Amazon EC2 instance in one or more regions, you can use latency-based routing to route traffic to the correct region and then use weighted resource record sets to route traffic to instances within the region based on weights that you specify.

For example, suppose you have three Amazon EC2 instances with Elastic IP addresses in the US East (Ohio) region and you want to distribute requests across all three IPs evenly for users for whom US East (Ohio) is the appropriate region. Just one Amazon EC2 instance is sufficient in the other regions, although you can apply the same technique to many regions at once.

To use latency and weighted resource record sets in Amazon Route 53 to route traffic to multiple Amazon EC2 instances in a region

  1. Create a group of weighted resource record sets for the Amazon EC2 instances in the region. Note the following:

    • Give each weighted resource record set the same value for Name (for example, us-east.example.com) and Type.

    • For Value, specify the value of one of the Elastic IP addresses.

    • If you want to weight the Amazon EC2 instances equally, specify the same value for Weight.

    • Specify a unique value for Set ID for each resource record set.

  2. If you have multiple Amazon EC2 instances in other regions, repeat Step 1 for the other regions. Specify a different value for Name in each region.

  3. For each region in which you have multiple Amazon EC2 instances (for example, US East (Ohio)), create a latency alias resource record set. For the value of Alias Target, specify the value of the Name field (for example, us-east.example.com) that you assigned to the weighted resource record sets in that region.

  4. For each region in which you have one Amazon EC2 instance, create a latency resource record set. For the value of Name, specify the same value that you specified for the latency alias resource record sets that you created in Step 3. For Value, specify the Elastic IP address of the Amazon EC2 instance in that region.

For more information about creating resource record sets, see Creating Resource Record Sets by Using the Amazon Route 53 Console.