Hi Raiguz, Thanks for your questions.
> check the status of the raft cluster, ie. has the leader election already completed? ... We may use the GroupManagementApi.info(group) to get the group information from any of the servers. The API will return the information for each peer at the viewpoint of that server. Note that, due to the distributed nature of a raft cluster, the viewpoints from different servers could possibly be different. > apply additional operation when the status of raft cluster changed, ... This is an EventApi in StateMachine such that each state machine in any of the servers can get notification of leader change; see StateMachine.EventApi.notifyLeaderChanged(..). Hope this helps. Tsz-Wo On Tue, Mar 1, 2022 at 9:50 AM Riguz Lee <[email protected]> wrote: > Hi there, > > I'm using ratis together with springboot, what I'm trying to implement is: > > * check the status of the raft cluster, ie. has the leader election > already completed? This could be useful for checking the status of the > server, more specificlly, in k8s liveness probe > * apply additional operation when the status of raft cluster changed, for > example, subscribe to a message queue when current node become the leader > > I couldn't found features like that, do someone has similar scenarios? > > Thanks, > > Riguz Lee >
