allmende-conns -relay: the relay holds 128 reservations of 200 asked, 67 MB; measured and documented
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
This commit is contained in:
+17
-2
@@ -749,8 +749,23 @@ Findings (see "What is left" in SPECS.md for the open ones):
|
||||
peaked at 174 MB, a third of the pod limit. About a minute after the
|
||||
connections were opened the node's connection manager closed most of the
|
||||
idle ones (970 connected, 154 left after 2.5 minutes) once real nodes had
|
||||
joined, which is its job at the high-water mark. Relayed streams were not
|
||||
tried (they need a node behind a NAT).
|
||||
joined, which is its job at the high-water mark.
|
||||
|
||||
**As a relay** (`allmende-conns -relay`, 200 clients that count themselves
|
||||
unreachable, each on its own loopback address, take a reservation on one
|
||||
`--public` node; a prober then dials each through the relay and exchanges
|
||||
four bytes, all circuits kept open): the node held **128** reservations,
|
||||
exactly libp2p's default `MaxReservations`, and refused the other 72
|
||||
(`NO_RESERVATION`). Memory went from 39 MB idle to 67 MB with the 200
|
||||
connections and 128 open circuits (about 140 KB each), so the relay is
|
||||
bounded by that cap, not by memory. Other defaults that matter: 8
|
||||
reservations per source address, 16 open circuits per peer, and a relayed
|
||||
connection is cut after 2 minutes or 128 KB each way, so a relay is for
|
||||
getting in touch and for hole punching, not for carrying listings. Nodes
|
||||
behind a NAT still gossip and sync over their own outbound connections;
|
||||
what the 129th loses is being reachable from other NAT'd nodes through
|
||||
this relay. With one public node, at most 128 NAT'd nodes at a time can
|
||||
have a relay. (A real NAT, with hole punching, was not tested.)
|
||||
|
||||
The run also found a slow spot, not in the serving node but in the
|
||||
newcomer: a catch-up is cut off after 2 minutes (`syncTimeout`), and with
|
||||
|
||||
Reference in New Issue
Block a user