chapter six

6 Distributed Systems

 

This chapter covers

  • Defining transaction guarantees with the ACID properties
  • Navigating distributed trade-offs using the CAP and PACELC theorems
  • Selecting the right Transaction Isolation Levels for your data
  • Distinguishing between Safety (correctness) and Liveness (progress)
  • Optimizing set membership checks using Bloom Filters

Distributed systems are fundamentally about trade-offs. In a single-threaded application running on one machine, we take certain luxuries for granted: variables don't change unexpectedly, time moves forward linearly, and a write you just made is the value the next read returns. In a distributed system, none of these guarantees hold automatically. We're forced to choose: do we want our data to be perfectly consistent, or do we want our system to remain available during a network partition? Do we want speed, or do we want accuracy? There is no free lunch.

6.1 Databases

6.1.1 ACID

6.2 The CAP Theorem

6.3 The PACELC Theorem

6.4 Safety and Liveness

6.5 Transactions

6.6 Consensus

6.7 Consistency Model

6.8 Isolation Level

6.9 Exploring Database Isolation Levels

6.9.1 No Isolation

6.9.2 Read Uncommitted

6.9.3 Dirty Writes

6.9.4 Read Committed

6.9.5 Dirty Reads

6.9.6 Repeatable Reads

6.9.7 Snapshot Isolation (SI)

6.9.8 Serializable Snapshot Isolation (SSI)

6.9.9 Serializability

6.10 Availability Models

6.10.1 Availability

6.10.2 High Availability

6.10.3 Availability Models

6.11 System Design

6.11.1 Probabilistic Increment

6.12 Latency and User Experience

6.12.1 Why Does Latency Matter for Users?

6.13.1 Hashmap