Tagged articles
37 articles
Page 1 of 1
Tech Freedom Circle
Tech Freedom Circle
Dec 13, 2025 · Backend Development

What’s Wrong with Delayed Double Delete? How Top Tech Companies Elegantly Avoid It

The article explains the delayed double‑delete cache‑invalidation pattern, its four major drawbacks in high‑concurrency environments, and presents four production‑grade alternatives—event‑driven binlog updates, distributed‑lock with versioning, write‑through proxy layers, and logical‑delete with async cleanup—used by leading Chinese internet firms to achieve reliable data consistency.

Event-drivenVersioningcaching
0 likes · 21 min read
What’s Wrong with Delayed Double Delete? How Top Tech Companies Elegantly Avoid It
Architecture Digest
Architecture Digest
Sep 25, 2025 · Databases

How to Tackle MySQL Master‑Slave Replication Lag and Prevent Dirty Reads

This article explains why MySQL master‑slave replication lag causes dirty reads, breaks down the asynchronous replication pipeline, and presents three practical mitigation strategies—including semi‑synchronous replication, forcing reads from the master, and cache double‑delete techniques—so you can choose the right solution for your workload.

Replication LagSemi-synchronouscache invalidation
0 likes · 9 min read
How to Tackle MySQL Master‑Slave Replication Lag and Prevent Dirty Reads
Xiaohongshu Tech REDtech
Xiaohongshu Tech REDtech
Aug 7, 2025 · Databases

Achieving RPO=0: How XiaoHongShu’s Binlog Server Boosts MySQL Replication Speed and Data Consistency

This article explains how XiaoHongShu’s database team built a lightweight Binlog Server to accelerate semi‑synchronous MySQL replication beyond 300 MB/s, achieve RPO=0 data‑loss‑free failover, and improve high‑availability without manual intervention, backed by performance tests and detailed architecture diagrams.

Binlog ServerRPO=0Semi‑synchronous Replication
0 likes · 15 min read
Achieving RPO=0: How XiaoHongShu’s Binlog Server Boosts MySQL Replication Speed and Data Consistency
Architect
Architect
Apr 3, 2024 · Databases

Database and Cache Double-Write Consistency: Common Solutions and Best Practices

This article examines the data consistency challenges of writing to both databases and caches, outlines four common double‑write strategies, analyzes their pitfalls—especially under high concurrency—and recommends the optimal approach of writing to the database then deleting the cache, while discussing retry mechanisms, scheduled tasks, message queues, and binlog listeners.

Cachedatabase-consistencyhigh concurrency
0 likes · 15 min read
Database and Cache Double-Write Consistency: Common Solutions and Best Practices
Efficient Ops
Efficient Ops
May 9, 2023 · Databases

Building a Robust Database Consistency Check Tool for Seamless Migrations

This article examines the challenges of data consistency verification during database migrations, reviews existing tools like pt-table-checksum, sync‑diff‑inspector and gt‑checksum, outlines essential capabilities, and proposes a detailed workflow and future enhancements for a versatile, low‑impact consistency checking solution.

Data Migrationchecksum toolsdatabase-consistency
0 likes · 11 min read
Building a Robust Database Consistency Check Tool for Seamless Migrations
Top Architect
Top Architect
Mar 23, 2023 · Backend Development

Ensuring Consistency Between Cache and Database During Dual Writes

The article examines how to maintain data consistency between caches and databases during dual-write operations, categorizes data into three levels, evaluates four update strategies, and proposes solutions such as delayed double deletion, message‑queue compensation, and binlog‑driven cache synchronization.

database-consistencymysql
0 likes · 8 min read
Ensuring Consistency Between Cache and Database During Dual Writes
Sanyou's Java Diary
Sanyou's Java Diary
Oct 8, 2022 · Backend Development

How to Keep Cache and Database Consistent: Strategies, Pitfalls, and Best Practices

This article explains why cache‑database consistency is a classic challenge, compares common update‑then‑delete patterns, analyzes concurrency and master‑slave delay issues, and recommends reliable solutions such as asynchronous retries with message queues or binlog subscription to achieve eventual consistency.

