Determining lowest latency AWS location for custom usage
The smart and innovative folks from TurnKey Linux recently open sourced their solution to your problem, see AWS Regional Data Centers mapping on GitHub:
This project is used to generate the indexes (and visual map for
reference) used by the TurnKey Hub to find the closest AWS data center
for a user. [emphasis mine]
The algorithm in use is further detailed in Finding the closest data center using GeoIP and indexing as well as the follow up post Finding the closest APT package archive using GeoIP and indexing.
While a bit of a gimmick, the visualization is seriously cool and confirms resp. illustrates the reason for the at first sight surprising fact Josh mentioned already, namely that users in Australia currently tend to get better latency via the US West (Northern California / us-west-1) rather than the Asia Pacific (Singapore / ap-southeast-1) region. (Tip: checking Future Cables at the bottom right corner reveals this is likely going to change, which is further detailed in Greg's Cable Map, which indicates Australia might jump between both AWS locations latency wise in the years to come ;)
Using lowest latency AWS location automatically via Amazon Route 53
Meanwhile AWS is providing a helpful map illustrating their Global Infrastructure for a quick assessment, alongside respective details like e.g. number of availability zones and the API endpoint.
More importantly though, AWS has just announced the geographic DNS support Jahufar mentioned already, see the introductory post Multi-Region Latency Based Routing now Available for AWS, which is making available the same latency based routing technology that powers Amazon CloudFront to users of Amazon EC2, Elastic Load Balancing, and more.
So in case your environment is comprised of an Auto Scaling EC2 Instances architecture already, simply applying this latency based routing should solve your problem automatically.
While the use case obviously targets offerings spawning multiple AWS regions, the sophisticated features around Latency Based Routing and Weighted Round Robin Record Sets might allow you to determine the desired information more easily yourself as well.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…