From: zrm <zrm@trustiosity.com>
To: wireguard@lists.zx2c4.com
Subject: WireGuard and distributed hashtables
Date: Thu, 28 Feb 2019 14:12:32 -0500 [thread overview]
Message-ID: <27136dc1-0cbb-87ad-50b6-35879e581add@trustiosity.com> (raw)
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
reply other threads:[~2019-03-01 10:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=27136dc1-0cbb-87ad-50b6-35879e581add@trustiosity.com \
--to=zrm@trustiosity.com \
--cc=wireguard@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).