Skip to content

feat(router): ECF predictive mux scheduler (proxy mux mode ecf) - #4240

Merged
0pcom merged 1 commit into
skycoin:developfrom
0pcom:ecf-scheduler
Aug 26, 2026
Merged

feat(router): ECF predictive mux scheduler (proxy mux mode ecf)#4240
0pcom merged 1 commit into
skycoin:developfrom
0pcom:ecf-scheduler

Conversation

@0pcom

@0pcom 0pcom commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Adds WeightModeECF — an Earliest-Completion-First predictive scheduler that holds the next in-order frame off a slower leg when a faster leg will drain the backlog and deliver it sooner. Goodput/latency-weighted spraying keeps assigning a fraction of in-order frames to slow legs, and since the reorder buffer must deliver in order (never skip), each becomes a head-of-line stall — the MPTCP/MP-QUIC result that weighting alone reaches only ~25% of ideal aggregate. ECF is the predictive hold-back that fixes it.

Adapted to skywire’s no-TCP-cwnd model: per-leg cwnd → BDP (rate × RTT); "has capacity" → inflight_bytes < BDP (inflight tracked in the selector, drained at the leg’s send rate — skywire has no per-leg ack); backlog → inflight on the fast leg; σ → per-leg RTT-jitter EWMA. Filter variant (never returns NO-LEG; queues on the fast leg rather than the scheduler holding a frame) so the send path stays non-blocking — zero send/queue-machinery changes.

Wired end-to-end as a new WeightMode + ecf distribution (selector, native + wasm policy parsers, SetMuxMode RPC, proxy mux mode auto|equal|capacity|ecf CLI). Adaptive preset default left at capacity — ECF is opt-in and unproven live, so merging changes no fleet behavior; flipping the default is a one-liner after a live-tuning pass. Deterministic unit tests incl. the canonical fast + 10×-slow-leg case. State refreshes on the 5s data-progress cadence (RTT/rate/jitter); ~1s refresh + E2E latency are noted follow-ups. Developed with AI assistance (Claude).

Adds WeightModeECF — an Earliest-Completion-First predictive scheduler that holds
the next in-order frame off a slower leg when a faster leg will drain the backlog
and deliver it sooner, avoiding the head-of-line stalls that goodput/latency
weighting causes under path heterogeneity (the MPTCP/MP-QUIC aggregation result).

Adapted to skywire's no-TCP-cwnd model: per-leg cwnd -> BDP (rate x RTT), 'has
capacity' -> inflight_bytes < BDP (inflight tracked in the selector, drained at
the leg's send rate), backlog -> inflight on the fast leg, sigma -> per-leg RTT
jitter EWMA. Filter variant (never returns NO-LEG; queues on the fast leg rather
than the scheduler holding a frame) so the send path stays non-blocking.

Wired as a new WeightMode + 'ecf' distribution end-to-end (selector, native +
wasm policy parsers, SetMuxMode RPC, 'proxy mux mode auto|equal|capacity|ecf'
CLI). Adaptive preset default left at 'capacity' — ECF is opt-in and unproven
live; flipping the default is a one-liner after a live-tuning pass. Deterministic
unit tests incl. the canonical fast+10x-slow-leg case. State refreshes on the 5s
data-progress cadence for now (RTT/rate/jitter); a ~1s refresh + E2E latency are
noted follow-ups.
@0pcom
0pcom merged commit 608e134 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