Skip to content

Part 6 of 18

Scaling Data

7 pages · 7 written

  1. 1.Database ReplicationIntermediate

    Copying data across machines for availability, read scale and latency: leader-follower, multi-leader, leaderless, sync vs async, lag, failover and conflicts.

  2. 2.Partitioning and ShardingIntermediate

    Splitting data across machines: vertical vs horizontal, federation, range/hash/directory/geo sharding, shard keys, hot spots, secondary indexes, resharding.

  3. 3.Consistent HashingIntermediate

    Why modulo hashing breaks when nodes change, how the hash ring and virtual nodes fix it, replication on the ring, rendezvous and jump hash, and real uses.

  4. 4.Quorums and Leaderless ReplicationAdvanced

    Dynamo-style replication: N, R, W and R+W>N, tunable consistency, sloppy quorums and hinted handoff, read repair, Merkle-tree anti-entropy and vector clocks.

  5. 5.Distributed Transactions: 2PC, Sagas and OutboxAdvanced

    Keeping data consistent across services and shards: two-phase commit and its blocking problem, 3PC, sagas with compensations, TCC and the transactional outbox.

  6. 6.Multi-Region and Global DataAdvanced

    Running data across regions: latency, DR and residency; active-passive vs active-active, geo-partitioning, Spanner, CockroachDB, Global Tables, conflicts, cost.

  7. 7.Online Data Migrations and Schema EvolutionAdvanced

    Changing schemas and moving data live: expand-and-contract, online schema change tools, dual writes vs CDC backfill, shadow reads, cutover and rollback.