The Saga Pattern: Distributed Transactions Across Microservices Without 2PC
Learn how to keep data consistent across microservices without two-phase commit using the saga pattern: choreography versus orchestration, well-designed compensating transactions (compensation is not rollback), pivot transactions, the isolation problem and its countermeasures, and how to combine sagas with the transactional outbox so no event ever gets lost. Includes a complete orchestrator in Python, choreography examples, and a production checklist. Expanded edition: a durable data model for your own orchestrator, timeouts and the reaper, the inbox table for idempotency, sagas with Temporal and AWS Step Functions, parallel branches, comparison with TCC and 2PC, observability with OpenTelemetry, crash-injection testing, versioning with sagas in flight, failed compensations and human escalation, long-lived sagas, step-boundary design, throughput at scale, a complete case study, and an FAQ.
Verificando acceso...