asynchronous-retrycachingdatabase-consistency
0 likes · 18 min read
How to Keep Cache and Database Consistent: Strategies, Pitfalls, and Best Practices
Aikesheng Open Source Community
Aikesheng Open Source Community
Aug 25, 2022 · Databases

Understanding Data Consistency in MySQL Semi‑Synchronous Replication and HA Failover

This article explains the principles of MySQL semi‑synchronous replication, analyzes how data consistency is maintained during high‑availability failover, presents detailed step‑by‑step transaction flow, discusses scenarios causing GTID divergence, and offers testing methods and remediation techniques for DBA practitioners.

DBAGTIDSemi-sync replication
0 likes · 14 min read
Understanding Data Consistency in MySQL Semi‑Synchronous Replication and HA Failover
Baidu Geek Talk
Baidu Geek Talk
May 11, 2022 · Backend Development

Distributed Transactions: Concepts, TCC and Saga Patterns, and Practical Implementation

The article explains how micro‑service architectures create data‑consistency challenges that require distributed transaction strategies, compares strong‑consistency protocols like 2PC/3PC with eventual‑consistency approaches such as TCC and Saga patterns, and discusses their trade‑offs, implementation complexity, and suitability for real‑world scenarios like a points‑based sign‑in system.

Distributed TransactionsMicroservicesdatabase-consistency
0 likes · 11 min read
Distributed Transactions: Concepts, TCC and Saga Patterns, and Practical Implementation
Top Architect
Top Architect
Apr 20, 2022 · Databases

Understanding Distributed Transactions, Consistency Models, and Sharding in Database Systems

This article explains the fundamentals of distributed transactions, the ACID properties, various consistency models (strong, weak, eventual), sharding strategies (vertical and horizontal), the CAP and BASE theories, and the practical implementations of two‑phase, three‑phase, and TCC commit protocols, highlighting their advantages and drawbacks.

2PC3PCBASE
0 likes · 22 min read
Understanding Distributed Transactions, Consistency Models, and Sharding in Database Systems
IT Architects Alliance
IT Architects Alliance
Feb 20, 2022 · Backend Development

Cache Consistency Strategies for Database and Redis: Tiered Storage and Synchronization Techniques

The article examines tiered data storage and evaluates four cache‑synchronization strategies—updating the database before the cache, deleting the cache before updating the database, updating the cache before the database, and deleting the cache after a database update—highlighting their trade‑offs and practical solutions such as delayed double deletion, message‑queue retries, and binlog‑driven cache updates.

Backendcachingdatabase-consistency
0 likes · 8 min read
Cache Consistency Strategies for Database and Redis: Tiered Storage and Synchronization Techniques
Top Architect
Top Architect
Jan 24, 2022 · Backend Development

Ensuring Data Consistency Between Cache and Database in Double‑Write Scenarios

The article analyzes the challenges of maintaining data consistency when using both cache (local memory or Redis) and a database, classifies data by real‑time requirements, evaluates four double‑write strategies, and proposes practical solutions such as delayed double deletion, message‑queue compensation, and binlog‑driven cache updates.

BackendCachedata synchronization
0 likes · 8 min read
Ensuring Data Consistency Between Cache and Database in Double‑Write Scenarios
JavaEdge
JavaEdge
Jan 13, 2022 · Databases

Ensuring Redo Log and Binlog Consistency in InnoDB with Two‑Phase Commit

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.

BinlogInnoDBdatabase-consistency
0 likes · 4 min read
Ensuring Redo Log and Binlog Consistency in InnoDB with Two‑Phase Commit
dbaplus Community
dbaplus Community
Dec 7, 2021 · Backend Development

How to Ensure Cache‑Database Consistency: Strategies, Pitfalls & Best Practices

This article explains why caching improves performance, examines the trade‑offs between cache utilization and data consistency, analyzes concurrency‑induced inconsistency scenarios, compares update‑then‑delete versus delete‑then‑update approaches, and recommends asynchronous retry with message queues or binlog subscription to reliably keep cache and database in sync.

CacheDelayed Double Deleteasynchronous-retry
0 likes · 19 min read
How to Ensure Cache‑Database Consistency: Strategies, Pitfalls & Best Practices
DataFunSummit
DataFunSummit
Nov 22, 2021 · Databases

Rigid Transactions: Two-Phase Commit (2PC) and Three-Phase Commit (3PC) Explained

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.

