Replication and clustering
Read-only replicas, synchronous confirmation, automatic failover by a quorum of watchers, table groups with a primary per group, consistency guarantees, and an exact account of what is built and what is open.
- Replication overview: How Raft DB copies data between nodes, how it chooses a primary, what "Raft" and "master-master" mean in this project today, and a map of the chapter.
- Log shipping and read-only replicas: How a replica copies a primary's logs byte for byte, what it serves, how it resumes and resyncs, how to start and promote one, and what it does not copy.
- Synchronous replication: The sync-replicas and sync-timeout-ms settings, what an acknowledgement means with them, the timeout fallback and its counter, strict mode under a watcher, and the measured cost.
- The fence: The epoch and lease a managed node keeps so that only the legitimate primary accepts writes, the role commands a control account can give, and the state a node reports.
- Failover with a watcher quorum: How three or more watchers elect a leader, decide who is primary, renew leases and fail over, every cluster setting with its default, the measured failover times and the resource-control feature.
- Table groups and partitioned tables: How tables are assigned to groups with one primary each, how requests are forwarded, how partitioned tables spread over groups, and the exact limits of this design.
- Handover and rebalancing: How to move a group's primary to another node on purpose, how the watcher rebalances primaries after a node returns, and the rules for renames with several groups.
- Consistency guarantees: What Raft DB guarantees about durability, visibility, ordering and failover, for a single node, for SQL transactions and for clusters, and what it does not.
- Running a cluster: Step by step, three servers and three watchers with automatic failover, using the settings of the project's own test harness, plus how to check, test and stop it.
- Status: built and open: An exact list of what replication and clustering features are built and tested, what is built but only partly verified, and what is open.
- Placement rules, copies and spreading data over servers: How to keep each table on some of the servers instead of all of them with node labels, placement rules (copies, spread, sync, read), how a table or a partition lands in a group, the safe order for turning it on, what the watcher does and never does, and what is not built.
- Node health shared by the watchers: How the watchers of a cluster agree that a node is down, what they stop sending it, how it comes back, and how to stop a node for maintenance.
- Changing the configuration of a running cluster: Set a configuration item once on the watchers, see per node who applied it, refused it or still waits, and go back to the previous set. What works today and what does not yet.