When users access my website, Amazon Route 53 latency-based routing returns the IP address of a server in a region that is far away. For example, if a user in the US tries to access my website, Route 53 responds with a record from a server in Europe. How can I troubleshoot issues with users being routed to suboptimal regions?

Using Amazon Route 53 latency-based routing, you can have identical resources in multiple AWS regions. If a user makes a DNS query when accessing your website, Route 53 responds with an answer based on which region has the lowest latency to the origin of the user's DNS query. However, the region with the lowest latency might not always be the region physically closest to the requesting DNS resolver. For more information, see Latency-based Routing.

Route 53 calculates latency based on:

  • The client's IP address using EDNS0 Client Subnet Option (ECS) contained in the received query (if supported by the client's resolver).
    or
  • The source IP address from which Route 53 received the DNS query.

If the client is not in the same location as the DNS resolver, or they are in the same location but the resolver IP has different location information, you might experience undesired routing behavior. This often happens when the DNS resolver is outside the client's network and is using a different IP address, or the location information for the DNS resolver's IP address is incorrect.

1.    Collect the IP address of the client's DNS resolver:

dig resolver-identity.cloudfront.net

Note: You might need to run this command multiple times to get a list of the DNS resolvers for this client.

2.    If your client's DNS resolver is known to support EDNS0 ECS, collect their IP address:

dig resolver-identity.cloudfront.net

3.    Open the Route 53 console, and choose Hosted zones.

4.    Choose your latency resource record set and choose Test Record Set.

5.    Under Simulate sending DNS request from specific IP address, enter the IP address collected from Step 1.
Note: If your client's DNS resolver does support EDNS0 ECS, choose More Options and enter the IP address collected from Step 2.

6.    Choose Get response and review the Response returned by Route 53 on the right pane to view the routing decision Route 53 made based on the IP information entered. If the response does not match the expected response, proceed to the next section.

Resolver supports EDNS0 ECS

If the client's DNS resolver supports EDNS0 ECS, use IP geolocation tools to identify the location of the client's source IP, which was collected in step 2 of the previous section. The client's source IP is the address used by EDNS0 ECS, and it is the address Route 53 will use to make routing decisions. Based on the client's source IP, latency metrics, and the regions configured in the latency resource record set, the response given by Route 53 might be working as expected because the client's DNS queries are exiting in a different geographic location than the client's location.

Resolver does not support EDNS0 ECS

If the client's DNS resolver does not support EDNS0 ECS, use IP geolocation tools to identify the location of the recursive resolver's source IP address—see step 1 of the Resolution—which is the address used by Route 53 when EDNS0 ECS is not passed. Based on the client's recursive resolver, latency metrics, and the regions configured in the latency resource record set, the response given by Route 53 might be working as expected because the client's DNS queries are hitting a resolver in a different geographic location than the client's location.


Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center

Published: 2017-09-06