AWS data center latencies, visualized
benjdd.com
benjdd.com
I raise this because I've been in multiple system architecture meetings where people were complaining about latency between data centers, only to later realize that it was pretty close to what is theoretically possible in the first place.
Obviously it's theoretically possible to do ~40% better by using hollow fibers and as-the-crow-flies fiber routing, but few are willing to pay for that.
(i) a series of overground direct microwave connections (often used by trading firms)
(ii) a series of laser links between low altitude satellites. This would be faster in principle for long distances, and presumably Starlink will eventually offer this service to people that are very latency sensitive
The comparison is against radio and hollow-core fiber, not conventional fiber.
For trading applications, people will absolutely pay for a service that is hard down 75% of the time and has 50% packet loss the rest, but saves a millisecond over the fastest reliable line. Because otherwise someone else will be faster than you when the service is working.
They can get reliability and consistency with a redundant slower line.
Someone more familiar with Shannon than I could probably quickly back-of-the-napkin this.
There are thousands of such opportunities each second - they can come from consumer 'order flow' - ie. information that someone would like to buy a stock tells you the price will slightly rise, so go buy ahead of them and sell after them in some remote location.
https://www.latimes.com/business/la-fi-high-speed-trading-20...
https://arstechnica.com/information-technology/2016/11/priva...
https://en.wikipedia.org/wiki/TD-2#Reemergence
I'm not sure about the high packet loss statement, but it wouldn't suprise me that it's true if the latency is lower enough to get to take advantage of arbitrage opportunities often enough to justify the cost.
Satellites in geostationary orbit are a (very common) thing.
Light in fiber optic cable travels roughly 70% of the speed of light ~210,000 km/s Earth's circumferences is ~40,000 kilometers. Direct route from the other side of Earth to another would be roughly 100 milliseconds, round trip 200 ms.
I think it's just too damn expensive for your average webapp to cut out ten milliseconds from backend latency.
[0] https://github.com/mda590/cloudping.co/blob/8918ee8d7e632765...
but you're right
ICMP ECHO would be a bad choice as it is deprioritized by routers[0].
[0] https://archive.nanog.org/sites/default/files/traceroute-201...
This is not an uncommon scenario. My current employer specializes in SAP migrations to cloud and this is now a conversation we have with both AWS & GCP networking specialists when pricing & scoping projects... after having made incorrect assumptions and being bitten by unacceptable latency in the past.
This affects about 8% of male population btw, maybe you can add a color-blind mode, very nice visualization otherwise!
My comment was meant to raise awareness of this issue with the author of the tool. Many video games, especially the ones with some kind of HUD, minimap, etc. these days have a color-blind mode.
But I was curious if one needs to rely on the application developers to deliver a solution or if there was a generalized filter or whatever that would work always. Maybe like screen readers, those work fine if the app does not do something horrible. But with some help from apps, they perform much better.
I started putting myself in the shoes of a family member who is in the 8% and now i spend more time trying to pick better color schemes
https://gist.github.com/aclarknexient/c39c83f2f97c3c6b1c307c...
Tested with uBlock Origin on Firefox Mobile.
Disco mode!
(better to use requestAnimationFrame but I'm lazy atm)
let i = 0;
function bump() {
document.body.style.filter=`hue-rotate(${i+=2}deg)`, 16;
requestAnimationFrame(bump);
}
requestAnimationFrame(bump);Maybe we should be less critical specially with "Make it fit for my workflow" type comment, and more so if it is built by some random guy in their free time, and not say a project which is asking money.
Specially HN crowd is very susceptible to feeling for accessibility comment. Return of "think of poor kids in Africa".
This wasn't posted with that directive.
And if your "design is great" but your implementation sucks then maybe the design sucks too.
Color blindness is nothing new, there are freely available color blind friendly color plates. Pointing out to the author that they could make a small tweak to make their work more accessible is good feedback and should continue to be given.
Those are becoming somewhat more prevalent these days.
Also it‘s common to hide this „colorblind mode“ behind a checkbox somewhere. So you don’t have to uglify your product. :-)
https://venngage.com/tools/accessible-color-palette-generato... also seems nifty
While not overly surprising, it was very consistent.
Edit: I think it was actually 155
EDIT: mostly, probably, sort of.
Is the math-planation of your random fact basically
(thanks to https://news.ycombinator.com/user?id=Hikikomori for correcting the lightspeed in fibre medium from 3e5 to 2e5 !)
- lightspeed is 2e5 km/s ~ 2e2 km/ms, so/
- length (km) / 200 (km)/ms ~ K length (km) / 200 (km)/ms, so
- latency (ms) ~ K' length (km)
Where K is approximately 1.3 (K' is 1/155) and factors in things like:
- non straight line distance
- networking overhead / switching
- both ways / measurement error
Basically?
1/2 c ~ 150 km/ms in circuit board.
1/3 c ~ 100 km/ms in cable. And...
2/3 c ~ 200 km/ms in fiber?
I'm a bit confused about difference between cable and fiber heh :)
"Through LabVIEW the speed of light in the optical fiber is calculated to be ~ 2.054 x 108 m/s corresponding to a refractive index of n ≈ 1.4606 which is a typical value" https://web.phys.ksu.edu/posters/2009/juma-Adv-Lab-S09.pdf
Within these regions there's a lot of variation from zone to zone, so the methodology matters.
Bonus: select the nearest data center based on the user’s IP :)
Perhaps if you selected a datacenter, and it switched to a 2-d projection with that datacenter at the center of the map, it would be better?
Or perhaps augment the visualization with a table?
(One of several options, though the best IMO.)
https://docs.aws.amazon.com/network-manager/latest/infrastru...
AWS also provides dashboards that shows what regions/services are down, and history tells us those are not to be trusted for precisely the same reasons.
There's some comments here also wondering about the best possible latency for speed of light vs what these measurements are. The problem with this is that c isn't the propagation velocity of information through fiber, it's some velocity well under c and depends on a number of different factors, many of which are unknowable, such as repeater latency and so on. In practice, the best theoretical value is no higher than 70% of c just measuring the velocity of light in a medium as c measures light in a vacuum.
The reason I know is because I worked on a project that required latency to be under 30ms between datacenters, and we had to use eu-west-1 (Ireland) and eu-south-2.
Turns out that latency is closer to 42ms, mainly because there are no undersea cables between Ireland and the continent (they only go to England, then they have to route across England to get to a cable to the content).
At the bottom of the page it says: «Data scraped from CloudPing», with the CloudPing dataset linked through. If you click through to CloudPing, you won't find «eu-south-2» in the dataset.
https://www.submarinecablemap.com
This will show you everything connected to Ireland:
https://en.wikipedia.org/wiki/Azimuthal_equidistant_projecti...
Are there an examples of regions which dramatically violate the triangle equality? (That is, where the A--C latency is much worse than the best A--B + B--C latencies)?
Just as a curiosity, could you use that idea to "infer" which data-centers are most likely directly connected by fiber, and show only the likely fiber connections?
It's highly unlikely there are any non-disclosed undersea ones since they cost rather a lot to lay down.
Going back decades when a billion US was real money the original NSA (No Such Agency) that essentially no one had ever heard of, including most of the US houses and much of the defence committees that had clearance but not that clearance, had a 4 Billion+ budget for "off-book" satellites.
Black cables are a damn sight cheaper than black satellites.
I don't think this would happen at a significant scale, due to how routing works. If taking the "detour" through B is how the ICMP packets get there cheapest, that's the path they will go.
If anything, we could look at where A–C is nearly equal to A–B + B–C and find where such a thing has happened. I suppose it could happen for reasons other than lack of fiber: financially better peering agreements, etc?
Now there are some issues with this methodology (all common issues with ICMP/RTT measurements + traffic was not really routed through the "relay" probe), but such pairs do exist.
[1] https://theses.hal.science/tel-03666771/document (see page 84 for an example; if you can read French :-))
AFAIK, the latency from Mumbai to southern Russia (not that far in distance) is surprisingly high. Much higher than from e.g. Frankfurt to Moscow. Don’t know if it’s enough to violate the triangle equality between Frankfurt-Moscow-Mumbai.
Anyways, although this looks cool, it'd be much more easily understandable in a 2d map instead of a rotating one.
Of course, it doesn't actually matter since friends don't let friends use AWS.
Geographic proximity isn't the main factor for peering and even if they did your session may still get terminated at a border network gateway in a big city and your traffic has to travel the same way.
This is way outdated now but gives a rough idea: https://wikileaks.org/amazon-atlas/document/AmazonAtlas_v1/A...
Source: did some latency work for a market maker.
I used my own tool Livedocs to visualize the same and here are the results. https://livedocs.com/livedocs/aws-latencies-3f2fefd5-f45d-48...
the "globe" visualization is good ... but we cna only see half the world at a time ... can we have an option of a flat projection as well ... so I can see all latencies for a region at a glance?
ap-south-2 (Asia Pacific - Hyderabad,India) opened in Nov 2022 seems to be missing from the list?
Also what you don't see in things like this, or even a list of datacenter locations, is the relative sizes of the datacenters. After US east/west coasts and Europe, datacenter capacity rapidly tails off. Parts of Asia have plenty but not on the same scale I believe (although I don't know about the Chinese market). The difference in size can be quite a few orders of magnitude between different regions.
My best guess is that it is a combination lower demand (vs rest of world), and infrastructure availability (connectivity + power).
I can imagine a bunch of secondary factors too, but this to me sounds like the key broad reasons.
I found myself going to CloudPing often enough to make a CLI for it
I think a lot of people are sleeping on the benefits of hosting workloads in these regions. Many finance, banking & insurance companies have already taken advantage. Most of your credit card transactions are handled by data centers that live ~barycentric to the continental US. Much of small US banking tech happens in places like Missouri.
South America and Africa are even worse in that regard. Very few if any direct links.
Close to the network centrality of the of the internet, low latency to both the west coast and Europe.
Most of the Internet is fractured even though technically publically routable. E.g., for someone living in China the US isn't anywhere near "network centrality".
If an internet centrality exists, it is somewhere in France or the Netherlands - usually cross-continent traffic goes through there, they have dedicated interchanges for that.
Data caps are apparently illegal here. This is good for the quality of infrastructure.
And if you have customers somewhere else you want to be in that place, or close to it network-wise.
You are right, the best region that optimises median latency against all internet users over the world is `us-west-3`, which is Paris - I believe. Likely because it has much better latency towards Asia where the majority of internet users are.
I also investigated which two regions to choose for a multi-region setup, which ends up being London and Japan.
Late edit: it would also be cool to see inter-cloud latency.
is it part of some common js lib?