|« PreviousNext »|
|Did this page help you? Yes | No | Tell us about it...|
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. Amazon 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 Amazon 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. Amazon 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 Amazon 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 Amazon Route 53 name server. Amazon 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, Amazon 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, Amazon Route 53 responds with the IP address of your load balancer in the Amazon EC2 data center in Singapore.
Latency between hosts on the Internet can change over time as a result of changes in network connectivity and routing. Amazon 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 Amazon Route 53 supports except NS or SOA. For information about supported record types, see Supported DNS Resource Record Types.
To create latency resource record sets, perform the following steps:
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 Amazon 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.
We recommend that you assign Elastic IP addresses to your Amazon EC2 instances to ensure that the IP addresses don't change.
Create latency resource record sets in your hosted zone. The procedures in this chapter explain how to create latency resource record sets for the most common use cases, Elastic Load Balancing load balancers and Amazon EC2 instances that are associated with Elastic IP addresses. For information about how to create latency resource record sets using the Amazon Route 53 API, see POST ChangeResourceRecordSets in the Amazon Route 53 API Reference.