Transactions
ACID, isolation levels, MVCC, two-phase commit, sagas, and the transactional outbox.
Figure: Two-phase commit protocol for distributed transactions.
What You'll Learn
Transactions bundle correctness guarantees across reads and writes. This domain covers ACID properties, isolation anomalies, MVCC implementation, distributed 2PC limitations, saga orchestration, and the outbox pattern for reliable event publishing.
Chapters
| Chapter | Focus |
|---|---|
| ACID and Isolation Levels | Atomicity, isolation anomalies, serializability |
| Multi-Version Concurrency Control (MVCC) | Snapshot isolation, garbage collection |
| Two-Phase Commit (2PC) | Distributed atomic commit, blocking problem |
| Sagas | Long-running transactions, compensating actions |
| Transactional Outbox | Atomic DB write + event publish |
Learning Path
- ACID and Isolation — interview staple; know anomaly names and fixes.
- MVCC — how Postgres, MySQL InnoDB, and CockroachDB implement concurrency.
- 2PC — understand why cross-service 2PC is rare in microservices.
- Sagas and Transactional Outbox — production patterns for distributed workflows.
Interview Prep
| Resource | Topic |
|---|---|
| Shopify Transactional Outbox | Dual-write problem |
| Lab 009 outbox | Transactional outbox on :8092 |
| Lab 010 saga | Saga orchestration on :8093 — engineer guide |
Prerequisites
Production readiness + Game Day
Every substantive chapter in this domain targets the Production LLD and Game Day Standard: whiteboard Production LLD (APIs, data, failure paths) and run Game Day drills (inject → detect → mitigate → verify → learn).
| Start here | What you practice |
|---|---|
| Chapter §22A / §22B (where present) | Ship-ready LLD + drill catalog |
| Chapter §23 PRACTICE | Full interview script |
| Curriculum Overview — Phase 7 | Rollout status |
Next Domain
Continue to Messaging and Streaming and Microservices.
Return to the Curriculum Overview for the full learning path.