Production Implementation Patterns
Blending ACID and BASE
Production systems choose consistency per boundary. Use ACID within a service (orders, payments) and BASE across services (catalog, sessions). Change Data Capture (CDC) streams changes from ACID source to BASE projections, accepting 100ms-2s staleness for derived views. This isolates transactional complexity while scaling reads.
Saga Pattern
Sagas replace distributed transactions with a sequence of local transactions plus compensating actions. Checkout saga: (1) reserve inventory, (2) charge payment, (3) confirm order. If payment fails, compensation releases inventory. Each step must be idempotent (safely retryable) using unique operation IDs. Expect temporary inconsistencies during execution (seconds to minutes); design UIs to show "processing" states.
Quorum Tuning
With N replicas, R (read quorum) and W (write quorum) control consistency. If R + W > N, reads see latest writes. Example: N=3, R=2, W=2 ensures overlap, guaranteeing consistency but doubling latency. R=1 gives faster reads but may return stale data.
Observability
Track latencies per consistency level: eventual P99, strong P99. Monitor replication lag. For ACID, track lock wait time, deadlock rate, abort rate. Set SLOs per operation type.