Tagged articles
Two-Phase Commit
98 articles · Page 1 of 1
This article details a five-layer database high availability architecture: single-node crash recovery via WAL and two-phase commit, asynchronous and semi-synchronous replication trade-offs, GTID-based global transaction identification for seamless failover, fencing mechanisms to prevent split-brain, and Orchestrator with probe-agent for automated failure detection and failover execution.
Crash RecoveryFailoverFencing
0 likes · 26 min read

This article deep-dives into Apache Paimon's kernel source code, explaining the LSM write path from memory buffer to Sorted Runs, compaction scheduling trade-offs, four changelog production modes, and two-phase commit with Flink checkpoints, providing troubleshooting guidance for compaction backlog, changelog latency, and snapshot bloat.
Apache PaimonFlinkLSM-tree
0 likes · 33 min read

This article analyzes three commit strategies—Eager, Conservative, and Two-phase—for tool calling in full-duplex voice agents, explaining how each handles user self-correction, side-effect safety, and latency trade-offs, and provides selection guidelines based on operation reversibility.
Tool CallingTwo-Phase Commitconservative commit
0 likes · 8 min read

This comprehensive guide covers Seata's four transaction modes (AT, TCC, SAGA, XA) with deep internals, production configuration, code examples, nine critical pitfalls with solutions, a real-world failure postmortem, and an architectural decision framework for microservice data consistency.
AT modeIdempotencySAGA mode
0 likes · 18 min read

This article explains what MySQL's binary log (binlog) is, how it differs from the redo log, the three binlog formats, the full execution flow of an UPDATE statement, why MySQL uses a two‑phase commit, and how crash recovery ensures data consistency across primary and replica servers.
MySQLReplicationTwo-Phase Commit
0 likes · 18 min read

This guide details how to achieve end-to-end exactly-once semantics with Apache Flink and Apache Paimon, covering consistency models, three-layer coordination mechanisms, production-grade configurations, concurrency rules, verification tests, failure injection scenarios, performance trade-offs, and operational SOPs for lakehouse streaming workloads.
Apache FlinkApache PaimonProduction Operations
0 likes · 26 min read

The article explains why reciting the 2PC protocol fails in real‑world interviews, then walks through the two dominant solutions—two‑phase commit and MQ‑based eventual consistency—detailing their mechanisms, trade‑offs, and a concrete interview response template that showcases practical experience and theoretical depth.
Interview PreparationMessage QueueTwo-Phase Commit
0 likes · 6 min read

This article explains the fundamentals of distributed transactions, outlines the CAP theorem trade‑offs, and compares three concrete solutions—two‑phase commit, TCC, and a message‑queue based eventual‑consistency approach—detailing their workflows, advantages, and drawbacks.
CAP theoremConsistencyMessage Queue
0 likes · 16 min read

This article provides a comprehensive interview guide on MySQL’s three core logs—redo log, undo log, and binlog—covering their architecture, roles in crash recovery, MVCC, replication, configuration commands, two‑phase commit workflow, and frequent follow‑up questions to help candidates ace database interview questions.
Database InterviewMySQLTwo-Phase Commit
0 likes · 13 min read

This article explains MySQL's redo log and binlog, why their write order can cause master‑slave inconsistencies, and how the two‑phase commit protocol atomically coordinates both logs to ensure reliable data consistency in distributed transactions.
MySQLReplicationTwo-Phase Commit
0 likes · 8 min read


Java OneJul 31, 2025 · Backend Development
This tutorial explains how to ensure data consistency across microservices by implementing distributed transactions with Seata, covering architecture, service implementation, configuration, two‑phase commit protocol, transaction modes, and debugging techniques for a complete end‑to‑end solution.
AT modeSeataSpring Cloud
0 likes · 25 min read

The article explains how RocketMQ implements distributed transaction messages using a two‑phase commit model to ensure data consistency across micro‑service subsystems, detailing the workflow from half‑message production, broker handling, local transaction execution, commit/rollback decisions, and periodic status checks.
Message QueueRocketMQTwo-Phase Commit
0 likes · 7 min read

MySQL employs a two‑phase commit to synchronize InnoDB’s redo log with the server’s binlog, ensuring atomicity during transaction commits and preventing data inconsistencies during crash recovery or replication, while also introducing lock contention, extra I/O, and potential blocking.
Two-Phase Commitbinlogdatabase consistency
0 likes · 5 min read

This article explains how MySQL redo logs and binlog logs work together to ensure data durability, consistency, and high availability, covering InnoDB crash‑recovery, flush policies, log file groups, binlog formats, two‑phase commit, and the complete recovery workflow.
Database LoggingInnoDBMySQL
0 likes · 11 min read

This article explores seven practical retry solutions—from simple loops and Spring Retry to Resilience4j, message queues, scheduled tasks, two‑phase commits, and distributed locks—explaining their scenarios, core code, and how they prevent costly system failures.
BackendDistributed LockMQ
0 likes · 10 min read

Explore 15 classic MySQL log interview questions covering redo log, WAL, binlog, undo log, two‑phase commit, write‑ahead logging, crash‑safe mechanisms, log flushing settings, and recovery procedures, with detailed explanations, execution flow diagrams, and configuration parameters to help you ace database engineering interviews.
Two-Phase CommitWALbinlog
0 likes · 16 min read

This article compiles 15 classic MySQL log interview questions and provides detailed explanations of redo log, WAL, binlog, undo log, two‑phase commit, crash‑safe mechanisms, and related configuration parameters, helping readers understand database recovery and replication fundamentals.
Crash SafeTwo-Phase Commitbinlog
0 likes · 17 min read


JavaEdgeSep 1, 2024 · Backend Development
This article explains how Kafka implements transactions using a two‑phase commit protocol, compares its approach with RocketMQ, details the exactly‑once semantics for streaming workloads, and walks through the coordinator roles, message flow, and practical use‑case scenarios.
KafkaTwo-Phase Committransaction
0 likes · 10 min read

This article reviews the 14-part series on MySQL's transaction module, covering initialization, transaction types, two‑phase commit, binlog handling, savepoints, and full rollback, and provides links to each detailed post, including discussions on BEGIN statements, read‑only transactions, and the internal mechanisms of InnoDB.
InnoDBMySQLSavepoint
0 likes · 5 min read

This article explains how to build a TCC‑style distributed transaction layer for Redis using Go, detailing the two‑phase commit workflow, handling of prepare, commit, and rollback phases, the associated consistency challenges, and providing full code examples.
RedisTCCTwo-Phase Commit
0 likes · 13 min read

This article explains MySQL's fault‑tolerance mechanisms, covering data persistence, storage engines, the binary, redo, and undo logs, WAL, two‑phase commit, and step‑by‑step recovery procedures for accidental data loss or crashes.
Binary LogCrash SafetyInnoDB
0 likes · 11 min read


政采云技术Sep 5, 2023 · Cloud Computing
This article provides a comprehensive overview of Seata, a distributed transaction framework that ensures data consistency across microservices through four transaction modes: AT, XA, TCC, and Saga, each with distinct characteristics and use cases.
AT modeSAGA modeSeata
0 likes · 11 min read

This article provides a detailed source‑code walkthrough of MySQL 8.0.33’s two‑phase commit process, explaining the Prepare and Commit stages, internal structures such as binlog queues, GTID generation, redo‑log flushing, sync handling, and the interactions between InnoDB and the binary log.
Binary LogGTIDInnoDB
0 likes · 18 min read


ITPUBMay 1, 2023 · Backend Development
This article demystifies distributed transactions using Alibaba's Seata, explaining reverse compensation, core concepts (TC, TM, RM), the two‑phase commit protocol, and detailed walkthroughs of AT, TCC, XA, and Saga modes with code examples and step‑by‑step procedures.
AT modeSagaSeata
0 likes · 14 min read

This tutorial explains how to achieve exactly‑once semantics when streaming data from Kafka to Redis using Apache Flink's TwoPhaseCommitSinkFunction, covering Redis transaction basics, utility classes, sink implementation, testing steps, and solutions to common connection and transaction bugs.
FlinkJavaKafka
0 likes · 11 min read


政采云技术Mar 2, 2023 · Fundamentals
This article explains the two‑phase commit protocol, describes how Lucene implements it through a dedicated interface, details the preparation, commit, segment handling, deletion policies, and rollback procedures, and provides code snippets illustrating the core logic.
LuceneTwo-Phase Commitdistributed transactions
0 likes · 13 min read


政采云技术Mar 2, 2023 · Databases
This article explains the two-phase commit protocol for distributed transactions, details its generic workflow, and describes how Apache Lucene implements the protocol through its TwoPhaseCommit interface, including preparation, flushing, commit, segment handling, deletion policies, and rollback mechanisms with illustrative code examples.
JavaLuceneTwo-Phase Commit
0 likes · 12 min read

This article explores MySQL’s write‑ahead log, two‑phase commit, engine plugins, memory management, lock strategies, and state‑machine design, showing how these internal mechanisms can inspire more reliable, scalable, and maintainable business system architectures.
Database ArchitectureMySQLTwo-Phase Commit
0 likes · 22 min read

This article introduces Seata's approach to distributed transactions, covering the concept of reverse compensation, core components (TC, TM, RM), the two‑phase commit protocol, and detailed walkthroughs of Seata's AT, TCC, XA, and Saga modes with practical examples and diagrams.
AT modeSagaSeata
0 likes · 14 min read

This article details Xiaomi's three‑year journey of adopting Apache Doris across dozens of internal services, describing the transition from a Spark‑SQL‑based Lambda architecture to a unified MPP database, performance benchmarks, data ingestion pipelines, compaction tuning, two‑phase commit, single‑replica writes, monitoring, and community contributions.
Apache DorisMPPReal‑Time Analytics
0 likes · 19 min read

This article explains the fundamentals of distributed transactions, including ACID properties, consistency models, sharding strategies, and the two‑phase, three‑phase, and TCC protocols, while discussing CAP and BASE theories and the challenges of implementing reliable distributed databases.
ACIDBASECAP
0 likes · 23 min read

This article explains how Apache Flink achieves end‑to‑end exactly‑once semantics by using source replay support, checkpoint‑based snapshots, asynchronous incremental checkpoints, and two‑phase commit sinks, and describes the interaction with external systems such as Kafka to ensure transactional writes.
FlinkKafkaTwo-Phase Commit
0 likes · 7 min read

This article explains MySQL's redo log, binlog, and undo log, covering their roles in crash recovery, durability, performance optimization, log formats, two‑phase commit handling, and how they together ensure data consistency and atomicity in InnoDB.
InnoDBMySQLTwo-Phase Commit
0 likes · 14 min read

This article explains the fundamentals of distributed transactions, the ACID properties, various consistency models, database sharding strategies, and the two‑phase, three‑phase, and TCC commit protocols, while also discussing CAP, BASE, and practical challenges in large‑scale systems.
ACIDCAPSharding
0 likes · 22 min read

This article explains the fundamentals of distributed transactions, covering ACID properties, consistency models, sharding strategies, CAP and BASE theories, and compares two‑phase, three‑phase, and TCC commit protocols to illustrate how modern systems maintain data integrity across multiple nodes.
ACIDShardingTCC
0 likes · 21 min read

This article explains how InnoDB’s two‑phase commit mechanism keeps the redo log and binlog logically consistent, illustrating failure scenarios, the impact on data recovery, and how the prepare‑commit split prevents inconsistencies in MySQL’s storage engine.
InnoDBMySQLTwo-Phase Commit
0 likes · 4 min read

This article explains rigid (strong consistency) distributed transactions, detailing the XA protocol and the classic two‑phase commit (2PC) and three‑phase commit (3PC) mechanisms, their workflows, advantages, limitations, and practical considerations for database systems.
Two-Phase CommitXA protocoldatabase consistency
0 likes · 15 min read

