How does AWS Route 53 achieve latency based routing?

落花浮王杯 提交于 2021-01-28 22:16:12

问题


AWS Route 53 can provide latency based routing policy (see latency routing policy from AWS Route 53.

But I am wondering how Route 53 knows the latency between my laptop (client) and the server endpoint accurately.

Did AWS publish it's mechanism to provide this feature? Should I trust it with 100% faith or it simply a best-guess based?


回答1:


Once you're sending a DNS query, it's too late for the service to try to "triangulate" you, as it were, and actually measure the latency to you. That isn't what happens.

It's also impractical to locate "you" at all, because it's not "you" that's querying Route 53 -- it's your DNS recursive resolver, usually operated by your ISP or a resolver provided by a recursive DNS provider like Google (8.8.8.8) or OpenDNS.

Route 53 supports the edns-client-subnet extension, where the resolver (which must also support it for this part to work) forwards a masked version of your IP address, so that the authoritative server (Route 53) has approximately, but not exactly, your address. If for example, your IP address were 203.0.113.20, the resolver would send something resembling 203.0.xxx.xxx (an oversimplification, but that's the idea -- adjacent IP addresses, more likely than not, will be geographically proximate). This information is used to come up with an optimal response. If your resolver doesn't support EDNS, the location of the resolver is used, instead of the potentially more accurate truncated representation of your IP address.

Like all IP-based geolocation, this is not an exact science -- it's a best guess, based on a lookup from a geolocation database that Route 53 maintains, of the global IP address space and the closest AWS region to each block of addresses -- not necessarily physically closest in great circle or air-line distance, but closest based on the topology of the most likely routes for traffic to take, on the Internet.

How did they build that database? That part isn't documented, of course.




回答2:


Two videos given by AWS employees which touch on this topic:

  • https://youtu.be/PVBC1gb78r8?t=1963
  • https://youtu.be/PcoQY82SDHw?t=622

Short summary: they gather latency measurements to AWS regions from users who visit Amazon websites.



来源:https://stackoverflow.com/questions/40668306/how-does-aws-route-53-achieve-latency-based-routing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!