Distributed TransactionsXA protocoldatabase-consistency
0 likes · 15 min read
Rigid Transactions: Two-Phase Commit (2PC) and Three-Phase Commit (3PC) Explained
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Oct 21, 2021 · Backend Development

Ensuring Cache and Database Consistency: Strategies and Best Practices

This article explains why cache‑database consistency is a classic problem, analyzes various update‑order and deletion strategies, discusses concurrency and replication delays, and recommends using the "update database then delete cache" approach combined with asynchronous retries via message queues or binlog subscription to achieve reliable eventual consistency.

database-consistency
0 likes · 23 min read
Ensuring Cache and Database Consistency: Strategies and Best Practices
Architect
Architect
Sep 14, 2021 · Fundamentals

Understanding Distributed Transactions: From Local ACID to CAP Theory and Message‑Queue Solutions

The article uses a personal bank‑transfer incident to introduce local transaction concepts, explains the CAP theorem, examines the challenges of distributed transactions, and presents a message‑queue‑based design with transaction logs and compensation mechanisms to ensure consistency and idempotency.

CAP theoremDistributed SystemsMessage Queue
0 likes · 15 min read
Understanding Distributed Transactions: From Local ACID to CAP Theory and Message‑Queue Solutions
IT Architects Alliance
IT Architects Alliance
Jul 11, 2021 · Backend Development

Understanding Distributed Transactions: Two‑Phase Commit, Message‑Queue Solutions, and RocketMQ Transactional Messaging

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.

Distributed TransactionsMessage QueueRocketMQ
0 likes · 21 min read
Understanding Distributed Transactions: Two‑Phase Commit, Message‑Queue Solutions, and RocketMQ Transactional Messaging
Tencent Architect
Tencent Architect
Apr 9, 2021 · Databases

Analysis of Inconsistencies in MySQL Slave Crash Recovery and Sync Master/Relay Log Info

This article analyzes how MySQL slave crashes can cause inconsistencies between master info and relay log positions during sync_master_info and sync_relay_log_info processes, presents case studies of duplicated events, explains the impact of different storage repositories (FILE vs TABLE), and recommends configuration settings to achieve server‑crash‑safe replication.

Relay LogReplicationSlave Crash
0 likes · 15 min read
Analysis of Inconsistencies in MySQL Slave Crash Recovery and Sync Master/Relay Log Info
IT Architects Alliance
IT Architects Alliance
Mar 7, 2021 · Databases

Mastering Distributed Transactions: From ACID to TCC and Sharding Strategies

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 theoremDistributed Transactions
0 likes · 23 min read
Mastering Distributed Transactions: From ACID to TCC and Sharding Strategies
21CTO
21CTO
Aug 5, 2020 · Databases

Understanding Distributed Transactions: 2PC, 3PC, Calvin, Spanner, and More

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 protocolDistributed TransactionsRAMP
0 likes · 33 min read
Understanding Distributed Transactions: 2PC, 3PC, Calvin, Spanner, and More
Alibaba Cloud Developer
Alibaba Cloud Developer
May 28, 2020 · Databases

Mastering Distributed Transactions: 5 Solutions, Patterns, and Their Trade‑offs

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.

Distributed TransactionsMicroservicesSeata
0 likes · 27 min read
Mastering Distributed Transactions: 5 Solutions, Patterns, and Their Trade‑offs
Selected Java Interview Questions
Selected Java Interview Questions
Oct 30, 2019 · Backend Development

Common Cache Problems and Their Solutions: Avalanche, Penetration, Concurrency, and DB‑Cache Inconsistency

This article explains typical cache issues such as cache avalanche, cache penetration, concurrent write conflicts, and database‑cache write inconsistency, and provides practical mitigation strategies including high‑availability setups, circuit breakers, placeholder values, distributed locks, double‑delete, and cache‑aside patterns.

cache-asidecache-avalanchecache-penetration
0 likes · 8 min read
Common Cache Problems and Their Solutions: Avalanche, Penetration, Concurrency, and DB‑Cache Inconsistency
ITFLY8 Architecture Home
ITFLY8 Architecture Home
Jun 14, 2019 · Databases

CAP Theory in Action: Choosing Consistency or Availability for Your Database

