From 2d657f40ebd697e4332c95d7a57bbb292ff46012 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Thu, 24 Sep 2026 00:10:41 +0200 Subject: fix(hub): offer ceilings that bound a member without failing an ordinary one MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A phone on 4G found one of five groups missing from Search on half its visits, and all but one on a fifth of them. Every offer that reached the node was answered in about a second; the hub refused the others with 429 — 93 of them in half an hour on meshbay.org, all from that phone, all to nodes that were up. Two ceilings did it. Three pending offers per account was exactly what one Search page dialled at once, so the first tile or reconnection beside the sweep was refused. Thirty offers a minute per address and per node was spent by four or five reloads of a page whose groups share one node. Sized now against an account with twenty groups on three devices: - 32 offers pending per account, across devices and nodes. - A budget per account and per node, a burst of 120 refilled at two a second. This is what bounds a member's cost to one machine (H6), and it leaves their other nodes alone. Counted by account, because a mobile carrier puts many subscribers behind one IPv4 address. - 600 a minute per address and per node, as a coarse guard in front of authentication only. Both refusals carry Retry-After, which the browser now honours. The node's own ceiling on peer sessions is unchanged; its comment no longer quotes the old per-account number. Co-Authored-By: Claude Opus 5.5 --- packages/meshbay-node/src/meshbay_node/transport/webrtc_server.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'packages/meshbay-node/src') diff --git a/packages/meshbay-node/src/meshbay_node/transport/webrtc_server.py b/packages/meshbay-node/src/meshbay_node/transport/webrtc_server.py index b7c8c92..b877e4d 100644 --- a/packages/meshbay-node/src/meshbay_node/transport/webrtc_server.py +++ b/packages/meshbay-node/src/meshbay_node/transport/webrtc_server.py @@ -7309,8 +7309,9 @@ class WebRTCTransport: ) # Before anything is allocated. Every offer costs an RTCPeerConnection # with its own DTLS and SCTP stacks, and nothing here used to bound how - # many a node would hold: the hub caps three in flight *per account*, - # which is a limit on each caller and not on this machine, so the cost + # many a node would hold: the hub meters offers *per account* + # (signaling.py), which is a limit on each caller and not on this + # machine, so the cost # grew with the number of members in the group. An operator's node must # not be exhaustible by the people they invited. if len(self._sessions) >= MAX_PEER_SESSIONS: -- cgit v1.2.3