Skip to content

feat(router): live mux control (mode/cap/width) + goodput weighted-ramp - #4234

Merged
0pcom merged 3 commits into
skycoin:developfrom
0pcom:feat-mux-live-control
Aug 26, 2026
Merged

feat(router): live mux control (mode/cap/width) + goodput weighted-ramp#4234
0pcom merged 3 commits into
skycoin:developfrom
0pcom:feat-mux-live-control

Conversation

@0pcom

@0pcom 0pcom commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Makes the inverse-mux tunable at RUNTIME so aggregation tuning no longer needs a rebuild+deploy per change — the router already re-applies SetMuxMode to live route groups, this extends that pattern.

Control surface (each is a per-visor send-side decision, so set independently per end, e.g. over the pty):

  • proxy mux mode capacity — goodput-weighted distribution (besides auto/equal); applies to running route groups instantly.
  • proxy mux cap <n> / proxy mux width <n>adaptCap (active-leg ceiling) and adaptRevActive (steady active width) are now runtime atomics with SetMuxCap/SetMuxWidth RPCs. Defaults raised: cap 8→60 (the ~50-60-leg aggregation ceiling), floor 1→4 (more than one active by default).

Weighted-ramp (makes wide spread safe):

  • Adaptive preset default distribution autocapacity (goodput thin-spread; a slow leg carries little and can’t stall the reorder frontier).
  • rebuildWeights zeroes standby legs and gives a just-promoted leg a cold-leg floor share (capacityColdFloorFrac) so it carries a trickle, proves its goodput, and ramps — refreshed on the fast 5s data-progress loop instead of the ~5min keep-alive cadence.

Also fixes a pre-existing SA9010 lint in SetMinHops. Preset tests pin the old cap/floor where they assert the old mechanics. Developed with AI assistance (Claude).

0pcom added 3 commits August 26, 2026 15:12
…mp default [WIP tests]

Real-time routing control so mux tuning no longer needs a rebuild+deploy per
change (the router already re-applies SetMuxMode to live route groups):
- proxy mux mode now accepts 'capacity' (goodput-weighted) besides auto/equal.
- proxy mux cap <n> / width <n>: adaptCap (active ceiling) and adaptRevActive
  (steady active floor) are now runtime atomics with SetAdaptCap/SetAdaptRevActive,
  driven via new SetMuxCap/SetMuxWidth RPCs. Defaults raised: cap 8->60 (the
  ~50-60-leg aggregation ceiling), floor 1->4 (more than one active by default).
- Adaptive preset default distribution auto->capacity (goodput thin-spread).
- rebuildWeights: exclude standby legs (weight 0) + cold-leg FLOOR (a just-promoted
  leg gets capacityColdFloorFrac of the fastest leg so it carries a trickle, proves
  goodput, and ramps — the weighted-ramp) + refreshed on the fast 5s data-progress
  loop instead of the ~5min keep-alive cadence.

Send-side is a per-visor decision, so mode/cap/width are set independently on each
end (e.g. over the pty to the exit). Preset tests still assume the old defaults —
fixed in the follow-up commit.
@0pcom
0pcom merged commit 876e84d into skycoin:develop Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant