Tagged articles
ZSet
33 articles · Page 1 of 1
This article explains how to implement pagination using Redis Sorted Sets (ZSet) and multi-condition fuzzy queries using Hash with HSCAN, then combines both by caching filtered results in pattern-keyed ZSets for efficient paginated retrieval, including TTL-based expiration and data freshness strategies.
CachingHSCANHash
0 likes · 11 min read

This article details a distributed Redis-based solution for enforcing multiple rate-limiting rules simultaneously (e.g., 10 requests per minute and 20 per two minutes) while preventing duplicate submissions, using Zset data structures, Lua scripts for atomicity, and Spring AOP annotations.
JavaLua scriptingRedis
0 likes · 12 min read

The article walks through the evolution of Redis leaderboard architectures, covering why ZSets are used, handling same‑score ordering, seasonal resets, access patterns, synchronous vs asynchronous updates, big‑key and hot‑key issues, sharding with buckets, and data durability strategies.
CacheLeaderboardRedis
0 likes · 12 min read

This article explains how to implement an online user counting feature by using Redis sorted sets, covering user identification (token or browser fingerprint), adding users with ZADD, querying current online users with ZRANGEBYSCORE, and cleaning up expired entries via ZREMRANGEBYSCORE and ZREM.
JavaRedisZSet
0 likes · 6 min read

The article dissects a common interview question about automatically canceling unpaid orders after 30 minutes, explains why naïve cron‑based scans are unsuitable for tens of millions of rows, and presents three progressively robust solutions using Redis expiration, Redis ZSet polling, and message‑queue or time‑wheel architectures.
Delayed TaskMessage QueueRedis
0 likes · 10 min read

This article explains how to build a real‑time online user counter by identifying users via tokens or browser fingerprints, storing them in a Redis sorted set, and using ZADD, ZRANGEBYSCORE, ZREMRANGEBYSCORE and ZREM commands to add, query, and clean the data.
BackendJavaRedis
0 likes · 7 min read

Learn a practical approach to count online users in real time by leveraging Redis sorted sets (zset) with SpringBoot, covering user identification via tokens or browser fingerprinting, key Redis commands (zadd, zrangeByScore, zremrangeByScore, zrem), and scheduled cleanup logic.
JavaReal-timeRedis
0 likes · 7 min read

This guide explains how to achieve pagination and multi‑condition fuzzy queries in Redis by leveraging ZSet for ordered paging and Hash with HSCAN for pattern matching, detailing command usage, combination strategies, and performance optimizations such as temporary set expiration and data freshness handling.
CacheFuzzy QueryHash
0 likes · 10 min read

This guide explains how to implement an online user counting feature using Redis sorted sets (ZSET) in a Spring Boot application, covering user identification via tokens or browser fingerprinting, adding, querying, and cleaning up entries with zadd, zrangeByScore, zremrangeByScore, and zrem commands.
RedisSpring BootZSet
0 likes · 8 min read

This article explains how to implement an online‑user counting feature using Redis sorted sets (zset) by leveraging the four core commands zadd, zrangeByScore, zremrangeByScore, and zrem, with Java/Spring code examples and optional browser‑fingerprinting for unauthenticated visitors.
JavaRedisSpring
0 likes · 7 min read

This article explains how to design a scalable leaderboard using Redis Zset for moderate traffic and a sharded‑key plus local cache architecture for ultra‑high concurrency, detailing synchronization strategies, data flow, and practical implementation steps.
CacheLeaderboardRedis
0 likes · 5 min read

This article explains how to implement an online‑user counter using Redis sorted sets by detailing the four essential ZSET commands, fingerprint‑based user identification, Java and JavaScript code examples, and scheduled cleanup for accurate real‑time statistics.
JavaNode.jsRedis
0 likes · 7 min read

This article explains how to track online users using Redis sorted sets by describing the core ZSET commands (zadd, zrangeByScore, zremrangeByScore, zrem), showing code examples for adding, querying, and cleaning up user sessions, and discussing fingerprint-based identification methods.
RedisZSetbackend development
0 likes · 10 min read

By leveraging Redis sorted sets for ordered pagination and hash fields with HSCAN for multi‑condition fuzzy matching, the article shows how to build a cached query pipeline that creates temporary ZSets keyed by pattern, supports efficient page retrieval, and uses expirations and refresh strategies to balance freshness and performance.
HashRedisZSet
0 likes · 9 min read

This article explains how to build an online user counting feature by leveraging Redis sorted sets (zset) in Java, covering user identification, the core Redis commands (zadd, zrangeByScore, zremrangeByScore, zrem), code examples, and periodic cleanup logic.
JavaRedisZSet
0 likes · 8 min read

This article explains how to build an online user counting feature using Redis sorted sets (ZSET) by detailing the core commands (zadd, zrangeByScore, zremrangeByScore, zrem), user identification methods, and providing Java and JavaScript code examples, while also noting unrelated promotional content at the end.
JavaRedisZSet
0 likes · 8 min read