This article explains the evolution from local to distributed transactions, detailing the XA protocol, the two‑phase commit process, the LCN framework, the TCC model, and the design of business compensation mechanisms for reliable microservice systems.
BackendLCNTCC
0 likes · 12 min read

This article explains MySQL's two essential logs—redo log and binlog—by describing the database's layered architecture, the write‑ahead logging mechanism, persistence strategies, crash‑safe guarantees, and how a two‑phase commit ensures consistency between them.
Crash RecoveryDatabase LoggingMySQL
0 likes · 12 min read

This article introduces the fundamental concepts of distributed transactions, explains ACID and BASE properties, and systematically presents classic solutions such as two‑phase commit, SAGA, TCC, local message tables, transaction messages, maximum‑effort notifications, and sub‑transaction barriers for reliable microservice architectures.
SagaTCCTwo-Phase Commit
0 likes · 16 min read

Percolator implements a two‑phase commit transaction protocol with a client coordinator, a timestamp oracle, and storage (Bigtable or TiKV’s RocksDB), providing snapshot‑isolated ACID semantics via lock, write, and data columns; TiKV adds parallel prewrite, short‑value storage, point‑read shortcuts, calculated commit timestamps, and single‑region one‑phase commits to boost performance while keeping the design simple and scalable, though high contention can cause retries and read‑wait delays.
PercolatorRocksDBTiKV
0 likes · 20 min read

The article explains that Xtrabackup only needs to ensure consistency between data and the binlog position, not full binlog data, because its backup process captures only committed or not‑started transactions, eliminating the need to back up the binlog itself.
MySQLTwo-Phase Commitbinlog
0 likes · 6 min read

This article provides a comprehensive overview of distributed system fundamentals, covering system models, replicas, performance and availability metrics, data distribution strategies, replica protocols such as lease, quorum, two‑phase commit, MVCC, Paxos, and the CAP theorem, with practical engineering considerations.
CAP theoremConsistencyPaxos
0 likes · 53 min read

This article explains the fundamentals of distributed transactions, compares classic solutions such as XA, Saga, TCC, local message tables, and transactional messages, discusses their trade‑offs, and introduces advanced techniques like sub‑transaction barriers to handle network anomalies in microservice architectures.
DTMSaga patternTCC
0 likes · 16 min read

The article explains how to guarantee data consistency across distributed systems by using local transactions, two‑phase commit protocols, message‑queue based eventual consistency, deduplication techniques, and practical RocketMQ transactional messaging code examples in Java.
JavaRocketMQTransactional Messaging
0 likes · 21 min read

The article examines how to prevent data inconsistency during cross‑service money transfers by using local transactions, two‑phase commit, and message‑queue based eventual consistency, providing detailed code examples, performance considerations, and practical solutions for large‑scale backend systems.
BackendData ConsistencyMessage Queue
0 likes · 23 min read

This article explains how to guarantee data consistency when updating multiple tables or services by using local transactions for single‑node systems, two‑phase commit for distributed databases, and reliable message‑queue patterns—including RocketMQ transactional messages—to achieve eventual consistency and handle duplicate delivery.
Message QueueRocketMQTransactional Messaging
0 likes · 21 min read

This article explains the X/Open Distributed Transaction Processing model, the XA specification, the two‑phase commit protocol, and demonstrates how to configure and use Atomikos in Java for managing distributed transactions across multiple resources.
AtomikosJavaTwo-Phase Commit
0 likes · 14 min read

This article explains the drawbacks of traditional high‑latency timeout centers and presents a Redis‑based low‑latency design, detailing task storage, scheduling, topic and queue structures, two‑phase consumption, retry control, and the resulting performance and reliability benefits.
BackendDistributed SchedulingRedis
0 likes · 13 min read

This article analyzes a puzzling MySQL update where the operation reports success yet the data remains unchanged, explains the WAL mechanism and two‑phase commit process, and provides a step‑by‑step binlog investigation script to uncover the root cause.
MySQLTwo-Phase Commitbinlog
0 likes · 6 min read

