Tagged articles
22 articles
Page 1 of 1
Su San Talks Tech
Su San Talks Tech
Jan 20, 2026 · Databases

How to Ensure Data Consistency Between Database and Cache in High‑Concurrency Scenarios

This article examines the common data‑consistency problems that arise when updating both a database and a cache under high concurrency, evaluates four typical write‑order strategies, and presents the most reliable solution—writing to the database first and then safely invalidating the cache using retry, scheduled tasks, MQ, or binlog listeners.

ConsistencyMQRetry
0 likes · 17 min read
How to Ensure Data Consistency Between Database and Cache in High‑Concurrency Scenarios
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
NetEase Cloud Music Tech Team
NetEase Cloud Music Tech Team
Jan 2, 2024 · Backend Development

Cache Design and Optimization Practices for High‑Concurrency Music Library Service

The article details NetEase Cloud Music’s high‑concurrency cache architecture—using lazy‑load, hole‑wrapped objects for penetration protection, placeholder values for missing data, horizontal and vertical scaling with consistent hashing, and asynchronous binlog‑driven invalidation—to achieve sub‑millisecond reads for a read‑heavy, write‑light music library.

Distributed SystemsScale‑Upcache invalidation
0 likes · 12 min read
Cache Design and Optimization Practices for High‑Concurrency Music Library Service
IT Services Circle
IT Services Circle
May 5, 2023 · Backend Development

Implementing Cache‑Database Consistency with Canal, MySQL, Redis and RabbitMQ

This article demonstrates how to achieve cache‑database consistency by updating MySQL first, deleting Redis cache asynchronously via Canal, publishing change events to RabbitMQ, and handling acknowledgments manually in a Spring Boot application, complete with configuration steps and troubleshooting tips.

CanalMessage QueueRabbitMQ
0 likes · 11 min read
Implementing Cache‑Database Consistency with Canal, MySQL, Redis and RabbitMQ
Java High-Performance Architecture
Java High-Performance Architecture
Feb 11, 2023 · Backend Development

How to Ensure Data Consistency Between Cache and Database: Strategies and Trade‑offs

This article examines the challenges of keeping cache and database data synchronized, categorizes data by real‑time requirements, and evaluates four cache‑write strategies—updating the database first, deleting cache first, and their variations—highlighting their advantages, pitfalls, and practical solutions such as delayed double deletion, forced master reads, and binlog‑driven cache updates.

Cache Consistencycache invalidation
0 likes · 8 min read
How to Ensure Data Consistency Between Cache and Database: Strategies and Trade‑offs
High Availability Architecture
High Availability Architecture
Jun 24, 2022 · Backend Development

Improving Cache Invalidation and Consistency at Scale

Meta engineers describe the challenges of cache invalidation and consistency in large‑scale distributed systems, explain why stale caches are problematic, present their Polaris observability service and consistency‑tracking techniques, and detail how they raised TAO’s cache consistency from six‑nines to ten‑nines.

ConsistencyDistributed Systemscache invalidation
0 likes · 17 min read
Improving Cache Invalidation and Consistency at Scale
Top Architect
Top Architect
May 24, 2022 · Backend Development

Comprehensive Guide to Cache Optimization and Design Strategies

This article presents a comprehensive overview of cache optimization techniques, covering benefits and costs, update policies, granularity control, penetration and avalanche mitigation, hot‑key reconstruction, and distributed batch‑operation strategies, with practical examples using Redis and MySQL.

BackendDistributed Systemscache invalidation
0 likes · 14 min read
Comprehensive Guide to Cache Optimization and Design Strategies
Selected Java Interview Questions
Selected Java Interview Questions
Mar 1, 2022 · Backend Development

Cache Consistency Strategies: From Simple Write‑Through to Binlog Subscription

This article explains why caching is essential for high‑concurrency systems, analyzes the challenges of keeping database and cache data consistent, and compares five practical cache‑invalidation strategies—including write‑after‑DB, delete‑before‑write, delayed double delete, queue‑based deletion, and binlog subscription—highlighting their trade‑offs and suitable scenarios.

BackendBinlogCache
0 likes · 10 min read
Cache Consistency Strategies: From Simple Write‑Through to Binlog Subscription
Top Architect
Top Architect
Dec 4, 2021 · Backend Development

Cache Usage Techniques and Design Solutions: Benefits, Costs, Update Strategies, Granularity, and Common Optimizations

This article explains how caching can accelerate read/write performance and reduce backend load, analyzes its benefits and costs, discusses update strategies, granularity control, and solutions for common problems such as cache penetration, empty‑hole, avalanche, and hot‑key reconstruction, providing practical guidelines for robust backend design.

Backend PerformanceDistributed Systemscache invalidation
0 likes · 14 min read
Cache Usage Techniques and Design Solutions: Benefits, Costs, Update Strategies, Granularity, and Common Optimizations
Sohu Tech Products
Sohu Tech Products
Sep 8, 2021 · Backend Development

