Tagged articles
Sorted Set
44 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 explains how to implement pagination using Redis Sorted Sets, achieve multi‑condition fuzzy queries with Hashes and HSCAN, and then combine both techniques into a single solution while discussing performance trade‑offs and optimization strategies such as key expiration and data‑sync methods.
HSCANHashPagination
0 likes · 9 min read

This article walks through eleven practical Redis scenarios—from classic caching and distributed locks to rate limiting, leaderboards, timelines, social graph operations, lightweight queues, Bloom filters, hash‑based object storage, unique‑counting, and delayed tasks—providing code samples, advantages, drawbacks, and when to apply each pattern.
Bloom FilterCachingDistributed Lock
0 likes · 15 min read

This article explains how to access the Redis CLI on Linux, connect to remote servers, and provides detailed examples of common commands for each of Redis's five data types—String, List, Set, Sorted Set, and Hash—highlighting key syntax and usage patterns.
HashListSorted Set
0 likes · 4 min read

This article explains how to achieve conditional queries and pagination in Redis using Sorted Sets and Hashes, outlines the implementation steps for pagination, fuzzy multi‑condition search, their combination, and discusses performance optimizations such as expiration and real‑time data handling.
HashPaginationSorted Set
0 likes · 11 min read

This article explains how to implement an online user counting feature using Redis sorted sets, covering user identification methods, the essential zadd, zrangeByScore, zremrangeByScore, and zrem commands, along with code examples for both Java and JavaScript.
JavaScriptSorted Setonline users
0 likes · 8 min read

This guide presents a comprehensive overview of Redis core data structures—String, List, Set, Sorted Set, and Hash—detailing their most common commands, practical code examples, and typical application scenarios such as counters, distributed sessions, locks, ranking lists, and shopping‑cart storage.
HashListSorted Set
0 likes · 9 min read

This article explains how to use Redis Sorted Sets for efficient pagination, leverages Hashes and HSCAN for multi‑condition fuzzy queries, and combines both techniques with performance‑optimizing strategies such as expiration and real‑time updates.
HashPaginationSorted Set
0 likes · 10 min read

This article explains how to implement a precise sliding‑window rate‑limiting algorithm using Redis Sorted Sets, detailing the problem scenario, the algorithm steps, Lua script implementation, Java integration, and practical extensions for high‑performance backend services.
BackendJavaLua
0 likes · 8 min read

This article explains how to use Redis Sorted Sets and Hashes to achieve efficient pagination, fuzzy multi‑condition queries, and their combination, while also discussing performance‑optimisation strategies such as temporary ZSet expiration and data‑freshness handling, before concluding with a brief promotional segment.
HashPaginationSorted Set
0 likes · 12 min read

This article analyzes how to build a real‑time, billion‑user leaderboard for a game like Honor of Kings, explaining why traditional ORDER BY queries fail, why Redis sorted sets excel, and detailing sharding, hot‑key mitigation, memory optimization, and fault‑tolerant implementation techniques.
LeaderboardShardingSorted Set
0 likes · 10 min read

This article explains how to track online users by storing their identifiers in a Redis sorted set, using expiration timestamps as scores, and demonstrates adding, querying, and cleaning up entries with ZADD, ZRANGEBYSCORE, ZREMRANGEBYSCORE, and ZREM commands in both Java and JavaScript.
JavaJavaScriptSorted Set
0 likes · 7 min read

The article shows how to avoid database pressure by recording daily comment counts in Redis sorted sets, merging the seven daily sets into a weekly ranking with a union command, and exposing the result through a Spring Boot service and a custom Freemarker tag, complete with code examples and screenshots.
CachingFreeMarkerSorted Set
0 likes · 17 min read

This article explains how to implement pagination, multi‑condition fuzzy search, and their combination using Redis Sorted Sets and Hashes, discusses performance optimizations and expiration strategies, and also contains promotional material for ChatGPT services and a community offering.
HashSorted Setdatabase
0 likes · 12 min read

This article explains the internal structures of Redis data types—including strings, lists, sets, hashes, and sorted sets—detailing their memory representations, evolution across versions, time‑complexity characteristics, and the code implementations that enable efficient in‑memory operations.
ListSorted Setdata structures
0 likes · 16 min read

This guide explains how to implement an online user counting feature using Redis sorted sets, covering user identification methods, the essential zadd, zrangeByScore, zremrangeByScore, and zrem commands, along with code examples and a concise summary of the overall approach.
JavaSorted Setonline users
0 likes · 7 min read

This article explains how to track online users by storing their identifiers in a Redis sorted set, using zadd to add entries, zrangeByScore to query active users, and zremrangeByScore and zrem to clean up expired or logged‑out sessions, with code examples in Java and JavaScript.
JavaSorted Setonline users
0 likes · 9 min read

This article explains Redis's five basic data types—String, List, Hash, Set, and Sorted Set—detailing their typical use cases, common commands, and providing concrete CLI examples that demonstrate how to manipulate each type.
HashListSorted Set
0 likes · 10 min read

The article explains how to use Redis Sorted Sets for efficient pagination, employ Hashes with HSCAN for multi‑condition fuzzy matching, combine both techniques into a unified solution, and apply expiration‑based optimizations to keep the cache lightweight and responsive.
HashPaginationSorted Set
0 likes · 10 min read

This article walks through implementing a Redis‑compatible sorted‑set in Go, covering requirement analysis, data‑structure design with a map and skiplist, detailed insertion and search algorithms, complete code examples, and edge‑case handling, all illustrated with diagrams and sample output.
BackendGoSorted Set
0 likes · 13 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.
Sorted SetZSetdata structures
0 likes · 11 min read

Redis Sorted Sets, powered by skip lists, provide O(log n) operations for ranking and range queries; this article explains their internal structure, core commands, and demonstrates how to implement a real‑time leaderboard in Spring Boot using Redis, complete with configuration, entity design, and service methods.
JavaLeaderboardSorted Set
0 likes · 10 min read

This article explains how to achieve conditional fuzzy queries and pagination in Redis by leveraging Sorted Sets and Hashes, detailing command usage, data modeling, combination strategies, and performance optimizations such as expiration and real‑time updates.
Fuzzy QueryHashPagination
0 likes · 8 min read

This article explains Redis Sorted Set’s underlying implementation using skiplist and listpack, compares their storage strategies, and demonstrates how to build a real‑time game leaderboard with practical command examples and score calculations.
LeaderboardListpackSorted Set
0 likes · 14 min read

This article explains the Redis Sorted Set data type, its underlying storage mechanisms (listpack and skiplist + dict), the internal structures and algorithms, and demonstrates how to build a real‑time game leaderboard using ZADD, ZRANGE and ZREVRANK commands.
LeaderboardListpackSorted Set
0 likes · 14 min read

The article explains Redis’s set and sorted‑set data structures, detailing how sets use intset or hashtable encodings and how sorted sets employ skiplist or ziplist encodings, including the conditions for each encoding, the underlying C structs, upgrade processes, and common Redis commands.
Sorted Setdata structuredatabase
0 likes · 22 min read

This article explains how to implement efficient pagination and multi‑condition fuzzy queries in Redis using Sorted Sets and Hashes, outlines the underlying commands, discusses combining both techniques, and offers optimization strategies such as expiration handling to maintain cache performance.
Fuzzy QueryHashPagination
0 likes · 11 min read

This article explains why MySQL struggles with large‑scale ranking, introduces Redis sorted sets as a high‑performance alternative, and provides complete Go code examples—including direct command usage and a struct‑based wrapper—to implement, query, and manage ranked data efficiently.
GoRankingSorted Set
0 likes · 8 min read

This article explains how Redis stores set and sorted‑set objects using two underlying data structures, details the intset and hashtable encodings, describes the upgrade process with concrete examples, and lists the common commands for manipulating these collections.
Sorted Setdata structuresintset
0 likes · 16 min read

This article explains why Redis stores set and sorted‑set objects using two different internal encodings, describes the intset and hashtable representations for sets, the skiplist and ziplist representations for sorted sets, shows the upgrade process with code examples, and lists the common commands for manipulating these data structures.
Sorted Setdata structureshashtable
0 likes · 16 min read