This article explains how to track online users by assigning each user a unique identifier, storing it in a Redis sorted set with an expiration timestamp, and using zadd, zrangeByScore, zremrangeByScore, and zrem commands together with browser fingerprinting to reliably count and clean up active sessions.
BackendJavaScriptRedis
0 likes · 7 min read

This article explains how to use Redis sorted sets (ZSET) together with user token or browser fingerprint identification to add, query, and clean online user entries, providing a simple yet effective method for counting active users in real time.
ZSetfingerprintonline users
0 likes · 7 min read

This article explains three common methods for implementing delayed queues with Redis—using key expiration notifications, Zset with scheduled tasks, and Redisson’s RDelayedQueue—detailing their concepts, core code examples, advantages, and limitations for backend developers.
JavaRedisRedisson
0 likes · 5 min read

This article walks through a real‑world sales‑ranking scenario, explains why a simple SQL solution falls short at scale, and demonstrates how Redis Set and ZSet data structures provide high‑performance, real‑time ranking, including detailed command examples, performance metrics, and an in‑depth look at ZSet's internal listpack and skiplist‑dict implementations.
RedisSorted SetZSet
0 likes · 11 min read

This article explains how to use Redis' Sorted Set and Hash structures to achieve efficient pagination, multi‑condition fuzzy queries, and their combination, while also discussing performance optimizations such as expiration handling and data synchronization strategies.
Fuzzy QueryHashRedis
0 likes · 10 min read

This article explains how to use Redis Sorted Sets for efficient pagination, leverages Hashes and HSCAN for multi‑condition fuzzy searches, and combines both techniques with optimization strategies such as temporary ZSet expiration and real‑time update handling to build a practical caching‑layer query solution.
CacheFuzzy QueryHash
0 likes · 10 min read

This article explains how to use Redis Sorted Sets and Hashes to achieve pagination, fuzzy multi‑condition queries, and their combination, while also discussing performance optimizations such as expiration and update strategies for generated ZSet collections.
HashPaginationZSet
0 likes · 8 min read

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.
CacheFuzzy QueryHash
0 likes · 9 min read

This article explains three practical Redis‑based rate‑limiting methods—using SETNX, ZSET sliding windows, and a token‑bucket algorithm with List—complete with Java code examples and a discussion of their advantages and drawbacks.
RedisZSet
0 likes · 6 min read

This article explains three Redis‑based rate‑limiting methods—using SETNX for simple counters, leveraging ZSET for a sliding‑window algorithm, and implementing a token‑bucket scheme with LISTs—complete with Java code examples and discussion of their advantages and drawbacks.
BackendZSetrate limiting
0 likes · 7 min read

This article explains how to design Redis cache for relational list data such as user timelines or news feeds, covering fixed-length caching, consistency, resource utilization, using ZSET structures, handling additions, deletions, queries, and strategies like preloading, retry mechanisms, and asynchronous rebuilding.
BackendRedisRelational Data
0 likes · 8 min read

This article explains the concept of delayed queues, outlines typical use cases, compares implementation options, and provides a complete Java Spring Boot example that uses Redis Zset to create, manage, and execute delayed tasks with accompanying code snippets and test results.
DelayQueueJavaRedis
0 likes · 8 min read

This article explains three Redis‑based rate‑limiting strategies—using SETNX, sorted‑set (ZSet) sliding windows, and a token‑bucket algorithm with List—provides Java code examples for each method, discusses their advantages and drawbacks, and shows how to integrate them into backend services.
BackendJavaRedis
0 likes · 6 min read

This article explains why Redis can be slow when used for delayed processing, shows how to implement a delayed queue with Redis ZSET, compares its advantages, and reviews alternative solutions such as RabbitMQ, RocketMQ, Kafka, Netty, and Java's DelayQueue.
KafkaMessage QueueRabbitMQ
0 likes · 8 min read

This article explains the design and implementation details of Redis's Simple Dynamic String (SDS) and the underlying structures of its core collections—List, Set, Sorted Set (Zset), and Hash—covering their memory layouts, advantages, and the conditions that trigger different internal representations.
HashImplementationSDS
0 likes · 10 min read

This article explains how Redis can be used to implement delayed queues, compares its advantages with other solutions such as RabbitMQ, RocketMQ, Kafka, Netty and Java DelayQueue, and provides practical guidance on using sorted sets and timestamps for time‑based task scheduling.
KafkaMessage QueueRabbitMQ
0 likes · 8 min read

This article examines the floating‑point nature of Redis ZSET scores, the precision limits of Java double values, how Redis stores and retrieves these scores, and practical guidelines for avoiding precision loss when using timestamps or large numeric scores in backend development.
RedisSCoReZSet
0 likes · 5 min read