This article explains the XA protocol, its two‑phase and three‑phase commit mechanisms, the limitations of traditional two‑phase commit, and how Seata implements an optimized XA mode on MySQL with detailed code examples and architectural diagrams.
MySQLSeataTwo-Phase Commit
0 likes · 10 min read


ITPUBMar 29, 2021 · Databases
This article provides a comprehensive technical overview of YugabyteDB, covering its two‑layer logical architecture, tablet‑based distributed storage with Raft groups, RocksDB‑backed local storage design, hybrid hash‑range partitioning, and the MVCC‑based two‑phase‑commit transaction model using Hybrid Logical Clocks.
Distributed DatabaseMVCCRocksDB
0 likes · 15 min read

This article provides a comprehensive technical guide to distributed transactions, covering ACID fundamentals, consistency models, sharding techniques, CAP and BASE theories, and detailed implementations of two‑phase, three‑phase, and TCC protocols, while highlighting their advantages, limitations, and practical considerations.
BASE theoryCAP theoremSharding
0 likes · 23 min read

The article uses Starbucks' coffee‑ordering process to illustrate asynchronous order handling, correlation identifiers, exception‑handling strategies, two‑phase commit, and conversation patterns, showing how real‑world practices inform the design of reliable distributed messaging systems.
Asynchronous MessagingTwo-Phase Commitcorrelation
0 likes · 8 min read

This article explains the Paxos consensus algorithm by mapping its roles and phases to characters and events from the Three Kingdoms era, detailing the Prepare and Accept stages, proposal numbering, and how proposers, acceptors, and learners achieve fault‑tolerant agreement in distributed systems.
Basic PaxosConsensusMulti-Paxos
0 likes · 13 min read

This article explains the importance of data consistency in distributed microservice systems, introduces the Saga pattern as a solution, compares it with two‑phase commit and TCC, and details its architecture, recovery mechanisms, and implementation considerations within ServiceComb.
Data ConsistencyTCCTwo-Phase Commit
0 likes · 19 min read

This article uses the story of Tai Chi from the novel *The Heaven Sword and Dragon Saber* to explain the CAP theorem, ACID properties, BASE theory, and two‑phase commit in distributed systems, illustrating how consistency, availability, and partition tolerance correspond to the hard and soft aspects of Tai Chi.
ACIDBASECAP
0 likes · 14 min read

This article explains the fundamentals of distributed consistency, covering the CAP theorem, BASE model, two‑phase and three‑phase commit protocols, Paxos and Raft consensus algorithms, Zookeeper’s ZAB protocol, and Amazon Dynamo’s NWR model with vector clocks for conflict resolution.
BASECAP theoremPaxos
0 likes · 36 min read

The article uses Starbucks' coffee‑ordering process as a concrete analogy to explain asynchronous messaging, correlation, error‑handling strategies such as write‑off, retry and compensation, and why two‑phase commit is unsuitable for high‑throughput services.
Asynchronous MessagingRetryTwo-Phase Commit
0 likes · 9 min read

This article explains the distinct purposes of MySQL's InnoDB redo log and server‑level binlog, how they work together during large update operations, the concepts of write position, checkpoint, and two‑phase commit, and why both logs are essential for durability and replication.
Database LoggingInnoDBMySQL
0 likes · 8 min read

The article uses Starbucks' coffee‑ordering workflow as a real‑world analogy to explain asynchronous messaging patterns, correlation challenges, exception handling strategies, and why two‑phase commit can hinder scalability, illustrating how everyday processes inspire robust distributed system designs.
Asynchronous MessagingTwo-Phase Commitcompensation
0 likes · 8 min read


21CTOAug 5, 2020 · Databases
Distributed transactions require careful coordination to maintain consistency across multiple nodes, and this article explores core concepts such as atomic operations, two‑phase and three‑phase commit protocols, deterministic Calvin ordering, Google Spanner’s TrueTime and Paxos‑based approach, as well as advanced techniques like Percolator, RAMP, and coordination avoidance.
Calvin protocolRampSpanner
0 likes · 33 min read


