Skip to content

Conversation

@sciascid
Copy link
Contributor

This patch adds the ability to make Raft groups quiescent, so that leaders stop sending heartbeats after a long idle time. It works as follows:

  • When a leader detects a long idle time it sends a Quiesce message to its followers, and stops sending heartbeats.
  • Upon receiving a Quiesce message, followers no longer expect heartbeats from the leader, by stopping their election timers.
  • A leader or follower unquiesces upon receiving any kind of request: a new proposal, append entries, vote requests, and so on.

Potential advantages and uses cases:

  • Fewer messages over the network and less ticking in deployments with a large number of inactive Raft groups
  • Read-only streams

Disadvantes:

  • Failures may go unnoticed for a long time (Could be avoided if Raft layer could be notified of dropped connections?)
  • The first request to a quiesced group may experience higher latency should nodes find out that they need to go through a new election efore proposal can be pushed forward.

This is a proof of concept, it's incomplete and meant for experimentation only.

Signed-off-by: Daniele Sciascia [email protected]

@sciascid sciascid self-assigned this Aug 21, 2025
This patch adds the ability to make Raft groups quiescent, so
that leaders stop sending heartbeats after a long idle time.
It works as follows:
   - When a leader detects a long idle time it sends a
     Quiesce message to its followers, and stops sending
     heartbeats.
   - Upon receiving a Quiesce message, followers no longer
     expect heartbeats from the leader, by stopping their
     election timers.
   - A leader or follower unquiesces upon receiving any kind
     of request: a new proposal, append entries, vote
     requests, and so on.

Potential advantages and uses cases:
   - Fewer messages over the network and less ticking in
     deployments with a large number of inactive Raft groups
   - Read-only streams

Disadvantes:
   - Failures may go unnoticed for a long time
     (Could be avoided if Raft layer could be notified of
     dropped connections?)
   - The first request to a quiesced group may experience
     higher latency should nodes find out that they need to
     go through a new election efore proposal can be pushed forward.

This is a proof of concept, it's incomplete and meant for
experimentation only.

Signed-off-by: Daniele Sciascia <[email protected]>
@github-actions github-actions bot added the stale This issue has had no activity in a while label Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale This issue has had no activity in a while

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants