Repository navigation
feat(webrtc): raise browser listener limits, and ADR-0023 for hot reads and full-session refusal - #250
Open
mickvandijke wants to merge 5 commits into
Open
feat(webrtc): raise browser listener limits, and ADR-0023 for hot reads and full-session refusal#250mickvandijke wants to merge 5 commits into
mickvandijke wants to merge 5 commits into
Conversation
…essions Records why every client read a popular record from one holder, why a full node looked unreachable for 30 minutes, and the decision to spread first reads across the close group and answer capacity refusals with a STUN error. Amends ADR-0015's capacity-rejection rule and includes Chromium/WebKit measurements. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A transport refusal requires that ICE never connected; DTLS failures, authentication failures and client-initiated closes keep the 30-minute cooldown, and a full failure cache evicts the soonest-expiring record. - Record two trade-offs: a browser replacing its own association can hit its source quota, and only the admitting request is refused. - Update the real-browser measurements to the final client build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Spreading applies to chunk reads (pointer reads already ask the whole close group); known-peer fallbacks keep nearest-first; shutdown attempts stay silent; precise eviction and ICE-state wording; application-level closes from old nodes also get 15 s; admission tests listed under their module. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mickvandijke
marked this pull request as ready for review
October 12, 2026 16:18
2 of 7 tasks
Browser sessions go from 32 to 256, the transport's ceiling. Channels follow sessions (32 to 256), and request slots keep their one-per-two-sessions ratio (16 to 128): the PQ handshake and every request take a request slot, so more sessions without more slots would close their channels instead. The per-IP quota, rate buckets and in-flight byte budgets are unchanged, so frame and response memory stays bounded as before. ADR-0023 records the change and asks the network A/B to measure the per-session cost. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The testnet A/B showed browsers hold 1.4 channels per session at the median and 1.9 at p90, so channel slots ran out before session slots: the old 32 channels filled at 18-23 sessions, and with 256 sessions, 256 channels and 128 request slots both filled at 194 sessions under 192 browsers, closing about 2,300 channels a round. At 512 channels and 512 request slots no channel or request was rejected and all 768 downloads completed, at the same node memory (268 vs 271 MiB peak). ADR-0023 records the network A/B: at 64 synchronised browsers, today's limits completed 61-66% of downloads, all failures being false "record not found", and the new limits completed all of them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ADR-0023 covers what happens when thousands of browsers want the same chunks, for example everyone watching the same film, and what we change first. This PR also raises the browser listener's session limits.
Findings it records
Decision
Refused, with a 15 s cooldown instead of 30 minutes.Each of the following needs its own ADR, and all are deferred:
Implementation PRs
Linear issue
Closes V2-1508
Risk tier
Compatibility
--configfile sets them keeps its values. The new defaults satisfy every startup invariant: per-IP sessions × channels per session = 8, which is below both 512 channels and 512 requests.Semver impact
Test evidence
cargo test --lib -- web_rtc config: 108 passed. This includes the test that checks the default config satisfies the listener's invariants.cargo clippy --all-features --lib -- -D clippy::panic -D clippy::unwrap_used -D clippy::expect_used: clean.cargo fmt --check: clean.python3 scripts/adr-governance.py: passed (19 ADR files).New dependency
none
ADR
This PR adds ADR-0023 (Proposed).
Mitigation / rollback
Revert the commits, or have operators set
max_connections,max_channelsandmax_concurrent_requestsin[webrtc_direct]of their--configfile to the old values.🤖 Generated with Claude Code