ITPUBJul 28, 2020 · Databases
This article explains MySQL Binlog’s role in event‑driven order processing, analyzes hidden pitfalls such as premature Binlog reads and two‑phase commit issues, and offers practical solutions like retry strategies and direct Binlog consumption to ensure data consistency.
Database LogsMySQLTwo-Phase Commit
0 likes · 14 min read

This article explains the key characteristics of distributed systems, introduces the CAP and BASE theories, compares strong, weak and eventual consistency models, and reviews common distributed transaction solutions such as two‑phase commit, TCC and message‑based approaches, highlighting their trade‑offs and practical considerations.
BASE theoryCAP theoremTCC
0 likes · 13 min read

This article explains MySQL's support for XA distributed transactions, describes the two‑phase commit process, details the XA syntax, and walks through a complete hands‑on example that transfers money between two databases using XA START, END, PREPARE, RECOVER and COMMIT commands.
MySQLSQLTwo-Phase Commit
0 likes · 11 min read

This article explains the fundamentals of distributed transactions, compares five major solutions—including XA two‑phase commit, TCC, Saga, message‑based approaches, and maximum‑effort notification—covers their architectures, advantages, drawbacks, and provides guidance on selecting the right model for micro‑service systems.
SagaSeataTCC
0 likes · 27 min read

MySQL achieves crash‑safe durability by employing a write‑ahead log architecture that records changes in redo, undo, and binary logs, coordinates them through two‑phase and group commit to maintain order, and uses a structured recovery process to replay or roll back transactions after any failure.
Crash SafetyGroup CommitMySQL
0 likes · 17 min read

This article provides a comprehensive technical overview of Seata's newly introduced XA transaction mode, explaining the XA protocol, its advantages over compensation‑based modes, the design and implementation details within Seata, and practical usage guidelines for developers.
SeataTwo-Phase CommitXA
0 likes · 15 min read

This article examines the pressures driving banks to redesign their core database systems, compares three distributed‑access approaches, explains the components of modern distributed databases, analyzes two‑phase and three‑phase commit issues, and evaluates consensus algorithms, CAP/BASE trade‑offs, GTM design, and point‑in‑time recovery.
CAP theoremGTMRaft
0 likes · 19 min read


21CTONov 26, 2019 · Fundamentals
This article explains the fundamentals of distributed transactions, compares local and global transaction models, examines protocols like XA and 2PC, introduces flexible transaction patterns such as TCC and compensable operations, and evaluates reliable message‑based solutions for achieving eventual consistency.
BASE theoryTCCTwo-Phase Commit
0 likes · 15 min read

The article explains distributed consistency problems and the two‑phase commit (2PC) protocol using a restaurant kitchen and a multiplayer game analogy, detailing how a coordinator ensures atomic transactions across multiple services and discussing the inherent drawbacks of 2PC.
ACIDConsistencyTwo-Phase Commit
0 likes · 10 min read

OceanBase’s TPC‑C benchmark demonstrates how its distributed database achieves high durability, atomicity, isolation, and consistency on commodity cloud servers using Paxos‑based log replication, two‑phase commit, MVCC, and replicated tables, highlighting the architectural challenges and solutions for ACID compliance.
ACIDDistributed DatabaseMVCC
0 likes · 10 min read

This article explains the fundamentals of the two‑phase commit protocol, details its two stages (prepare and commit), discusses its advantages and drawbacks, and shows how Apache Flink implements 2PC for exactly‑once semantics with Kafka using the TwoPhaseCommitSinkFunction and related code examples.
FlinkKafkaTwo-Phase Commit
0 likes · 9 min read

This article explains how CB‑SQL improves distributed transaction performance by introducing a transaction record table, parallel prepare requests, one‑phase commit for single‑shard writes, latch‑based consistent reads, transaction pipelines, and a staged parallel‑commit mode, dramatically reducing latency and I/O overhead.
CB-SQLLatchRaft
0 likes · 13 min read

