aboutsummaryrefslogtreecommitdiffstats
path: root/docs/transports.md
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-12-01 13:19:32 +0000
committertv <tv@krebsco.de>2026-12-01 13:19:32 +0000
commit6d3dbcb129b67152c89bbbe2a7dad98b071bf838 (patch)
tree8f92769b83f802950e0cc0b42be89653c74b2037 /docs/transports.md
parent82bb426dcd22268a960d35d7b8c947b864a6ddf5 (diff)
Two options for a node on a machine that should idle
--libp2p-ping-interval: how often libp2p pings each open connection, 15 s unless given, 0 for once as it opens. The pings keep no connection open and close none; continuum takes each connection's round trip from them, to keep the fastest of several to one peer. --worker-threads: how many threads take the node's work in turns, as many as the machine has cores unless given. The runtime is built from the configuration, so the count is set as the node starts. Each wakes the node's threads less often; docs/operations.md, An idle node, says what to choose, and what was measured.
Diffstat (limited to 'docs/transports.md')
-rw-r--r--docs/transports.md27
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/transports.md b/docs/transports.md
index 2b1b07e..b3a01b7 100644
--- a/docs/transports.md
+++ b/docs/transports.md
@@ -244,6 +244,33 @@ traffic for long. It also makes the node's peer ID and addresses known to the DH
to anyone. Without it, nothing public is used. (For Mycelium, public peers are in
`--mycelium-peers`: none unless given.)
+### Pings
+
+libp2p pings every open connection, once as it opens and then every
+`--libp2p-ping-interval` (15 s unless given; `0` for never again). continuum uses the
+pings for one thing: the round trip of each connection, by which it keeps the fastest
+of several to one peer, the shortest each measured counting. They keep no connection
+open and close none: a connection nobody uses for five minutes, or for three
+`--keepalive` intervals where that is longer, is closed whatever was pinged, and whether a
+peer answers is told by continuum's own keepalives, on whatever transport. Other
+libp2p nodes' pings are answered whatever the interval.
+
+So a longer interval, or none, costs only how well a connection's round trip is known
+after its first ping: a first ping that came back late (a busy moment) is not put
+right by a later one, and the slower of two connections may be kept. What it spares
+is a wakeup of the node per connection and interval, and over TCP the pings of the
+stream multiplexer (Yamux), which measures its own round trip only while a connection
+is used. QUIC keeps its connections open by itself, every few seconds, whatever this
+says.
+
+* **Leave it at 15 s** where round trips matter and vary: nodes with several paths to
+ each other of different speed (a LAN and a relay, ethernet and WLAN) that come and
+ go.
+* **A few minutes** (`5m`) is a middle: the round trip is put right within that time.
+* **`0`** on nodes that reach each other one way (servers at fixed addresses), and
+ wherever a machine should be left idle
+ ([`operations.md`](operations.md), [An idle node](operations.md#an-idle-node)).
+
### On the LAN
With `--libp2p-mdns`, a node finds libp2p peers on its LAN (multicast DNS, IPv4): it