Architecture 2023-09-17

The Saga Pattern Explained: Managing Distributed Transactions in Microservices

Learn how the Saga pattern manages distributed transactions in microservices. Compare choreography vs orchestration-based sagas and their practical trade-offs.

Read in: ja
The Saga Pattern Explained: Managing Distributed Transactions in Microservices

Overview

Notes on what I researched about the Saga pattern.

What is the Saga Pattern

Other Patterns

Another pattern to maintain consistency in microservices, similar to the Saga pattern, is the TCC (Try-Confirm/Cancel) pattern, which also uses eventual consistency.

The TCC pattern is similar to 2phase commit, but in the TCC pattern, each service has three steps: preparation, confirmation, and cancellation of the transaction.

The TCC pattern does not perform rollbacks like compensating transactions, but ensures consistency by not performing processes that cause inconsistencies.

References

Tags: Microservices Saga Pattern TCC Pattern Distributed Transactions 2phase commit
Share: 𝕏 Post Facebook Hatena
✏️ View source / Discuss on GitHub
☕ Support

If you enjoy this blog, consider supporting it. Every bit helps keep it running!


Related Articles