hashicorp/raft

How can I know other node status

Closed this issue · 2 comments

Is there any way to get the status of other nodes? For example, when a node exits abnormally, how do I know

You could have a health check via a HTTP endpoint on each node in the cluster that returns a 200 when all is happy.

Then on your master node use the Stats method to get information on each node in the cluster. You should have each node's address in the latest_configuration value and can ping the health check endpoint on each node.

The value of "latest_configuration" is a string which contains the id of each server, its suffrage status, and its address.

Hey @davidsbond, thanks so much for this reply!
@inewlife we are gonna close this issue for now, but feel free to comment below if you have any further questions.