@kurt Thanks for checking in. I haven’t been able to get anything working that I would be comfortable putting my name on. I am questioning if it’s possible do this with better than continent-level accuracy.
Going into the project I made a few assumptions:
- Data travels at the speed of light. That means 1ms of ping time represents roughly 186.28 miles. For reference, 140ms of light speed is about the circumference of the earth.
- The internet doesn’t travel in a straight line, but with no good way to overcome that issue, I’d just code like it did.
- Similarly, nothing can be done about the speed of last mile connections, so I’ll pretend they don’t exist. (Cable, Cellular, Satellite, etc. introduce more delay and/or don’t move at the speed of light.)
- Undersea transit would be problematic, so 3+ POPs would be needed per continent if this were ever deployed to production.
- Latency should only be measured in one direction, server → client OR client → server, which ever is fastest after several tests.
- The system must account for differences in clock time.
Still, this doesn’t seem to be enough to overcome server load, cellular connections, WiFi, last mile ISP connections, server response times, or whatever else is happening. The fastest I could ever ping my own router was .91ms, but regularly saw ping times of 3-10ms. My router is ~3 feet from my computer, not 169.4 miles away.
Similarly, trying to test against CloudFlare and Google, both probably having multiple datacenters within the SoCal region my house is in, resulted in pings of about 15ms at best. Assuming one direction is 7.5ms, that puts them over 1300 miles away. That’s represents a huge chunk of the continental US, when it should be about 100 miles.
The only way I see this maybe working is going outside of real world use cases. Hard wire a computer to a fiber ISP, ensure the system firewall is disabled, remove any system local processes that might add latency or processing delay, connect to a nearby bare metal machine without any kind of virtualization/load balancing/CDN/firewall/etc.
Alternatively, with enough testing, perhaps a better metric than the speed of light can be found for host fast data moves on the internet.
If someone else has other ideas to make this work, I’m happy to yield the project to them. Our AC broke last week, it’s been 90+ outside, and we’re going into another heat wave, so I don’t see myself spending much time on this or making any progress.