magic-wormhole-transit-relay icon indicating copy to clipboard operation
magic-wormhole-transit-relay copied to clipboard

collect very coarse client location in usage DB

Open warner opened this issue 6 years ago • 1 comments

For the same reasons as warner/magic-wormhole-mailbox-server#7, I'm thinking of running the client IP address through the MaxMind geolocation DB and recording the country code in the Usage DB. The idea is to figure out (very roughly) where the relay traffic is coming from and use that to decide where to place the relay, to reduce user latency.

The current Transit Relay runs on a Linode box, probably in texas (I just picked the default), but if traffic increases and I want to find a cheaper option, I might move it to a Scaleway box. These are ARM servers with fairly slow CPUs (which we don't really need for the transit relay anyways), and unmetered bandwidth, but they're also based in Europe. Before making that switch, I'd want to get a sense for how much it might slow people down.

I don't think the transit phase of the file-transfer protocol is too latency-sensitive: it's TCP, so it'll fill the pipe as best it can, it might just take an extra few seconds to ramp up the window size to max capacity. But it could add an extra second to a relay-assisted transfer, if the connection-establishment packets take longer to get delivered.

warner avatar Apr 04 '18 00:04 warner