API exposed to raft leader when follower node goes down in braft implementation
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 4.2k
- Forks
- 923
- PR merge metrics
- No merged PRs in 30d
Description
I am using Raft (braft library) for high availability. I have 3 applications (Nodes) forming raft cluster. I have to manage application (Node) states (ONLINE, OFFLINE).
If leader goes down and another node becomes leader there are api's exposed to application which becomes leader(on_leader_start()). Similarly does braft provides any api or method
exposed to leader application when follower goes down (Unplanned shutdown) or joins the raft cluster?
For example: I have the following scenarios.
scenario 1.
App1(leader, state: ONLINE), App2(follower, state: ONLINE), App3(follower, state: ONLINE)
App2 goes down (Unplanned shutdown)
I have to manage Node states App1(state: ONLINE), App2(state: OFFLINE), App3(state: ONLINE)
How will braft notify App1(leader) that App2 is down.
scenario 2.
App1(leader, state: ONLINE), App2(follower, state: OFFLINE), App3(follower, state: ONLINE)
App2 rejoins the raft cluster.
I have to manage Node states App1(state: ONLINE), App2(state: ONLINE), App3(state: ONLINE)
How will braft notify App1(leader) that App2 has joined the cluster.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the braft leader callback on_leader_start() and the documented APIs for follower membership or liveness changes. Determine whether braft exposes notifications when a follower shuts down or rejoins, and define how those events should be delivered to the leader application.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100