返回博客microservices-patternsSaga + Outbox: The Durable Transaction Recipe (2026)April 27, 202618 min read saga pattern outbox pattern distributed transactions microservices patterns pattern combinations durable execution eventual consistency saga orchestration transactional outbox event-driven microservices compensation patterns idempotency kafka postgres outbox CDC debezium microservices 2026Frequently Asked QuestionsWhat is the Saga + Outbox combination?Why is Saga insufficient on its own?Why is Outbox insufficient on its own?Where should the saga orchestrator live?What is the latency cost of using Outbox?Can the same database hold both the saga table and the outbox table?How does this combination handle exactly-once delivery?What happens if a compensation step fails?How do I detect a stuck saga?Should I use polling or CDC for the outbox relay?How big should an outbox table get?What about message ordering across services?Can I use the same outbox for events and commands?How do I migrate an existing synchronous chained-call implementation?What database features does the outbox relay require?Can the orchestrator be stateless?How do I version saga definitions?What is the relationship between this recipe and Event Sourcing?Do I need Kafka or can I use SQS, RabbitMQ, NATS?How do I test sagas locally?Is this recipe suitable for high-throughput workflows of 10k or more sagas per second?What happens if the orchestrator service is rolled back to an older version?Can the saga orchestrator call external APIs directly?How is this different from a workflow engine like Temporal or Camunda?What metrics should I track on the orchestrator?Should compensations be automatic or human-approved?How do I handle saga timeouts that span business hours?Can the same Postgres database be shared by multiple services?What is the cost overhead of this recipe?Where can I find production code for this recipe? 分享这篇文章 Twitter LinkedIn WhatsApp复制链接Download as PDFSatyam人工智能和云架构师。帮助团队构建可扩展到数百万的系统。Comments Leave a commentPost Comment