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

API exposed to raft leader when follower node goes down in braft implementation #474

Open
s-rajpoot opened this issue Oct 3, 2024 · 1 comment

Comments

@s-rajpoot
Copy link

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.  
@aschenmaker
Copy link

    enum St {
        IDLE,
        BLOCKING,
        APPENDING_ENTRIES,
        INSTALLING_SNAPSHOT,
    };

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