This article explains Alipay's TCC (Try‑Confirm‑Cancel) distributed transaction model, its two‑phase workflow, a concrete transfer example, common failure scenarios, and the pros and cons of using TCC in backend systems.
Application LayerTCCTwo-Phase Commit
0 likes · 6 min read

This article explains how Apache Flink’s TwoPhaseCommitSinkFunction, introduced in version 1.4, enables end-to-end exactly-once semantics when integrated with Apache Kafka, detailing the checkpoint mechanism and the two-phase commit protocol that ensures reliable data processing.
Apache FlinkApache KafkaTwo-Phase Commit
0 likes · 4 min read

This article explains why transactions are essential, traces their origin from early XA specifications, examines the CAP and BASE theories that expose challenges in distributed systems, and reviews practical solutions such as two‑phase commit, three‑phase commit, TCC, asynchronous messaging, Saga and Gossip protocols, highlighting their trade‑offs and when to apply each.
BASE theoryCAP theoremSaga pattern
0 likes · 17 min read

Distributed transactions ensure atomicity across services, and RocketMQ provides a half-message mechanism with a two-phase commit and a rollback check that lets producers and consumers coordinate transaction steps reliably even when confirmations are delayed.
RocketMQTwo-Phase Commitdistributed transactions
0 likes · 4 min read

The article explains the necessity of transactions, traces their origins from database XA specifications to modern distributed systems, compares CAP and BASE theories, and reviews mainstream solutions such as two‑phase commit, three‑phase commit, TCC, asynchronous messaging, and the Saga pattern.
BASE theoryCAP theoremSaga pattern
0 likes · 14 min read

This article explains Vitess’s two‑phase commit mechanism for distributed transactions, covering the ACID properties, shard architecture, transaction manager roles, detailed code flow, metadata handling, preparation, commit, rollback, and various failure scenarios, along with practical examples and performance considerations.
GoTwo-Phase CommitVitess
0 likes · 25 min read

This article introduces the fundamentals of distributed transactions, explains the ACID properties of transactions, compares local and distributed transaction architectures, and provides detailed analyses of two common distributed transaction models—X/Open XA and TCC—including their atomicity, isolation, consistency mechanisms and practical trade‑offs.
ACIDTCC-modelTwo-Phase Commit
0 likes · 20 min read

The article explains how distributed transactions work in microservice architectures, using inventory‑order examples and a World of Warcraft raid analogy to illustrate the XA two‑phase commit protocol, its normal and failure flows, limitations, and alternative approaches such as three‑phase commit, message‑queue and TCC transactions.
ConsistencyTwo-Phase CommitXA protocol
0 likes · 7 min read

This article explains the fundamentals of database transactions, the ACID properties, and how they extend to distributed environments, covering two‑phase commit, three‑phase commit, and the TCC model while discussing their advantages, limitations, and practical examples.
ACIDTCCTwo-Phase Commit
0 likes · 13 min read

The article uses everyday observations from a McDonald’s restaurant to illustrate core distributed system concepts such as master‑slave architecture, two‑phase commit, microservice decomposition, task queues, and container orchestration, showing how these principles apply to backend engineering.
CassandraHBaseMaster‑Slave
0 likes · 15 min read


21CTOSep 29, 2017 · Databases
The article examines how to achieve data consistency in distributed internet systems by comparing strong and eventual consistency, detailing local database transactions, two‑phase commit protocols, rollback mechanisms, local message tables, and compensation strategies, and discusses their trade‑offs and suitable application scenarios.
Two-Phase Commitcompensationdistributed transactions
0 likes · 11 min read

This article examines various consistency solutions for distributed systems, including strong and eventual consistency, local database transactions, two‑phase commit, TCC, rollback mechanisms, local message tables, and compensation techniques, illustrating their trade‑offs and appropriate application scenarios.
ConsistencyTransactionsTwo-Phase Commit
0 likes · 13 min read

