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

Avoiding Raft thread starvation #355

Open
kishorekrd opened this issue May 20, 2022 · 1 comment
Open

Avoiding Raft thread starvation #355

kishorekrd opened this issue May 20, 2022 · 1 comment

Comments

@kishorekrd
Copy link

I observed that when system is heavy loaded, raft is missing heartbeat and leading to re-election.
How do you avoid raft thread starvation?
Do you do thread pinning?
Is there any other alternative solutions?
How to configure NuRaft to avoid Raft thread starvation?

@greensky00
Copy link
Contributor

Hi @kishorekrd

There is no dedicated thread for heartbeats; the heartbeat timer is controlled by Asio and invoked on any worker threads. So there is virtually no way to guarantee heartbeating by NuRaft.

But if the leader too overloaded to generate heartbeats, isn't it enough to say the leader is "unhealthy" so that the leader election is desired?

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

No branches or pull requests

2 participants