diff options
Diffstat (limited to 'docs/transports.md')
| -rw-r--r-- | docs/transports.md | 27 |
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 |
