The paper presents a cluster‑aware Guava cache component for Alibaba’s Xianyu platform that mitigates downstream service failures by adding asynchronous reload, cluster‑wide key invalidation, and size reporting, enabling automatic fallback to refreshed local data and improving latency, with future plans for a management console, tiered storage, and disk‑backed caching.
This article explains Bloom filters, their core principles, typical use cases like cache penetration and large‑scale membership testing, and demonstrates practical Java implementations using Guava and Redis, including code examples, performance analysis, and discussion of their advantages and limitations.
This article explains how to build a two‑level caching solution in Java by defining a generic cache interface, implementing a local Guava‑based cache and a distributed Redis cache, configuring Spring Boot integration, handling versioned keys for timely expiration, and providing sample code and unit tests.
This article introduces the core features of Google Guava—including Joiner, Splitter, CharMatcher, primitive type helpers, Multiset, immutable collections, Multimap, BiMap, Table, functional utilities like Functions and Predicates, Optional, Preconditions, and a powerful local Cache—showcasing how they simplify Java development and improve code readability, safety, and performance.
This tutorial demonstrates multiple techniques for turning a Java String into a String[] array—including the basic split() method, a regular‑expression split, Guava utilities, and a concise Groovy approach—while providing complete code examples and output verification.
An in‑depth guide explains Guava’s Stopwatch utility, showing how to create, start, stop, and reset timers, customize the time source via Ticker, compare it with raw System.nanoTime or System.currentTimeMillis, and highlights its advantages for accurate performance measurement in Java and Android projects.
This article walks through building a two‑level caching system in Java, starting with a generic cache interface, implementing a local Guava cache, then adding a Redis distributed cache, and finally combining them with versioned keys to achieve timely expiration and seamless cache switching.
This article explains how to design and build a simple two‑level caching solution in Java, covering generic cache interfaces, local caching with Guava, distributed caching with Redis, configuration details, version‑controlled cache keys, and practical usage within a Spring Boot application.
This article explains the concept, principles, implementation details, and practical applications of Bloom Filters, including formulas for optimal bit array size and hash count, Java code examples using Guava, and common use cases such as deduplication, web crawling, and spam filtering.
This article explains Caffeine's high‑performance local cache features, presents JMH benchmark results that show it beating Guava, ConcurrentMap and ehcache, details its expiration, refresh and eviction mechanisms, compares memory usage and eviction algorithms, and provides migration code for Guava users.
This article explains the principles of rate limiting, compares the leaky bucket and token bucket algorithms, and demonstrates how Guava's RateLimiter (including SmoothBursty and SmoothWarmingUp implementations) works in Java with detailed code examples and execution flow.
This article explains the concept of high traffic, compares common mitigation techniques such as caching, degradation and rate limiting, and then details four classic rate‑limiting algorithms—counter, sliding window, leaky bucket and token bucket—followed by a practical Guava RateLimiter example and a brief note on distributed scenarios.
This article introduces a collection of practical Java utility classes—from Apache Commons StringUtils and DateUtils to Guava's Joiner and Stopwatch—showing how to simplify string handling, date conversion, collection checks, file I/O, and performance timing with concise code examples.
This article introduces the background and necessity of rate limiting, explains the leaky bucket and token bucket algorithms with visual diagrams, and provides a comprehensive Java implementation using Guava's RateLimiter, custom annotations, AOP interception, and controller integration to protect high‑traffic applications.
This article explains why retry strategies are essential for unreliable external services, introduces the flexible Guava‑Retrying library, provides detailed code examples, describes its core execution flow, shows how to add the Maven dependency, and outlines the key interfaces and strategies for configuring retries.
The article explains the principles of traffic shaping through leaky‑bucket and token‑bucket algorithms, details how Google Guava's RateLimiter implements token‑bucket rate limiting, and provides Java code examples illustrating token generation, acquisition, and practical usage in high‑concurrency backend systems.
This article explains how to build a simple two‑level caching solution in Java, covering generic cache interfaces, FIFO/LRU/LFU algorithms, implementing local Guava cache and distributed Redis cache, configuring Spring Boot, handling expiration, and providing a unified cache builder for seamless use.
This article explains the three essential tools for building high‑concurrency systems—caching, service degradation, and rate limiting—detailing their purposes, common algorithms such as counter, leaky bucket and token bucket, and providing concrete Java and Nginx configuration examples.
This article explains the principles of Bloom filters, their false‑positive behavior, and demonstrates how to implement them using Google Guava in Java and Redis ReBloom via Docker, including code examples and a practical membership‑filtering use case.
This article explains why traditional HashSet approaches run out of memory on huge integer collections, introduces Bloom Filter theory, walks through a custom Java implementation and performance tests, compares it with Google Guava's built‑in version, and analyzes the underlying source code to show how Bloom Filters achieve low‑memory, high‑speed existence queries with a controllable false‑positive rate.
This article shares practical insights on handling high‑concurrency traffic, explaining what constitutes large traffic, common mitigation strategies such as caching, downgrade, and focusing on rate‑limiting techniques—including counters, sliding windows, leaky‑bucket and token‑bucket algorithms—and demonstrates using Guava’s RateLimiter for Java applications.
This article traces iQIYI's five‑stage journey of Java caching—from simple database queries and in‑process HashMap caches, through Guava's advanced features addressing lock contention, expiration, and refresh, to the high‑performance Caffeine library with its W‑TinyLFU algorithm—while providing code examples and architectural insights.
This article traces iQIYI’s five‑stage evolution of Java caching—from simple database lookups and Redis synchronization to Guava Cache enhancements and finally to Caffeine’s W‑TinyLFU implementation—explaining each approach, its advantages, drawbacks, and the underlying algorithms that drive modern cache performance.
This article traces iQIYI’s five‑stage Java caching journey—from early database lookups, through Redis synchronization, in‑process HashMap and Guava caches, to modern Caffeine with W‑TinyLFU—explaining each phase’s advantages, drawbacks, eviction algorithms, and implementation details such as segment locking, expiration queues, and multi‑queue data structures.
This article provides a comprehensive overview of caching in large distributed systems, covering CDN, reverse‑proxy, local and distributed caches, popular implementations such as Ehcache, Guava, Memcached and Redis, common pitfalls like consistency and avalanche, and practical solutions with real‑world case studies.
This article explains the design and inner workings of Google Guava's Cache library, covering JVM‑level caching, the advantages over simple maps, a real‑world Kafka alerting scenario, code examples, expiration policies, LRU handling, concurrency mechanisms, and the builder pattern used to configure caches.
This article discusses practical approaches to handling massive traffic spikes—defining high‑traffic scenarios, common mitigation methods such as caching, degradation, and various rate‑limiting algorithms (counter, sliding window, leaky bucket, token bucket), including Guava's RateLimiter and brief notes on distributed implementations.
During high‑traffic scenarios, services can become unavailable, so implementing rate‑limiting techniques like token bucket, leaky bucket, and counter algorithms—illustrated with Java code examples using Guava RateLimiter, AtomicInteger, and Semaphore—helps smooth bursts, control concurrency, and prevent system overload.
This article introduces the fundamentals of rate limiting, compares common algorithms such as counter, leaky bucket, and token bucket, delves into Guava's RateLimiter design and its SmoothBursty and SmoothWarmingUp implementations, and provides practical Java code examples for quick integration.
This article discusses the definition of high traffic, common mitigation methods such as caching, degradation, and especially various rate‑limiting algorithms—including counters, sliding windows, leaky bucket, and token bucket—and demonstrates using Guava's RateLimiter for practical throttling.
This article explains why rate limiting is essential for high‑traffic services, describes the token‑bucket algorithm, shows how to use Guava's RateLimiter and Cache for single‑node limits, and presents a Redis‑based solution that works across distributed instances.
This article explains various cache eviction strategies, compares heap, off‑heap, disk and distributed cache types, and provides concrete Java implementations using Guava Cache, EhCache 3.x and MapDB with code examples and usage patterns such as Cache‑Aside and Cache‑As‑SoR.
This article explains how to apply Domain‑Driven Design's domain events to separate reply handling from push notification logic, discusses the shortcomings of embedding side‑effects directly, compares Spring and Guava event mechanisms, and provides a custom Guava‑based publisher implementation with synchronous and asynchronous buses.
This article provides a comprehensive guide to rate limiting in high‑concurrency systems, covering core concepts, token‑bucket and leaky‑bucket algorithms, application‑level techniques with Guava, distributed implementations using Redis+Lua and Nginx+Lua, and edge‑layer controls via Nginx modules, complete with configuration examples and test results.
This article explains why caching, degradation, and rate limiting are essential for high‑concurrency systems, details token‑bucket and leaky‑bucket algorithms, shows application‑level, distributed, and edge‑level throttling techniques, and provides practical Java, Guava, Redis‑Lua, and Nginx‑Lua code examples.
This article describes how to redesign a Java‑based message bus by integrating Guava EventBus to streamline broadcast notifications and replace the traditional chain‑of‑responsibility pattern with an event‑driven approach, providing code examples and deployment considerations.
The article explains how to protect high‑traffic systems during events like Double 11 by using token‑bucket rate limiting, describes the algorithm, compares Guava's SmoothBursty and SmoothWarmingUp implementations, and provides a simple Java TrafficShaper example with code.
This article examines how popular caching systems such as Redis, Memcached, Guava Cache, and Ehcache implement eviction policies like LRU, LFU, and FIFO, comparing their algorithmic approaches, code implementations, and expiration handling mechanisms.
This article explains Guava's ListenableFuture abstraction for callback‑enabled futures, demonstrates how to create and compose them with listeners, callbacks, and transformation functions, and introduces the Guava Service framework for managing service lifecycles, including abstract service implementations and ServiceManager utilities.
This article explains Guava's Range class, covering its mathematical definition, how to construct open, closed, and bounded ranges, perform containment, connectivity, intersection, span, and query operations, and use DiscreteDomain for enumerating values, with extensive Java code examples throughout.
This article explains how to use Guava’s functional programming features in Java, covering Functions and Predicates, providing code examples, discussing potential pitfalls such as overly verbose anonymous classes, and offering guidance on when to prefer functional versus imperative approaches.
This article explains Guava’s terminology for streams, the ByteStreams and CharStreams utility methods, the deprecation of InputSupplier/OutputSupplier, and introduces the source and sink abstractions with their creation methods, common operations, and practical code examples for handling byte and character data in Java.
This article explains Guava's extensive collection utility classes that complement or replace java.util.Collections, covering static factory methods, Iterable utilities, and specialized tools for Lists, Sets, Maps, Multisets, Multimaps, and Tables, with code examples illustrating their usage and advantages.
This article explains why immutable collections improve safety and performance, how to create them with Guava's copyOf, of, and Builder methods, and introduces Guava's extended collection types such as Multiset, Multimap, BiMap, Table, ClassToInstanceMap, RangeSet, and RangeMap with usage examples.
The article explains how Guava helps Java developers avoid null-related bugs, enforce method preconditions, replace cumbersome Object methods with utilities like Optional, Objects, and Ordering, and provides concise patterns for exception propagation using Throwables, all illustrated with clear code examples.