December 2023
Intermediate to advanced
464 pages
12h 35m
English
Keep the state of multiple nodes synchronized by using a write-ahead log that is replicated to all the cluster nodes.
When multiple nodes share a state, that state needs to be synchronized. All cluster nodes need to agree on the same state, even when some nodes crash or get disconnected. This requires achieving consensus for each state change request.
But achieving consensus on individual requests is not enough. Each replica also needs to execute requests in the same order, otherwise different replicas can get into a different final state, even if they have consensus on an individual request.
Cluster nodes maintain a Write-Ahead Log. Each log entry stores the state required for consensus along with ...