The article explains various cache problems—including consistency, concurrency, penetration, avalanche, and the bottomless‑pit phenomenon—and presents practical mitigation techniques such as active updates, locking, empty‑object caching, request filtering, consistent hashing, and multi‑level caching to ensure reliable high‑performance systems.
This article analyzes the principles, advantages, and drawbacks of distributed locking with Redis and Zookeeper, comparing single‑node and cluster scenarios, discussing RedLock, EPHEMERAL znodes, and practical failure cases to help engineers choose the right solution.
This article provides a comprehensive overview of Redis, explaining why it’s chosen for performance and concurrency, how its single‑threaded design achieves speed, the various data types and their use cases, expiration and eviction strategies, consistency challenges with databases, and solutions for cache penetration, avalanche, and key‑concurrency issues.
This article examines three common cache‑update strategies, explains why some lead to data inconsistency, and proposes practical solutions such as delayed double‑delete, asynchronous retries, and message‑queue based recovery to maintain cache‑database consistency in high‑concurrency systems.
This article provides a comprehensive overview of Redis, covering its performance benefits, single‑threaded speed, data types, expiration policies, memory eviction strategies, consistency challenges with databases, and practical techniques for handling cache penetration, snowball effects, and concurrent key conflicts.
The article explains the CAP theorem, its three properties—consistency, availability, and partition tolerance—how they influence database design, compares CA, CP, and AP classifications with examples, and discusses related concepts such as ACID, BASE, and practical design choices for distributed systems.
This article examines three common cache‑update approaches—updating the cache after the database, deleting the cache before the database write, and deleting after the database write—analyzes their drawbacks, and presents improved solutions such as delayed double‑delete, asynchronous retries, and binlog‑driven mechanisms.
This article examines three common cache‑update strategies, explains their concurrency and performance drawbacks, and proposes practical improvement techniques such as delayed double‑delete, asynchronous retries, and binlog‑based messaging to maintain consistency between cache and database.
This article provides a comprehensive review of Redis, covering why it’s used, its performance advantages, single‑threaded speed, data types and use cases, expiration policies, memory eviction strategies, consistency challenges, and practical solutions for cache penetration, avalanche, and concurrent key competition.
This article examines three common cache‑update approaches—updating the cache after the database, deleting the cache before updating the database, and updating the database then deleting the cache—analyzes their drawbacks, and presents practical solutions such as delayed double‑delete and retry mechanisms to ensure data consistency.
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.
This article, based on a 2017 PyCon talk, presents a comprehensive checklist for building Python library APIs, covering simplicity, consistency, flexibility, and security with concrete examples and actionable guidelines to help developers create intuitive and reliable interfaces.
This article explains why monolithic applications need to be split, outlines the preparatory steps for understanding business complexity and defining service boundaries, and provides detailed practical guidance on database vertical and horizontal splitting, global ID generation, migration, cut‑over strategies, consistency, and post‑split stability.
This article explores the importance of data consistency in distributed systems, illustrating real‑world scenarios, explaining consistency models such as strong, weak and eventual, and detailing the challenges and theories like CAP and BASE that guide system designers in balancing consistency, availability, and partition tolerance.
This article explains the core challenges of achieving consistency in distributed systems, describes consensus algorithms such as Paxos and Raft, discusses theoretical limits like the FLP impossibility and CAP theorem, and shows how trade‑offs among consistency, availability, and partition tolerance shape practical system design.
Database sharding, or splitting databases into multiple instances and tables, is essential for scaling backend systems; this article explains its importance, historical context, core concepts, storage stretching techniques, index and consistency handling, and provides a practical design example for transaction systems.
This article explains the motivations behind database sharding, defines the concept, explores its historical background, discusses storage stretching, indexing and consistency challenges, and presents a practical sharding design example for transaction systems.
This article explains why Xiaomi built Pegasus to replace HBase, describes its architecture—including MetaServer, ReplicaServer, partitioning, multi‑replica design and the PacificA consensus algorithm—covers implementation challenges such as load balancing, consistency, latency, testing, and outlines current status and future plans.
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.
This article explains the challenges of consistency in distributed systems, introduces the CAP theorem and ACID properties, describes common distributed transaction techniques such as local message tables, transactional message middleware like RocketMQ, and details the two‑phase and three‑phase commit protocols with their advantages and drawbacks.
This article explains the core concepts of distributed system consistency—including the CAP theorem, ACID properties, various distributed transaction techniques, and the two‑phase and three‑phase commit protocols—while illustrating practical implementations with message queues and local message tables.
This article explains the concept of linearizability, contrasts it with serializability, and describes how Google Spanner uses the TrueTime API and commit‑wait mechanisms to provide external consistency and reliable snapshot reads in a globally distributed database system.
PacificA is Microsoft’s generic replication framework for large‑scale distributed storage systems that provides strong consistency, separates configuration management from data replication, and uses a primary‑secondary model with lease‑based fault detection to ensure availability, correctness, and efficient operation across heterogeneous nodes.
This article examines the challenges of consistency in large‑scale distributed service systems, presents real‑world case studies such as payment transfers and order processing, and outlines practical patterns—including ACID/BASE theory, two‑phase and three‑phase commit, TCC, query, compensation, periodic reconciliation, and reliable messaging—to help engineers design robust, eventually consistent architectures.
This article examines the challenges of achieving consistency in large‑scale distributed service systems, outlines common inconsistency scenarios such as split‑brain and lost updates, and presents practical patterns—including ACID/BASE trade‑offs, two‑phase and three‑phase commit, TCC, query, compensation, and reliable messaging—to guide engineers in designing robust, eventually consistent architectures.
An in‑depth review of the heated debate between Redis creator antirez and distributed‑systems expert Martin Kleppmann over the safety of Redis’s Redlock algorithm, covering single‑node lock pitfalls, failover issues, timing assumptions, fencing tokens, and practical recommendations for when to use Redlock versus simpler locks.
The article explains that Paxos relies on a fixed set of voters (the majority) for consistency, shows why configuration‑driven member changes break the protocol, and introduces a simple dynamic membership algorithm that uses delayed activation windows to achieve atomic member updates without violating Paxos guarantees.
This article details how WeChat transformed its massive memory‑cloud storage by replacing the QuorumKV NWR protocol with a non‑lease Paxos design, optimizing PaxosLog, adopting DirectIO on HDDs, and implementing operational safeguards, resulting in dramatically lower latency, higher availability, and reduced failure rates.
This article explains how PhxSQL prioritizes strong linearizable consistency, high availability, serializable isolation, and full MySQL compatibility, and why it deliberately forgoes features such as multi‑write, sharding, and strict serializable isolation due to the high cost of distributed transactions and protocol complexity.
This article traces Facebook's evolution from a small social site to a global platform, explains how its massive data‑storage challenges led to the adoption of NoSQL solutions like Cassandra and HBase, and breaks down the core patterns, consistency models, and scaling techniques that power such large‑scale systems.
This article explains the CAP theorem—its three core properties, why a distributed system can satisfy at most two of them, the formal proof, practical strategies for handling partitions, and how modern databases and architectures attempt to work around its constraints.
This article shares Qunar's architecture and practical experience in designing a self‑developed high‑availability message middleware, covering its role in transaction processing, consistency guarantees, fault‑tolerance mechanisms, isolation, monitoring, and consumer design, and discusses trade‑offs and operational considerations.
Designing Quanmin K‑Song’s high‑scale messaging system requires careful capacity estimation of throughput, storage and network traffic, robust consistency via unique transaction IDs and operation logs, and avalanche prevention through selective retries, scaling and priority‑based throttling to maintain reliability under load.
This article explains why caching is essential for high‑performance data retrieval, compares LRU and LFU eviction policies, presents three Redis‑based cache implementations, and discusses consistency challenges and solutions such as eviction ordering, consistent hashing, and delayed eviction in distributed systems.
This article compares NoSQL and SQL databases, highlighting NoSQL’s strengths in scalability, flexible schemas, and performance, while also discussing its lack of unified standards, operational complexity, and why SQL remains essential for strong consistency and transactional integrity in critical systems.
This article examines the various scenarios in which MySQL can lose data, covering InnoDB and MyISAM engine behaviors, flush policies, master‑slave replication pitfalls, XA transaction handling, and practical solutions to improve consistency and availability.
This article outlines a comprehensive design for a high‑concurrency distributed backend system that handles tens of millions of page views, detailing group‑based data partitioning, master‑slave roles, consistency models, heartbeat services, and global coordination to achieve scalability and fault tolerance.
The article explains why consistency is essential in distributed systems, describes the CAP theorem, outlines various consistency models such as strong, weak, and eventual consistency, and discusses the trade‑offs between data correctness and system performance.
The article explains Amazon’s Dynamo distributed key‑value store architecture, covering its decentralized design, consistent hashing with virtual nodes, replication strategies, quorum‑based read/write parameters, vector‑clock versioning, failure detection, hinted handoff, scaling mechanisms, and how these techniques together provide high availability, scalability, and reliability.
FusionStorage is a distributed block storage solution for x86 servers that separates compute and storage, uses DHT‑based key‑value architecture, provides strong consistency and read‑repair mechanisms, and supports various cache media and advanced storage functions such as thin provisioning and synchronous replication.
This article explains why concurrent read‑write operations on a shared balance can cause inconsistencies, illustrates the problem with a purchase‑balance example, and shows how a Compare‑And‑Set (CAS) update clause guarantees atomicity and preserves data integrity.
The article analyzes the use of a master/slave architecture for distributed caching, explains why two clusters, CAS, and proxy are employed, discusses consistency and availability challenges, and evaluates possible mitigation strategies for cache failures.
This article systematically explores the distributed characteristics of NoSQL databases, covering consistency trade‑offs, replication techniques, anti‑entropy protocols, data placement strategies, failure detection, and coordinator election, while illustrating each concept with diagrams and practical examples.
This article examines the problems and trade‑offs of metadata protection in cloud object storage, highlighting the importance of reliability, availability, and consistency, and comparing primary‑secondary and multi‑replica models, including the WRN algorithm and practical operational considerations.
The article revisits the CAP theorem, explains why the classic "two‑of‑three" interpretation is misleading, compares ACID, BASE and CAP, discusses the role of latency, and presents practical strategies for detecting, handling, and recovering from network partitions in distributed systems.
The article explores three core design semi‑principles—priority, consistency, and feel—explaining how they guide designers and product managers to allocate interface resources, maintain predictability, and create positive user emotions that can determine product success.
This article explores three essential UI design principles—priority, consistency, and feeling—explaining how they guide user decisions, reduce cognitive load, and create a satisfying experience, while offering practical tips for product designers and managers.