This article walks through the evolution of distributed transaction architectures—from simple single-database transactions, through post-commit multi-database approaches and two-phase commit, to TCC and eventual-consistency patterns—illustrating each method with game-style purchase examples, diagrams, and practical implementation tips.
TCCTwo-Phase Commiteventual consistency
0 likes · 15 min read

The article explains how achieving high availability through data redundancy introduces consistency challenges that in turn affect performance, and it reviews partitioning, mirroring, consistency models, replication architectures, and two/three‑phase commit protocols in distributed systems.
Data ConsistencyHigh AvailabilityReplication
0 likes · 18 min read

This article explains the challenges of achieving consistency in distributed systems and presents practical solutions such as two‑phase commit, asynchronous assurance, compensating transactions, message retry mechanisms, idempotent designs, and a custom Redis‑based delayed queue (DelayQ) with a transactional proxy (TMQProxy) to provide reliable transactional messaging.
IdempotencyMessage RetryRedis delay queue
0 likes · 19 min read

This article introduces core distributed‑system concepts—including the definition of consensus, the two‑phase and three‑phase commit protocols, the CAP theorem and its engineering implications, and logical‑clock mechanisms such as Lamport timestamps, vector clocks, and version vectors—explaining their models, challenges, and practical trade‑offs.
CAP theoremConsensusLamport timestamps
0 likes · 21 min read

This article examines the fundamental challenges of achieving consistency in distributed systems, explains the CAP theorem, compares two‑phase and three‑phase commit protocols, explores XA transactions, and presents practical compensation patterns such as local message tables, non‑transactional and transactional MQ designs, highlighting their trade‑offs and applicability.
CAP theoremMessage QueueTransaction Consistency
0 likes · 15 min read

The article explains the drawbacks of traditional two‑phase commit distributed transactions—reduced availability, performance, and scalability—and proposes a message‑queue‑plus‑state‑table pattern with idempotent processing to achieve eventual consistency while improving system throughput.
Message QueueTwo-Phase Commitbackend architecture
0 likes · 7 min read

This article explains how TiKV implements multi-version concurrency control (MVCC) on top of RocksDB and details its two‑phase commit transaction model, including Prewrite and Commit phases, Percolator‑style optimizations, lock handling, conflict resolution, and garbage‑collection strategies.
MVCCPercolatorRocksDB
0 likes · 14 min read

The article examines the challenges of distributed transactions in large‑scale microservice architectures and compares three main approaches—traditional two‑phase commit, stateless queue‑based eventual consistency with event sourcing and CQRS, and transaction compensation techniques such as TCC—highlighting their trade‑offs and real‑world examples like Flipkart.
Two-Phase Commitcqrsdistributed transactions
0 likes · 8 min read


21CTOJan 9, 2016 · Backend Development
This article explains the challenges of ensuring data consistency across multiple databases during operations like Alipay transfers, introduces local and distributed transactions, details the two‑phase commit protocol, and shows how reliable messaging can replace heavyweight distributed transactions for high‑concurrency systems.
Data ConsistencyMessage QueueTwo-Phase Commit
0 likes · 10 min read

The article explains how to maintain data consistency when updating related tables by using local transactions for single‑node databases, distributed two‑phase commit for multi‑node systems, and reliable message‑queue patterns—including deduplication techniques—to avoid the performance pitfalls of traditional distributed transactions.
Data ConsistencyMessage QueueTwo-Phase Commit
0 likes · 10 min read


21CTOSep 10, 2015 · Databases
To prevent data inconsistencies when transferring funds—like moving money from Alipay to Yu'ebao—the article explores local transactions, the limitations of two-phase commit in distributed systems, and how reliable message queues can achieve eventual consistency without sacrificing performance.
Data ConsistencyMessage QueueTwo-Phase Commit
0 likes · 11 min read


21CTOAug 14, 2015 · Backend Development
This article explores how to maintain data consistency across services by using local transactions, two‑phase commit distributed transactions, and reliable message‑queue patterns, illustrating each method with an Alipay‑to‑YuEBao transfer example and discussing their trade‑offs.
Data ConsistencyMessage QueueTwo-Phase Commit
0 likes · 11 min read