Why Client‑Side Caching Is Needed and How Redis Tracking Works

This article explains the motivation for client‑side caching, what data should be cached, and details the Redis tracking feature—including normal, broadcast, and redirect modes—while providing implementation examples and best‑practice guidelines for reducing latency and load on Redis servers.

BackendClient Side Cachingcache invalidation
0 likes · 9 min read
Why Client‑Side Caching Is Needed and How Redis Tracking Works
Code Ape Tech Column
Code Ape Tech Column
Aug 25, 2021 · Backend Development

Common Pitfalls and Best Practices of Distributed Caching with Redis and Memcached

This article examines the characteristics of Redis and Memcached as distributed cache solutions, outlines common design pitfalls such as consistency, cache penetration, breakdown, avalanche, and hot‑key issues, and provides practical strategies—including consistent hashing, binlog‑driven invalidation, message‑queue indexing, and lock mechanisms—to build reliable and high‑performance caching layers in backend systems.

Cache ConsistencyMemcachedcache invalidation
0 likes · 18 min read
Common Pitfalls and Best Practices of Distributed Caching with Redis and Memcached
Programmer DD
Programmer DD
Jan 5, 2021 · Backend Development

Why IntelliJ Shows Red Import Errors After Changing JDK and How to Fix Them

After changing a project's JDK in IntelliJ IDEA, imports of your own classes may appear in red despite the code compiling, but you can eliminate these false errors by invalidating caches and restarting the IDE, as detailed in this step‑by‑step guide.

Import ErrorsIntelliJ IDEAJDK Configuration
0 likes · 2 min read
Why IntelliJ Shows Red Import Errors After Changing JDK and How to Fix Them
NetEase Game Operations Platform
NetEase Game Operations Platform
Jul 27, 2019 · Databases

Using Redis Secondary Indexes to Replace FLUSHDB for Targeted Cache Invalidation

The article examines the risks of using the dangerous FLUSHDB command in Redis, explores common alternatives like SCAN, async deletion, and expiration, and proposes a secondary‑index solution using sets and sorted sets to efficiently invalidate only the affected cache entries without blocking the service.

Data StructuresFLUSHDBcache invalidation
0 likes · 11 min read
Using Redis Secondary Indexes to Replace FLUSHDB for Targeted Cache Invalidation
Java Backend Technology
Java Backend Technology
May 20, 2018 · Backend Development

Which Cache Update Strategy Guarantees Consistency? A Deep Dive into DB‑Cache Synchronization

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.

BackendCacheConsistency
0 likes · 10 min read
Which Cache Update Strategy Guarantees Consistency? A Deep Dive into DB‑Cache Synchronization
Architects' Tech Alliance
Architects' Tech Alliance
Aug 30, 2017 · Backend Development

Mastering Cache: When, How, and Pitfalls for Backend Developers

This article explains why caching is essential for backend services, outlines common cache problems such as penetration, concurrency, and avalanche, and compares cache-aside, read/write‑through, and write‑back patterns with practical guidance on choosing and updating caches.

Backendcache invalidationcache patterns
0 likes · 8 min read
Mastering Cache: When, How, and Pitfalls for Backend Developers
Vipshop Quality Engineering
Vipshop Quality Engineering
Jul 11, 2017 · Backend Development

Why Master‑Slave Sync Delays Break Your Order Cache and How to Fix It

An order system retrieved incorrect product size data due to master‑slave database lag causing stale Redis cache, and the article explains the original flawed flow, the revised solution that writes to cache during sync, and best practices for cache updates, read‑through, and QA testing.

Backend ArchitectureRead-Write Separationcache invalidation
0 likes · 5 min read
Why Master‑Slave Sync Delays Break Your Order Cache and How to Fix It
MaGe Linux Operations
MaGe Linux Operations
Jul 5, 2016 · Fundamentals

How Web Caches Work: From Hits to Expiration Explained

This article explains the fundamentals of web caching, covering cache concepts, hit and miss workflows, expiration handling, conditional validation methods, and multi‑level cache strategies used in HTTP to improve performance and ensure data freshness.

Cache-ControlConditional RequestsHTTP Caching
0 likes · 15 min read
How Web Caches Work: From Hits to Expiration Explained
Qunar Tech Salon
Qunar Tech Salon
May 4, 2016 · Backend Development

Proactive Cache Refresh Strategies for Memcached to Prevent Cache Stampede

This article examines various techniques for proactively refreshing Memcached entries before they expire, including dual‑key schemes, timestamp‑based checks, and lock‑based updates, and presents a preferred Java implementation that minimizes cache‑stampede and reduces memory overhead.

Cache RefreshMemcachedcache invalidation
0 likes · 7 min read
Proactive Cache Refresh Strategies for Memcached to Prevent Cache Stampede