ZAB operates in two fundamental modes depending on the cluster state:
1. Crash Recovery Mode
Triggered during cluster startup or when the Leader crashes/restarts/loses connection. In this mode, the cluster performs a Leader election to establish a new Leader.
2. Broadcast Mode
Triggered once a new Leader is elected and a quorum of nodes has completed state synchronization (data sync) with that Leader. In this mode, the cluster processes transaction requests.
Note on New Nodes: If a new server joins the cluster while it is in Broadcast mode, the new server automatically enters Recovery Mode to find the Leader and synchronize data before participating in the Broadcast process as a Follower.