Development discussion of WireGuard
 help / color / mirror / Atom feed
* WireGuard and distributed hashtables
@ 2019-02-28 19:12 zrm
  0 siblings, 0 replies; only message in thread
From: zrm @ 2019-02-28 19:12 UTC (permalink / raw)
  To: wireguard

Distributed hashtables use overlay routing networks that typically have 
between dozens and thousands of peers per node. Suppose it's 480 peers. 
Then a node might forward a message between two peers once a minute or 
so (using of 2/480), but the mean time between use of a given peer link 
could be an hour or more.

Now consider the WireGuard rekey-after time if DHT peer links are via 
WireGuard. If keepalives are used so that an active key is always 
available then a 120 second rekey interval with 480 peers has you doing 
four rekeys per second despite mostly-idle peers. We'd have to measure 
in rekeys per message rather than messages per rekey and have a lot of 
idle chatter.

But not having active keys would _triple_ the DHT request latency. 
Instead of a message from A -> B -> C, you get a handshake initiation 
from A -> B, handshake response from B -> A, and finally the message 
from A -> B, which then causes B to need a handshake with C.

The rekey time is fixed by the protocol.

If I was going to suggest a protocol change, what might help is to have 
longer and shorter rekey-after/reject-after times and the long timeout 
starts at handshake whereas the short timeout starts at the first 
non-keepalive transport data message. Then a peer purposely kept active 
with keepalives without any real traffic wouldn't have to be rekeyed so 
often.

The question is, can anyone see a good solution to this that doesn't 
involve a protocol modification?
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-03-01 10:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-28 19:12 WireGuard and distributed hashtables zrm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).