Ping the world
I just pinged a few million random IP addresses from my apartment in NYC. Here's the result:
- What's going on with Sweden? Too much torrenting?
- Ireland is likewise super slow, but not Northern Ireland
- Eastern Ukraine is also super slow, maybe not surprising given current events.
- Toronto seems screwed too, as well as part of NH and western PA.
- Russia has fast internet.
Some more notes on methodology
- The source code is here.
- It's based on a 50 nearest neighbor average with the top 10% outliers removed.
- Almost all random pings time out, so this is skewed towards the few (<10%) of hosts that actually respond
- Some gaps of the map are filled out too much from neighbors. Eg. North Korea.
- When computing nearest neighbors it's much easier if you convert everything to 3D vectors first. I used Annoy in 3D for nearest neighbors. Annoy is a Python module (written by me) that does fast approximate nearest neighbors using random projections.
- Basemap is kind of a pain in the ass to install and mess around with, but gives nice plots.
- I was pinging using subprocess from Python and threads. Really want to give Go a shot on this as a way to learn it.