Apache Seata coordinates data consistency across microservices that use separate data sources. Applications integrate it to run global transactions composed of branch transactions on each service.
Overview
Apache Seata is an open source distributed transaction solution aimed at microservices where each service often owns its own database. It addresses consistency for business operations that span multiple services, where local transactions inside one service are not enough to keep the whole workflow coherent.
The design centers on a global transaction made up of branch transactions. A Transaction Manager defines when a global transaction starts and whether it commits or rolls back. A Transaction Coordinator tracks global and branch state and drives commit or rollback across branches. Resource Managers register branches with the coordinator and manage the underlying resources for each local transaction.
During a typical flow, the Transaction Manager asks the coordinator to begin a global transaction and receives an XID that propagates through the call chain. Resource Managers register their local work as branches under that XID. When the Transaction Manager finishes, the coordinator instructs all branches to commit or roll back together.
Seata supports several coordination styles. AT mode offers automatic compensation and lists support for common relational databases. TCC mode uses application-defined Try, Confirm, and Cancel steps. Saga mode runs longer processes with a state machine and application-supplied compensation. XA mode uses the XA protocol with supported JDBC databases while keeping a familiar local transaction style in application code.
For deployment and integration, the project documents RPC framework support such as Dubbo, Spring Cloud, SOFARPC, Motan, and gRPC, plus cluster operation with separable compute and storage backed by databases or Redis. A native Go implementation, Kubernetes-related components, and a CLI tool are mentioned as part of the broader ecosystem.
Key features
- AT automatic compensation transactions
- TCC Try-Confirm-Cancel coordination
- Saga state machine orchestration
- XA protocol over JDBC databases
- Transaction Coordinator cluster mode
- TM, RM, and TC role separation
- Dubbo, Spring Cloud, and gRPC integration
- Horizontal scaling of compute nodes
Use cases
- Cross-service business transaction consistency
- Database-per-service microservice workflows
- Long-running processes with compensation
- Payment and financial transaction flows
- Multi-step operations spanning several services