Skip to content

Redis Data Structures And Use Cases Textbook

A free, self-paced textbook in 7 chapters. Read a chapter, then drill it with the 120 companion flashcards using spaced repetition.

7 chapters · 120 cards · Updated

Chapters

  1. 1Redis Fundamentals and the String Type

    Redis, which stands for REmote DIctionary Server, is a versatile data store written in the C programming language. By default it listens for client connections on TCP port 6379. Ar...

  2. 2Sets and Sorted Sets

    A Set in Redis is an unordered collection of unique strings. Adding members with SADD is constant time, \(O(1)\) per element, while reading the full membership list with SMEMBERS i...

  3. 3Lists and Hashes

    The Redis List is an ordered collection of strings, ordered by insertion. Small lists are stored in a compact structure called a listpack, which replaced the older ziplist represen...

  4. 4Streams, Pub/Sub, and Messaging

    A Redis Stream is an append-only log data structure that supports consumer groups, message IDs, and acknowledgments. Each entry carries an ID composed of the millisecond timestamp...

  5. 5Specialized Data Structures

    Beyond the core types, Redis offers several specialized structures that solve specific problems very efficiently. The HyperLogLog is a probabilistic counter for unique items. Regar...

  6. 6Memory Management and Persistence

    Redis gives operators fine-grained control over what happens when memory fills up. Two settings drive this behavior: the maxmemory directive, which caps how many bytes Redis is all...

  7. 7Replication, Clustering, Transactions, and Operations

    Redis provides several mechanisms for distributing data and coordinating concurrent access. Replication involves asynchronous copies from a primary to one or more replica nodes, wh...

← Back to the Redis Data Structures And Use Cases deck