Virtualize broker TCP ports - #1150
Open
Weidong Cui (wdcui) wants to merge 5 commits into
Open
Conversation
Give each broker session its own guest TCP port namespace, keep Linux backend endpoints private, route session-local connections through translated host tuples, and add explicit host-to-guest TCP port mappings with reserved endpoint lifecycle handling. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Bound pending peer translations to live guest-routed connections, retire them with their listener, and preserve exclusive mapped endpoint ownership while clearing stale listener queues. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Clear session-local mapped routes when listeners stop, and remove pending peer translations after confirmed connect failure or abortive connector close without changing graceful close-before-accept behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Move publication declarations, guest-port reservation, claim ownership, and listener generations into broker core while keeping Linux endpoint realization in the platform provider. 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 each broker session an independent guest TCP port namespace, keeps Linux backend endpoints private, and translates session-local TCP connections and accepted peer addresses.
It also establishes the portable TCP publication split: broker core owns publication declarations, reserved guest ports, cross-session claim ownership, monotonic listener generations, and RAII release; the Linux platform owns external endpoint reservation, descriptor realization, epoll integration, stale-connection draining, and tuple translation. Exact claim tokens are retained through listen rollback and teardown so stale generations cannot detach newer listeners.
Production configuration now builds core
TcpPortPublicationdeclarations and passes them toLinuxSocketProvider::new_with_tcp_port_publications; UDP remains directly host-backed and the broker protocol version is unchanged.