liveBook · Manning

Replicated log

As explained in ScyllaDB in Action

A replicated log is an ordered append-only sequence of state-changing entries maintained consistently across multiple nodes.

A replicated log is an ordered, append-only sequence of state-changing entries maintained across multiple nodes. In Raft, a leader receives each request and records it before followers append the same entry, establishing a consistent order for changes such as schema updates. section 8.2.5

A Raft write proceeds in two stages:

  • Append the entry to the leader’s local log, reserving its position. section 8.2.5
  • Ask other nodes to append the entry to their logs. section 8.2.5
  • Commit the entry after a majority of nodes acknowledge the append, making it locked in and persistent. section 8.2.5

Ordering a schema change

If two conflicting schema changes arrive at different nodes, routing requests through one leader places one entry before the other in the replicated log instead of allowing concurrent, conflicting updates. section 8.2.5

Figure 8.9 Raft’s leader appends entries to its log, committing them when a majority of nodes have also acknowledged the append operation.
figure

Trace how a Raft leader appends an entry, replicates it to followers, and commits it after a majority acknowledges the append. section 8.2.5

How ScyllaDB in Action covers it

How deep it goes
Explains leader append, follower replication, and majority commit, but does not detail the complete Raft protocol.
Examples
Uses a leader-and-followers write sequence in which a majority acknowledgment commits a new log entry.
What you can do after
Understand it by tracing how Raft orders changes and commits them after majority replication.
How it connects
Connects Raft with consensus, commit logs, schema changes, topology changes, and cluster-state consistency.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of ScyllaDB in Action. The section links point to the parts of the book it draws on.