An in‑depth guide to Redis’s core data structures—String, List, Hash, Set, and Sorted Set—detailing their characteristics, common commands, practical examples, and typical application scenarios such as caching, counting, messaging, and ranking, with code snippets and reference links.
HashListSorted Set
0 likes · 19 min read

This article explains how Redis implements its Sorted‑Set data type by starting from a basic ordered singly linked list, analyzing its insertion and query complexities, introducing the skiplist structure, deriving its O(log N) performance, and detailing the underlying C source code for creation, insertion, lookup, and deletion.
C++Sorted Setdata structure
0 likes · 32 min read

This article explains how Redis implements its Sorted‑Set using a skiplist, starting with the basics of a singly linked list, analyzing insertion and query complexities, deriving the skiplist structure and its O(log N) performance, and comparing it with hash tables, balanced trees, and B‑trees.
AlgorithmC++Sorted Set
0 likes · 35 min read

This article explains how to design and implement a real-time ranking system for a mobile tank game using Redis sorted sets, covering leaderboard categories, composite scoring formulas, dynamic updates, data retrieval with pipelines, and provides a complete PHP class example.
Composite ScoreLeaderboardPHP
0 likes · 10 min read

This article explains how to implement a real‑time ranking system for a mobile tank game using Redis sorted sets, covering ranking categories, composite scoring formulas, dynamic updates, efficient data retrieval with pipelines, and a complete PHP class example.
LeaderboardPHPPipeline
0 likes · 11 min read

The article explains how to choose appropriate Redis data structures—such as Bitmap, HyperLogLog, Set, List, Hash, and Sorted Set—to efficiently handle massive statistical scenarios like UV counting, ranking, and set‑based aggregation, while providing concrete command examples and performance considerations.
HyperLogLogSorted Setdata structures
0 likes · 13 min read

This article explains how to choose the right Redis data structures—Bitmap, HyperLogLog, Set, List, and Sorted Set—to efficiently handle massive statistical scenarios such as UV counting, ranking, and aggregation in high‑traffic mobile applications.
BitmapData StatisticsHyperLogLog
0 likes · 14 min read

This article explains how to build a real‑time, dual‑dimension leaderboard for a mobile tank game using Redis Sorted Sets, covering ranking types, composite score calculations, dynamic updates, efficient data retrieval with pipelines, and a complete PHP implementation.
LeaderboardPHPReal-time
0 likes · 8 min read

This article walks through designing a ranking system for interview scenarios, comparing MySQL and Redis implementations, covering sorted‑set operations, handling daily, weekly, and multi‑day leaderboards, scaling to billions of users, and addressing practical considerations beyond pure API usage.
InterviewLeaderboardSorted Set
0 likes · 19 min read

Redis sorted sets (zsets) combine a hash table with a skiplist that provides O(log N) search, insertion, and deletion, using forward, backward, and span pointers to maintain element order and rank, enabling fast score‑based queries, leaderboards, and range operations via commands such as ZADD, ZRANK, and ZRANGE.
Sorted Setc-programmingdata structure
0 likes · 15 min read


ITPUBMay 27, 2019 · Databases
This article introduces Redis as an open‑source in‑memory store, outlines its core data structures—strings, hashes, lists, sets, sorted sets, bitmaps, hyperloglogs, and geospatial indexes—and provides concrete command examples, application scenarios, and best‑practice guidelines for effective usage.
CacheHashList
0 likes · 7 min read

Redis 5 introduces four new sorted‑set commands—ZPOPMAX, ZPOPMIN, BZPOPMAX, and BZPOPMIN—allowing you to pop elements with the highest or lowest scores, optionally in a blocking fashion, with examples demonstrating their syntax, behavior, and usage patterns.
Blocking CommandsSorted SetZPOPMAX
0 likes · 4 min read

This article introduces Redis's five core data structures—String, List, Set, Hash, and Sorted Set—detailing their characteristics, common commands, additional operations, and typical use cases, providing a comprehensive guide for developers working with Redis.
HashListSorted Set
0 likes · 8 min read

The article explains how Redis's rich data structures enable flexible key‑value schema designs for a user login system and a tag system, contrasting them with traditional relational database approaches and demonstrating practical commands and Python code for common operations.
Key-Value DesignListSorted Set
0 likes · 9 min read
