Hey Brad,
Let me clarify the difference in behavior. When an agent exits, it can do so “gracefully” or not.
A graceful leave is done by broadcasting an intent to leave prior to exiting. The difference is when
the failure detector eventually picks up that the node is gone. If the node registered the intent to leave
it enters the “left” state, otherwise it enters the “failed” state.
A node in the failed state is continued to be considered part of the cluster, but is just unreachable.
All its services and checks remain, and the cluster attempts to re-establish contact with the node. This
is done because its impossible to distinguish between a network partition, an agent crash, a system that is
starved of CPU, etc, etc. Based on the absence of a signal, it’s provably impossible to tell what has happened.
A node in the left state however, has already told us it intends to leave. This means it is removed from the
Raft replication group, its services and checks are deregistered, and it appears to no longer be part of the cluster.
No attempt is made to establish communication with it (it did leave after all).
It’s very important to understand this distinction operationally. If you have 3 servers, and 2 or more of them leave,
you will trigger a loss of quorum / outage. If you do a rolling leave / join of all the servers (new version, config change, etc),
then the system will handle this fine. If you take a hard power loss and all servers die (NOT gracefully, they are just failed),
then when the start up again, they will re-establish quorum.
I hope that helps to clarify the situation. There is nothing disastrous about a node leaving, you just have to understand
the operation impact that it has.
Best Regards,
Armon Dadgar