Skip to content

Adapt per-peer pipeline window based on relative lag - #658

Draft
kjnilsson wants to merge 1 commit into
mainfrom
opt-pipline-limit
Draft

Adapt per-peer pipeline window based on relative lag#658
kjnilsson wants to merge 1 commit into
mainfrom
opt-pipline-limit

Conversation

@kjnilsson

Copy link
Copy Markdown
Contributor

Replace the flat max_pipeline_count cap with a per-peer window that grows toward the ceiling when a peer falls behind its fastest cluster-mate, and shrinks toward a batching floor (512) when it's keeping pace. Comparing lag against the fastest peer rather than the log tip avoids false growth during healthy write bursts, since a burst advances every peer's reference point equally - only a peer genuinely lagging its cluster-mates triggers growth.

Any append_entries_reply failure, snapshot backoff, or snapshot install completion resets a peer's window straight back to the ceiling, so a struggling or recovering peer always gets the safe, generous default rather than trusting a previously-shrunk value.

Replace the flat max_pipeline_count cap with a per-peer window that
grows toward the ceiling when a peer falls behind its fastest
cluster-mate, and shrinks toward a batching floor (512) when it's
keeping pace. Comparing lag against the fastest peer rather than the
log tip avoids false growth during healthy write bursts, since a
burst advances every peer's reference point equally - only a peer
genuinely lagging its cluster-mates triggers growth.

Any append_entries_reply failure, snapshot backoff, or snapshot
install completion resets a peer's window straight back to the
ceiling, so a struggling or recovering peer always gets the safe,
generous default rather than trusting a previously-shrunk value.
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