Skip to content

Decouple a circuit's xgress from a single router channel #1001

Description

@plorenz

Today a connect-v2 SDK connection binds its xgress to one edge router channel. The wire conn id, mux registration, channel senders and router-assigned xgress address all live on the xgress adapter, and losing that channel closes the xgress.

That coupling blocks two features that both need a circuit to outlive the transport carrying it:

  • SDK rerouting — when the ingress router goes away, reattach the circuit through another router and resume, rather than failing the connection.
  • p2p — carry a circuit over a direct peer-to-peer path, falling back to the fabric path when it is unavailable.

Neither can be built while the xgress can only ever have one transport and dies with it.

Scope

Refactor the xgress data plane so a circuit dispatches over a set of transports:

  • extract router-specific state out of the xgress adapter into a Path abstraction, with an edge-router implementation
  • dispatch through a selector over the attached paths, with a single-path selector preserving current behavior exactly
  • converge receive so payloads arriving on any path reach the one xgress, with per-payload acks returning on the path their payload arrived on
  • decouple transport close from xgress close, so a connection can be held open for a bounded window while a replacement path is attached
  • attribute RTT and loss per path, so a real selector has something to select on
  • generalize edge router capability negotiation so features can filter routers by capability

Single-path behavior must be unchanged: this is groundwork, not a behavior change.

Out of scope

Real selection policy (lowest-RTT, hot-standby, load distribution), send policy when a path cannot accept a payload, per-path congestion control, and the rerouting and p2p features themselves. Those build on this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgoPull requests that update Go code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions