Ant Financial's Distributed Transaction Solutions: Evolution of TCC, FMT, and XA Models
This article details Ant Financial's multi‑year development of a comprehensive distributed transaction framework—including TCC, FMT, and XA models—designed to ensure financial‑grade consistency, high performance, and seamless cloud‑native integration for massive, latency‑sensitive payment and accounting services.
The article introduces Ant Financial's distributed transaction solutions, which have matured over years to support a wide range of internal and external business scenarios, offering TCC, FMT, and XA models for financial‑grade consistency and high performance.
Background : Rapid growth of internet services and data scale led to distributed micro‑service architectures, creating consistency challenges across services and databases, especially under high‑throughput payment workloads.
Design Considerations :
Adopt BASE theory and implement a two‑phase commit (2PC) style TCC model to balance consistency and performance.
Introduce FMT (Framework‑Managed Transactions) to reduce integration friction by handling Try‑Confirm‑Cancel logic automatically via JDBC interception.
Provide an XA model for real‑time consistency where required, leveraging distributed MVCC and snapshot mechanisms.
Performance Optimizations :
Same‑database mode replaces remote activity manager storage with local storage, cutting RPC calls and DB accesses.
Asynchronous second‑phase execution reduces transaction latency during peak traffic.
Deep integration with OceanBase customizes commit paths, minimizing log and RPC delays to near‑single‑commit latency.
Integration : The transaction framework is embedded in data access proxies, making distributed transaction handling transparent to applications while ensuring eventual consistency and high concurrency.
Conclusion : By evolving from TCC to FMT and XA, Ant Financial delivers a flexible, high‑performance distributed transaction solution that meets both internal financial demands and external cloud‑native workloads.
AntTech
Technology is the core driver of Ant's future creation.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.