feat(router): live mux control (mode/cap/width) + goodput weighted-ramp - #4234
Merged
Conversation
…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.
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.
Makes the inverse-mux tunable at RUNTIME so aggregation tuning no longer needs a rebuild+deploy per change — the router already re-applies
SetMuxModeto 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 (besidesauto/equal); applies to running route groups instantly.proxy mux cap <n>/proxy mux width <n>—adaptCap(active-leg ceiling) andadaptRevActive(steady active width) are now runtime atomics withSetMuxCap/SetMuxWidthRPCs. 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):
auto→capacity(goodput thin-spread; a slow leg carries little and can’t stall the reorder frontier).rebuildWeightszeroes 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
SA9010lint inSetMinHops. Preset tests pin the old cap/floor where they assert the old mechanics. Developed with AI assistance (Claude).