Share broker TCP namespace - #1167
Merged
Weidong Cui (wdcui) merged 14 commits intoAug 15, 2026
Merged
Conversation
Give all broker sessions one guest TCP port namespace, route guest connections through private Linux endpoints, and translate accepted peers back to guest addresses. Bound pending connection and retained connector state across socket and session teardown. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Retire platform authority while the guest-port reservation is still held when bind echoes an untrusted address, then leave the core socket terminal. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Give descriptor-free discard markers a bounded lifetime after session teardown so abandoned listeners cannot permanently consume the broker-wide pending-connection budget. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Rename mixed Linux socket state to make its reactor ownership explicit while leaving the portable namespace redesign for a focused follow-up. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Keep allocation, validation, and insertion in one operation and derive the binding key from its guest address. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Document why pending connection metadata is bounded independently from live and retained socket descriptors. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Name reactor-wide and per-session retained connector counts explicitly as counters. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Name the live socket and pending guest connection fields explicitly as per-session counters. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Release abortively closed connector descriptors immediately while retaining deadline-bound fail-closed metadata. Limit unmatched accepts per command so private-endpoint traffic cannot monopolize the reactor, and preserve edge-triggered readiness for retry. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Synchronously retire platform authority for indeterminate or invalid TCP connect results, make duplicate guest-port reservation attachment fail closed, and document bind and accepted-peer platform contracts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Reject ambiguous native tuple reuse, gate routes until stale listener backlogs are drained, and preserve listener cleanup after partial shutdown failures. Exclude the unsupported published-server benchmark until TCP publication lands. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Force readiness republication when unmatched accepts yield so edge-triggered listeners continue making progress. Keep StopListening core and platform state consistent when terminal readiness publication fails. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Track Linux native connection transitions explicitly so teardown no longer infers lifecycle with getpeername. Preserve late accept identity with bounded keyed and tuple-unknown discard protection while retaining ordinary close semantics after accept. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Weidong Cui (wdcui)
force-pushed
the
wdcui/ulitebox/broker-tcp-namespace
branch
from
August 15, 2026 01:40
cd5f7f7 to
e4e2ee1
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
|
🤖 SemverChecks 🤖 Click for details |
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.
This PR gives all broker sessions one shared guest TCP namespace by moving guest TCP port reservation and ephemeral allocation into broker core and routing guest-to-guest connections through private Linux endpoints with guest-visible accept translation. It adds platform-owned TCP lifecycle tracking, bounded pending and stale-connection state, retained connector accounting, backlog-drain safeguards, and blocking-accept readiness coverage, and updates the Linux runner TCP server integration to use the shared namespace.