The article explains common interview questions on distributed systems and compares transaction coordination methods, detailing the two‑phase commit drawbacks and introducing three patterns—TCC, asynchronous assurance, and maximum‑effort notification—along with their advantages, usage scenarios, and practical considerations.
This article presents a comprehensive guide to database sharding, covering implementation strategies, vertical and horizontal partitioning, global primary key generation techniques, framework versus custom solutions, multi‑data‑source transaction handling, and a novel, migration‑free scaling approach that combines incremental range and hash‑based routing.
This article explains the core functions of relational‑database middleware, dives into Sharding-JDBC’s architecture, performance characteristics, and implementation details such as sharding rules, SQL parsing, routing, rewrite, execution, result merging, and distributed primary‑key generation, and outlines its future roadmap.
The article explains how to break large transactions into small atomic operations combined with asynchronous messaging, describes ACID properties, presents banking and flow‑recharge scenarios, compares local and distributed (flexible) transactions, and details micro‑service architecture, compensation and async strategies to achieve eventual consistency.
Data Consistencyasynchronous notificationcompensation
This article explains the principles of distributed transaction design, covering ACID fundamentals, typical banking and e‑commerce scenarios, various transaction models such as two‑phase, compensation, asynchronous and best‑effort notifications, and presents a micro‑service architecture with concrete flow diagrams and scaling strategies for a high‑throughput traffic‑recharge platform.
Data Consistencydistributed transactionseventual consistency
Ensuring final data consistency in modern applications—whether enterprise or internet—requires understanding ACID, CAP, BASE theories and applying practical techniques such as single-database transactions, two-phase commit, transactional message queues, compensation tasks, async callbacks, and double-check mechanisms to build robust distributed systems.
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.
This article explains practical sharding implementation strategies, global primary‑key generation techniques, framework versus custom solutions, distributed transaction models, and a flexible expansion scheme that avoids data migration while maintaining performance and scalability.
The conversation covers practical challenges and solutions for distributed transactions, evaluates RPC frameworks like Thrift, Dubbo, and gRPC, discusses session replay attack mitigations, and explores reliable messaging patterns using queues and pub/sub systems such as RabbitMQ and Kafka.
The article details how Mogujie's e‑commerce transaction system evolved from a monolithic PHP application to a service‑oriented architecture through DB vertical sharding, service decomposition, custom sharding component TSharding, and performance optimizations such as asynchronous processing, caching, and distributed transaction handling to support rapid growth and high‑availability requirements.
This article explains why transactions are essential, describes the ACID properties, details MySQL's isolation levels and their effects, outlines InnoDB's redo/undo logging mechanism, and introduces distributed transaction models with two‑phase commit, providing practical examples and diagrams.
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.
The article examines the challenges of maintaining data consistency across distributed services in e‑commerce, explains strong, weak and eventual consistency models, and presents six practical solutions—including business integration, the eBay BASE pattern, Qunar, Mogujie, Alipay DTS, and Nongxin—highlighting how local transactions, idempotent messaging, and eventual consistency can replace heavyweight distributed‑transaction frameworks.
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.
This article explains the core concepts of database sharding, detailing vertical and horizontal partitioning methods, strategies for combining them, handling shared data, and addressing challenges such as distributed transactions, cross‑node joins, and aggregation queries, with practical insights for scalable system design.
The article explains the concepts of vertical and horizontal database splitting, compares their technical difficulties, discusses the impact on joins and transactions, and proposes practical approaches such as careful SQL refactoring, ORM decoupling, and selective use of distributed‑transaction techniques to maintain system stability and scalability.
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.
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.