Amazon Route 53
Developer Guide (API Version 2012-12-12)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

Creating Latency Resource Record Sets

If your application is hosted on Amazon EC2 instances in multiple EC2 regions, you can reduce latency for your end users by serving their requests from the EC2 region for which network latency is lowest. Route 53 latency-based routing lets you use DNS to route end-user requests to the EC2 region that will give your users the fastest response.

To use latency-based routing, you create a latency resource record set for the EC2 resource in each region that hosts your application. When Route 53 receives a query for the corresponding domain, it selects the latency resource record set for the EC2 region that gives the end user the lowest latency. Route 53 then responds with the value associated with that resource record set.

For example, suppose you have Elastic Load Balancing load balancers in the US West (Oregon) region and in the Asia Pacific (Singapore) region and that you've created a latency resource record set in Route 53 for each load balancer. An end user in London enters the name of your domain in a browser, and the Domain Name System routes your request to a Route 53 name server. Route 53 refers to its data on latency between London and the Singapore region and between London and the Oregon region. If latency is lower between London and the Oregon region, Route 53 responds to the end user's request with the IP address of your load balancer in the Amazon EC2 data center in Oregon. If latency is lower between London and the Singapore region, Route 53 responds with the IP address of your load balancer in the Amazon EC2 data center in Singapore.

Routing queries from London to Oregon or Singapore based on latency.

Latency between hosts on the Internet can change over time as a result of changes in network connectivity and routing. Route 53's latency-based routing is based on latency measurements performed over a period of time, and the measurements reflect these changes. For example, if you have load balancers in the Oregon and San Francisco EC2 regions, an end-user request that is routed to the Oregon region this week might be routed to the San Francisco region next week if latency from the end user to the San Francisco region improves.

You can create latency resource record sets for:

  • Amazon EC2 instances, with or without Elastic IP addresses.

  • Elastic Load Balancing load balancers, which balance traffic for Amazon EC2 instances.

You can also create latency resource record sets using any record type that Route 53 supports except NS or SOA. For information about supported record types, see Supported DNS Resource Record Types.

Creating latency resource record sets involves four basic steps:

  1. Create the AWS resources for your application:

    • If you want to use Elastic Load Balancing load balancers, create one or more load balancers in each Amazon EC2 region in which you want to run your application. For more information, see User Scenarios in the Elastic Load Balancing Developer Guide.

      The name you specify when you create a load balancer is the name you'll use when you create a latency resource record set in Route 53.

    • If you want to use Amazon EC2 instances, launch one or more Amazon EC2 instances in each Amazon EC2 region in which you want to run your application. For more information, see the Amazon Elastic Compute Cloud Getting Started Guide.

      Note

      We recommend that you assign Elastic IP addresses to your Amazon EC2 instances to ensure that the IP addresses don't change.

  2. Create a Route 53 hosted zone.

    For information about using the Route 53 API, see Making API Requests. For information about calling the Route 53 API using the Route 53 dnscurl.pl utility, see Example: Using dnscurl.pl.

  3. Create latency resource record sets in your hosted zone.

  4. Check the status of your changes.