Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raft: add backpressure for CommittedEntries flow #60

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pav-kv
Copy link
Contributor

@pav-kv pav-kv commented May 26, 2023

This commit introduces a mechanism for limiting the flow of CommittedEntries that raft pushes through the Ready handling loop.

TODO: describe problem. In short, raft pushes work to be done via Ready and expects it to be done, there is no backpressure mechanism. In CRDB, for instance, where there are many raft instances per node, many raft loops can push too much work simultaneously and cause out-of-memory situation.

TODO: describe solution, and alternatives. There are more complicated alternatives, like making the in-flight limit dynamic, passing an int limit instead of bool, but seemingly the simplest possible bool does the job well.

This commit introduces a mechanism for limiting the flow of CommittedEntries
that raft pushes through the Ready handling loop.

Signed-off-by: Pavel Kalinnikov <[email protected]>
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