This article provides a comprehensive overview of Redis memory management, detailing how maxmemory limits trigger various eviction policies, explaining the internal freeMemoryIfNeeded algorithm, and describing expiration mechanisms—including active and lazy deletion—and offering guidance on selecting the appropriate eviction strategy for different workloads.
This article investigates why a SpringBoot service takes 6‑7 minutes to start, identifies the bean‑scanning and bean‑initialization phases as the main performance culprits, and presents concrete JavaConfig and starter‑based solutions to reduce startup time to around 40 seconds while handling cache auto‑configuration pitfalls.
This article provides a comprehensive guide to Caffeine, a high‑performance Java local cache library, covering its fundamentals, loading strategies, eviction policies, refresh mechanisms, statistics, and step‑by‑step integration with Spring Boot using annotations such as @Cacheable and configuration examples.
Implementing pre‑warming in Spring involves using several extension points—SmartLifecycle, ApplicationListener for ContextRefreshedEvent, InitializingBean, @PostConstruct, ApplicationRunner, and CommandLineRunner—each with specific execution timing and ordering considerations to ensure cache loading occurs before the web server starts handling traffic.
The article recounts a developer's painful experience with un‑preheated Redis cache that caused severe latency spikes, then outlines practical cache warm‑up techniques such as gray‑release traffic, database scanning, and ETL‑driven data pipelines to prevent performance degradation and cache snowball effects.
This survey systematically reviews the research progress of in‑network storage systems, covering programmable network hardware characteristics, the two main challenges of building high‑performance solutions, task‑based classification of existing systems, representative designs, and future research directions such as switch‑NIC collaboration, multi‑tenant support, security, and automatic offloading.
The article outlines a systematic three‑step workflow—general service diagnostics, Redis‑specific checks, and reproducible load testing—to pinpoint a hot‑key‑driven CPU bottleneck, then evaluates mitigation options such as read‑write separation, pipelining, and an application‑level cache, ultimately showing the cache’s effectiveness in cutting latency and CPU usage.
BigKey and HotKey issues in Redis clusters arise when oversized keys block processing or a single key receives excessive requests, causing timeouts, memory overflow, shard collapse, and performance degradation, but can be detected during testing using Redis commands, visual clients, and open‑source analysis tools.
This article describes how a social live‑streaming platform designed and implemented a custom multi‑level cache consistency framework, detailing the background challenges, the architecture of a cache pipeline with Zookeeper‑based node discovery and retry‑enabled execution, and the integration SDKs that enable transparent cache clearing across services.
During a night‑time outage, a XCache (Codis + Pika) instance hung due to massive write load triggering low‑level protection, causing Sentinel to switch masters; the proxy’s accept queue filled with timed‑out sockets, blocking new connections, so scaling the proxy layer and expanding capacity restored service while prompting automation, health‑check, and queue‑overflow alerts.
This guide explains how to combine local and remote caches using Alibaba's JetCache in a Spring Boot project, covering dependency setup, configuration files, annotation‑based usage, advanced API methods, testing procedures, and common troubleshooting tips for a robust multi‑level caching solution.
This article explains how to use Redis BitMap to build an efficient sign‑in feature and continuous‑sign‑in statistics in a Spring Boot microservice, covering basic BitMap commands, integration steps, core source code, and a cache‑penetration solution using BitMap hashing.
This article explains what Redis hot keys are, how they cause load imbalance in clustered environments, and presents multiple detection techniques and practical mitigation strategies such as rate limiting, second‑level caching, key sharding, and configuration‑center approaches.
This article introduces Alibaba's JetCache Java caching framework, explains how to combine local and Redis remote caches for multi‑level caching, provides Maven dependencies, configuration examples, three usage patterns (AOP, API, advanced API), testing steps, and common troubleshooting tips for Spring Boot projects.
This article details the evolution and design of Vivo’s e‑commerce inventory platform, covering its layered architecture, multiple inventory types, deduction workflows, idempotent APIs, anti‑oversell mechanisms, high‑concurrency strategies, hotspot mitigation, and synchronization techniques, while explaining the reasoning behind each technical choice.
This article explains how Redis handles memory exhaustion by distinguishing expiration and eviction policies, detailing the maxmemory setting, enumerating all eviction strategies—including LRU and LFU algorithms—and showing how to view and modify these policies for optimal cache performance.
The article explains why using the KEYS command on a large Redis dataset can block the server, introduces the SCAN command as a non‑blocking alternative with cursor‑based iteration, and provides usage examples and best‑practice tips for safely listing prefixed keys.
This article explains how Ant Design's CSS‑in‑JS implementation uses server‑side rendering and a hash‑based cache to avoid runtime style generation, dramatically improving performance for both application‑level and component‑level styling.
This article explains how to build a three‑layer cache architecture for Spring Boot by integrating Redis as a distributed cache with Caffeine as a local cache, covering configuration, custom CacheManager implementation, message‑driven synchronization, and practical usage examples.
The article explains cache penetration, describes how to prevent it using a Redis‑based mutex lock and a logical expiration strategy, provides complete Java code examples for both approaches, compares their trade‑offs, and shows performance testing results under high concurrency.
This article provides an in‑depth overview of the Caffeine local cache library for Java, covering its concepts, configuration options, loading strategies, eviction policies, asynchronous usage, statistics collection, and step‑by‑step integration with Spring Boot including annotations and practical code examples.
This article explains how MyBatis implements first‑level (session) and second‑level (cross‑session) caches, the conditions required for each to work, why the first‑level cache often fails in Spring Boot without transactions, how to enable and use the second‑level cache safely, and the hidden risks of stale data when different mappers share related tables.
This article explains how to achieve efficient pagination and multi‑condition fuzzy searches in Redis by leveraging Sorted Sets for ordered paging, Hashes with HSCAN for pattern matching, and combining both techniques with caching and expiration strategies to optimize performance.
This article explains how MyBatis first‑level (session) and second‑level (cross‑session) caches work, the conditions required for them to function, common pitfalls when integrating with SpringBoot, and step‑by‑step instructions to enable and safely use second‑level caching in real projects.
The article analyzes the high‑CPU pressure on the outbox Redis cluster caused by feed‑stream read amplification during hot events, proposes a local‑cache solution for hot UPs, details its design, consistency mechanisms, and shows that the optimization cuts peak CPU usage by over 40% while achieving more than 55% cache hit rate.
WeChat’s multi‑dimensional monitoring platform faced severe query latency and I/O bottlenecks, so the team analyzed user behavior and Druid architecture, then introduced sub‑query splitting, Redis caching, and segment size reductions, achieving over 85% cache hit rate and reducing average query time to around 100 ms.
This article explains why local DNS caches can cause HTTP errors or DNS spoofing, shows how to view caches created by systemd‑resolved, nscd, and dnsmasq, and provides clear command‑line instructions for flushing those caches on Linux systems, including Chrome’s own DNS cache.
This article explains cache fundamentals, common use cases, design constraints, and a Go implementation that combines hash‑maps with doubly‑linked lists, LRU eviction, TTL handling, and mutex‑based concurrency control, providing practical code examples and deployment tips.
This article explains the multiple layers of CPU cache consistency, the MESI protocol, and how improper cache handling can dramatically slow programs, then demonstrates performance gains through code examples, prefetching, false‑sharing avoidance, and DMA strategies, offering practical guidance for low‑level optimization.
The article details how WeChat's multi‑dimensional metric monitoring platform, which handles billions of data points per minute, reduced average query latency from over 1000 ms to around 140 ms and achieved over 85% cache hit rate by analyzing query behavior, redesigning the data layer architecture, splitting queries into sub‑queries, adding Redis caching, and introducing sub‑dimension tables.
This article explains the causes of Redis cache penetration, avalanche, and thundering herd, and provides practical mitigation strategies such as caching null values, using white‑lists, Bloom filters, pre‑warming hot keys, staggered expirations, multi‑level caching, and lock mechanisms.
This article explains the three major Redis cache issues—penetration, avalanche, and breakdown—detailing their causes, real‑world examples, and practical mitigation strategies such as caching null values, using Bloom filters, staggering TTLs, multi‑level caching, and lock mechanisms to protect database stability.
An extensive guide to Redis data structures—including strings, hashes, lists, sets, sorted sets, streams, hyperloglog, geospatial, bitmap, and bitfield—detailing their use cases, underlying encodings, conversion thresholds, and internal implementation details with code examples.
This article introduces Redis HSET, covering its definition, suitable use cases, common commands for creating, reading, updating, and deleting hash fields, as well as the underlying encoding mechanisms (ziplist vs hashtable) and best practices, including the deprecation of HMSET.
This comprehensive guide explains Redis fundamentals, covering NoSQL basics, the five core data types and their internal storage mechanisms, persistence options (RDB and AOF), replication, Sentinel failover, publish/subscribe patterns, and common cache pitfalls such as penetration, breakdown, and avalanche, providing practical insights for developers and architects.
Memcached 1.6.18 has been released, bringing extensive fixes and enhancements to the proxy mode, extstore disk flushing, meta‑protocol changes, and numerous core and backend improvements, including signal handling, thread naming, Lua debugging, and clang‑15 build compatibility.
This article explains the four common Redis caching challenges—cache penetration, avalanche, breakdown, and data inconsistency—demonstrates their impact under high concurrency, and provides practical Java Spring Boot solutions including caching null objects, Bloom filters, distributed locks, random expiration, and delayed double‑delete strategies with full code examples.
This article explores Bloom filters—how they efficiently test set membership, their underlying principles, error rates, and practical usage in Java via Guava and Redisson, including code examples, configuration tips, handling cache penetration, and strategies for element deletion and periodic rebuilding.
This article presents a comprehensive design and implementation of a real‑time cache update system that leverages Kafka‑driven database change streams, a centralized cache scheduling center, executor registration, broadcast and fail‑over scheduling, and a lightweight SDK to achieve millisecond‑level cache consistency for C‑end services.
This article explains how to identify and reduce the excessive startup latency of a SpringBoot service by profiling the run method, customizing SpringApplicationRunListener and BeanPostProcessor, trimming component‑scan paths, and leveraging JavaConfig and starter mechanisms to avoid unnecessary bean loading and auto‑configuration overhead.
This article analyzes why a SpringBoot service takes minutes to start, identifies the bean‑scanning and bean‑initialization phases as the main performance culprits, and presents practical solutions such as narrowing scan packages, using JavaConfig for explicit bean registration, customizing SpringApplicationRunListener and BeanPostProcessor for timing, and leveraging SpringBoot starter mechanisms to streamline cache configuration.
This article explains the concept and purpose of caching, compares local and centralized cache approaches, introduces Spring's cache support and various CacheManager implementations, details GuavaCacheManager configuration and expiration strategies, demonstrates @Cacheable usage, and discusses common pitfalls such as cache miss due to internal method calls.
This article explains the concepts of cache penetration, cache breakdown (stampede), and cache avalanche in Redis, and provides practical solutions such as parameter validation, null‑value caching, Bloom filters, mutex locks, hot‑data non‑expiration, and randomizing expiration times, accompanied by Java code examples.
This article introduces Caffeine Cache as a modern local caching solution, explains its W‑TinyLFU algorithm advantages over Guava, demonstrates various loading and eviction strategies, and provides detailed Spring Boot integration examples with Maven dependencies, configuration, annotations, and custom bean setups.
This article introduces the Caffeine Java caching library, explains its flexible expiration and write policies, and provides detailed manual, synchronous, and asynchronous code examples with console output to demonstrate how to integrate and benchmark Caffeine for high‑performance backend services.
This article explains how Presto and Alluxio work together to query Iceberg tables, describes their architectures, deployment options, best‑practice recommendations such as using Iceberg native catalogs and local caches, and outlines future research directions for improving CPU usage and off‑heap caching.
This article describes how to dramatically reduce Jenkins‑based Docker build times for a BI project by analyzing the build pipeline, enabling Docker layer and application‑level caches, persisting node_modules with BuildKit, and applying minimal configuration changes that cut build duration from over 20 minutes to around four minutes.
Caffeine is a high‑performance, low‑memory Java cache library that outperforms alternatives in benchmarks, uses the W‑TinyLFU eviction algorithm, offers extensive configuration (capacity, weight, expiration, listeners, stats), and integrates seamlessly with Spring and Guava concepts.
The article details the design and implementation of NEMichelinCache, a cross‑platform cache library for React Native and H5, explaining the problems of the legacy cache, the architectural choices made, the modules introduced, and the measurable improvements in stability and speed achieved after deployment.
This article presents a comprehensive technical overview of Bilibili's Presto cluster architecture, the challenges of query performance on Hadoop, and the systematic optimizations—including Alluxio integration, local cache mechanisms, multi‑active coordinators, label‑based scheduling, and real‑time penalties—that together improve availability, stability, and latency for large‑scale analytics workloads.
This article explains the three main Redis cache anomalies—cache avalanche, cache penetration, and cache breakdown—detailing their symptoms, root causes, and practical mitigation strategies with Java code examples and architectural recommendations.
This article details how to dramatically reduce Jenkins‑triggered Docker build times for a BI project by enabling Docker layer and application‑level caches, configuring webpack caching, and leveraging BuildKit mount‑type caches to persist node_modules, achieving an 80% speedup with minimal configuration changes.
This article explains how to replace manual cache handling with Spring Cache annotations, introduces the concepts of L1 (Caffeine) and L2 (Redis) caches, discusses design considerations for consistency, null handling, eviction, and provides practical Maven and configuration examples for Java backend applications.
This article explains common Redis caching issues—cache penetration, cache breakdown, and cache avalanche—detailing their causes and practical mitigation techniques such as parameter validation, null caching, Bloom filters, mutex locks, hot‑data strategies, and staggered expiration to ensure system stability.
This article explains the fundamentals of Content Delivery Networks (CDN), how they cache object‑storage files, the DNS resolution process with CNAME records, origin‑pull behavior on cache misses, performance trade‑offs, and guidelines for when CDN integration is beneficial or unnecessary.
This article explains three common Redis cache issues—penetration, breakdown, and avalanche—detailing their causes and offering practical solutions such as parameter validation, empty-value caching, Bloom filters, mutex locks, and staggered expiration to keep systems reliable under heavy load.
This article explains how Linux’s free command reports memory usage, clarifies the roles of buffer and page caches, demonstrates which caches can be reclaimed, and shows why tmpfs, shared memory, and MAP_SHARED mmap allocations remain in cache until explicitly released.
This article explains how Linux’s free command reports memory usage, clarifies the roles of buffer and page caches, and demonstrates through practical experiments why certain caches—such as those used by tmpfs, shared memory, and MAP_SHARED mmap regions—cannot always be reclaimed as free memory.
This article describes how combining Redis and RabbitMQ to implement an asynchronous cache refresh mechanism significantly improves interface performance and stability for a high‑traffic used‑car platform, meeting strict tp99 latency requirements while maintaining data freshness.
This article provides an in‑depth tutorial on configuring and using the Caffeine caching library in Java, covering cache creation, property settings such as initial capacity, maximum size, weight, expiration policies, statistics collection, custom listeners, and advanced features like removal listeners and cache writers.
This article explains the problem of cache penetration, introduces Bloom filters as a space‑efficient probabilistic data structure to block invalid queries, demonstrates implementations using Guava and Redis with Java code, analyzes false‑positive rates, and discusses practical application scenarios and performance testing results.
This technical presentation explains how Bilibili reduced database pressure and query latency in its production environment by integrating Presto with Alluxio, detailing the offline cluster architecture, challenges of compute‑storage separation, caching strategies, consistency mechanisms, performance gains, and future work.
This article examines cache update strategies in high‑concurrency systems, analyzing the trade‑offs of delete‑then‑write versus write‑then‑write approaches, illustrating race conditions, and presenting solutions such as CAS, distributed locks, asynchronous updates, and delayed double‑delete to maintain data consistency.
The award‑winning VLDB 2022 paper introduces HET, a cache‑enabled distributed framework that dramatically reduces communication overhead for sparse trillion‑parameter embedding models, and Tencent Ads has industrialized this technology to train 10 TB‑scale models with up to 7×24‑hour online deep learning.
The article presents a comprehensive solution for improving interface reuse, domain‑model abstraction, and front‑back collaboration by building a GraphQL‑based Model Management Platform (GMP) that supports data‑model management, service orchestration, request generation, caching, authentication, and monitoring, complete with tooling and workflow integration.
The article analyzes the challenges of keeping cache and database consistent after write operations, evaluates four update‑order strategies, discusses their concurrency pitfalls, and presents practical solutions such as CAS, distributed locks, asynchronous updates, and delayed double‑delete techniques.
This article recounts a real‑world incident where a change to the Access‑Control‑Allow‑Origin header triggered CORS errors for credentialed requests, analyzes the CDN caching and Vary‑header issues that caused inconsistent responses, and outlines the steps taken to fix and prevent the problem.
This article explains MyBatis's first-level (SqlSession-scoped) and second-level (Mapper-scoped) caching mechanisms, their default behaviors, key generation, configuration options, and the impact of Spring integration, and provides recommendations for disabling caches in distributed environments to avoid data inconsistency.
This article explains MyBatis caching fundamentals, detailing first- and second-level cache concepts, configuration, cache invalidation scenarios, and custom cache integration with EHCache, supplemented by practical code snippets and quiz questions to illustrate cache behavior across SqlSessions.
This article explains the memory hierarchy—from registers to disks—covers cache fundamentals, the principle of locality, cache organization (including direct‑mapped caches), and provides guidelines and example code for writing cache‑friendly programs to improve performance.
The article explains how Redis cache expiration can cause a request avalanche that overloads databases, and presents mitigation techniques such as semaphore rate limiting, per‑key locking, fault‑tolerant cache rebuilding, and example Java code using Spring and Redis.
This article explains how I/O aggregation, full‑stripe writes, RAID write penalties, business I/O models (OLTP, OLAP, VDI, SPC‑1), SSD/SAS performance, FC link bandwidth, read/write ratios, sequential versus random I/O, I/O size impact, and cache acceleration affect storage system performance and capacity planning.
This article explains the core concepts of MyBatis caching, details how first‑level and second‑level caches work, shows configuration options, illustrates cache invalidation scenarios, and demonstrates custom cache integration with EHCache through practical code examples and test questions.
This article walks through a real‑world incident where a Redis cache big‑key caused service timeouts, explains how to identify the problem using cluster metrics, outlines detection tools and commands, and provides practical steps to delete big keys and prevent future occurrences.
This article introduces Google Guava's powerful utilities—including Joiner, Splitter, CharMatcher, Multiset, Multimap, BiMap, Table, Functions, Predicate, Cache, and asynchronous callbacks—explaining their advantages over standard JDK classes and demonstrating practical usage with code examples for Java developers.
The article outlines common database and cache failures—such as instance outages, replication lag, data corruption, and cache avalanches—while detailing Bilibili’s mitigation strategies including high‑availability architectures, scaling, multi‑active designs, proxy controls, slow‑query alerts, fault‑injection drills, and ongoing resilience improvements.
This article explains the principles, implementation steps, and configuration of MyBatis first‑level (SqlSession) and second‑level (mapper) caches, compares their scopes and behaviors, and provides practical guidance on when and how to enable each cache to improve database query performance.
This article explains how Redis stores key‑value pairs, details the internal data structures such as dict, dictEntry and redisObject, and provides practical memory‑saving tricks—including key shortening, encoding choices, object sharing, bitmap usage, hash consolidation, fragmentation handling, and 32‑bit deployment—to dramatically reduce RAM consumption while maintaining performance.
This article introduces Google Guava’s rich set of utilities for Java developers, covering string handling with Joiner/Splitter, character matching, primitive extensions, advanced collection types such as Multiset, Multimap, BiMap, Table, functional helpers, null‑checking, local caching, and asynchronous callbacks, all illustrated with examples and images.
This article examines the DBLE distributed database middleware cache, reproduces a primary‑key update query that returns incomplete results due to stale routing cache, analyzes cache contents via the management console, explains the cache’s behavior and limitations, and shows how disabling the primary‑key cache restores correct query routing.
This article explains how to interpret the Linux free command output, clarifies the roles of total, used, free, shared, buffers, and cached memory, describes the -/+ buffers/cache values, and provides commands for manually clearing swap and cache.
This article explains the complete MySQL execution flow, covering the connector's duties, permission tables, caching behavior, parsing of SQL statements, optimizer decision‑making, executor interaction with storage engines, processlist states, logical query order, and practical tips for ordering WHERE‑clause conditions.
By consolidating each user’s collected content into a single Redis hash, replacing per‑item SISMEMBER checks with a batch HMGET, and limiting cached IDs to the most recent 5,000, the redesign cut API latency by threefold, slashed Redis and MySQL query rates dramatically, and reduced memory and connection usage.
This article explains JD's design of a billion‑scale vehicle‑part matching cache, detailing the data model, bitmap storage structure, SDS pre‑allocation, key‑value compression, cluster routing, and Lua‑based high‑performance search interface that achieves sub‑13 ms latency.
This article explains Spring Boot's caching mechanism based on the JSR‑107 JCache specification, details core interfaces and implementations like Cache, AbstractValueAdaptingCache, and ConcurrentMapCache, demonstrates cache annotations such as @Cacheable, @CachePut and @CacheEvict, and shows how to replace the default in‑memory cache with Redis using Docker, StringRedisTemplate, and custom serialization.
This guide explains what caching is, why it’s essential for database‑driven applications, and how MyBatis implements first‑level and second‑level caches, including configuration steps, sample code, execution results, and key considerations to ensure effective cache usage.
This article introduces a Redis lazy‑loading caching strategy combined with Guava local cache, presents design diagrams and Java code examples, analyzes its advantages and disadvantages, and discusses suitable scenarios such as precise query workloads and micro‑service architectures.
This article explains the differences between buffers and caches, explores MySQL’s buffer pool architecture, details write‑through/write‑back strategies, and reviews key InnoDB parameters such as innodb_flush_log_at_trx_commit and innodb_flush_method for optimizing data durability and performance.
Redis is a single‑threaded, in‑memory data store offering rich structures, configurable expiration, multiple eviction policies, asynchronous master‑slave replication with Sentinel failover, durable RDB snapshots plus AOF logging, and native clustering that shards data across many masters for horizontal scalability and high availability.
This article explains Spring Boot caching by introducing the JSR‑107 JCache specification, detailing core cache interfaces, showing the Spring Cache abstraction and its implementations, demonstrating cache annotations such as @Cacheable, @CachePut and @CacheEvict, and finally covering Redis setup and custom CacheManager usage.
This article provides a comprehensive walkthrough of Linux kernel memory management, covering process address space layout, memory allocation mechanisms, OOM selection criteria, where allocated memory resides, and both manual and automatic memory reclamation techniques, complete with code examples and diagrams.
This article explains the fundamental differences between buffers and caches, details MySQL’s multi‑layer buffer architecture, and examines how write‑through, write‑back, and Direct I/O affect data durability and performance through various InnoDB flush parameters.
This article explains how to reduce Redis read/write pressure by using a lazy‑loading cache pattern together with Guava local cache, provides Java code examples, discusses advantages and disadvantages, and shows practical scenarios such as device ID generation in high‑frequency streaming systems.
This article explains how to combine Redis lazy‑loading caching with a Guava local cache to reduce Redis read/write pressure in high‑frequency data scenarios, provides Java code examples, discusses advantages and disadvantages, and offers practical guidance for backend developers.
This article explains how to combine Redis lazy‑loading cache with a Guava local cache to minimize memory usage while ensuring precise query performance, provides Java code examples for both lazy loading and device‑increment caching, and discusses the advantages, disadvantages, and suitable scenarios of the approach.
This comprehensive guide explains Redis's core data types—including String, List, Hash, Set, Zset, BitMap, HyperLogLog, GEO and Stream—detailing their internal implementations, common commands, and real‑world application scenarios such as caching, counting, messaging queues, ranking, geolocation and unique‑ID generation.