This article explains the ACID principles of relational databases versus the CAP principles of NoSQL systems, illustrates why distributed systems can only satisfy two of consistency, availability, and partition tolerance, and discusses how Eureka and Zookeeper embody AP and CP choices, especially during high‑traffic events like Double‑11.

CAP theoremNoSQLRDBMS
0 likes · 3 min read
CAP Theory in Action: Choosing Consistency or Availability for Your Database
Big Data and Microservices
Big Data and Microservices
Sep 20, 2018 · Backend Development

Why Distributed Transactions Matter: Concepts, Scenarios, and Solutions

This article explains the fundamentals of distributed transactions, why they arise in modern micro‑service architectures, outlines the ACID properties, presents typical use cases such as payments and order processing, and compares common implementation approaches like 2PC, message‑based eventual consistency, and TCC.

2PCDistributed TransactionsMessage Queue
0 likes · 12 min read
Why Distributed Transactions Matter: Concepts, Scenarios, and Solutions
ITPUB
ITPUB
May 24, 2018 · Databases

How Ant Financial Solved Distributed Transaction Challenges with TCC, FMT, and XA

This article reviews Ant Financial's evolution of distributed transaction solutions—from early SOA consistency issues to the high‑performance TCC model, the developer‑friendly FMT approach, and the real‑time XA integration with OceanBase—highlighting architectural decisions, optimizations, and practical outcomes.

Distributed TransactionsXAdatabase-consistency
0 likes · 20 min read
How Ant Financial Solved Distributed Transaction Challenges with TCC, FMT, and XA
dbaplus Community
dbaplus Community
Jul 26, 2017 · Databases

How Ele.me Achieved Sub‑Second MySQL Multi‑Active Replication with DRC

This article details Ele.me's design and implementation of a MySQL bidirectional replication component (DRC) that enables sub‑second, high‑throughput data synchronization across Beijing and Shanghai data centers, addressing latency, consistency, and failover challenges in a multi‑active environment.

Distributed Systemsdata replicationdatabase-consistency
0 likes · 18 min read
How Ele.me Achieved Sub‑Second MySQL Multi‑Active Replication with DRC
Java High-Performance Architecture
Java High-Performance Architecture
Mar 1, 2017 · Databases

Understanding MySQL Group Replication: Features, Differences, and Use Cases

MySQL 5.7.17 introduced Group Replication, a feature that ensures full data consistency across multiple MySQL nodes by synchronizing changes, offering high consistency, fault tolerance, elasticity, and flexible single‑master or multi‑master modes, making it suitable for elastic replication, high‑availability sharding, and as a replacement for traditional master‑slave replication.

Group Replicationdatabase-consistencymysql
0 likes · 4 min read
Understanding MySQL Group Replication: Features, Differences, and Use Cases
Architecture Digest
Architecture Digest
Nov 8, 2016 · Backend Development

Why Replace Distributed Transactions? A Message Queue and State‑Table Solution

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.

Backend ArchitectureDistributed TransactionsMessage Queue
0 likes · 7 min read
Why Replace Distributed Transactions? A Message Queue and State‑Table Solution
MaGe Linux Operations
MaGe Linux Operations
May 9, 2016 · Databases

Fix MySQL Replication Inconsistencies with pt‑table‑checksum & sync

Learn how to diagnose MySQL master‑slave data drift using Percona Toolkit’s pt‑table‑checksum, configure necessary replication parameters, and automatically reconcile differences with pt‑table‑sync, including installation steps, command syntax, required privileges, and troubleshooting common errors for reliable database consistency.

Replicationdatabase-consistencymysql
0 likes · 13 min read
Fix MySQL Replication Inconsistencies with pt‑table‑checksum & sync
dbaplus Community
dbaplus Community
Mar 28, 2016 · Backend Development

How to Keep Cache and Database Consistent: Invalidate First, Serialize Access

This article explains why cache and database can become inconsistent in distributed systems, why the "invalidate‑cache‑then‑write‑DB" rule is preferred, and presents practical serialization techniques—modifying DB and service connection pools—to guarantee per‑key sequential execution while maintaining availability and load balance.

Backend ArchitectureCacheConnection Pool
0 likes · 11 min read
How to Keep Cache and Database Consistent: Invalidate First, Serialize Access