Skip to main content

Learning path

Redis & Caching learning path: everything to study, topic by topic

Comprehensive Redis and caching assessment covering data structures, persistence, replication, clustering, caching strategies, eviction policies, Pub/Sub, transactions, Lua scripting, and production operations including monitoring and security.

Short answer

To learn Redis & Caching, work through 6 modules and 22 topics in the order they build on each other. It starts with Fundamentals, then moves on to Data Structures and Persistence & Replication. Use the map as a checklist, or measure your level and study only what is missing.

6
modules
22
topics
45
min to assess

What you will study

Topics are grouped by module. Open one to see its objectives and key concepts.

1 · Fundamentals3 topics
  • Core Concepts

    In-memory data store architecture, single-threaded event loop, key-value paradigm, Redis vs Memcached, use cases, client-server model, and RESP protocol basics

    Objectives

    • Explain why Redis is single-threaded yet high-performance
    • Compare Redis and Memcached for different use cases

    Key concepts

    • in-memory data store
    • single-threaded event loop
    • key-value model
    • Redis vs Memcached
    • RESP protocol
    • client-server architecture
    • database numbering (SELECT)
    • key expiration basics
  • CLI & Basic Commands

    redis-cli usage, PING/PONG, GET/SET, DEL, EXISTS, KEYS, SCAN, TYPE, RENAME, DBSIZE, FLUSHDB, and basic key management

    Objectives

    • Connect to Redis and perform basic key operations
    • Understand why SCAN is preferred over KEYS in production

    Key concepts

    • redis-cli connection
    • GET/SET commands
    • DEL and EXISTS
    • KEYS vs SCAN
    • TYPE command
    • RENAME/RENAMENX
    • DBSIZE/FLUSHDB
    • key naming conventions
  • Strings

    String data type operations: SET/GET with options (EX, PX, NX, XX), MGET/MSET, INCR/DECR, APPEND, STRLEN, GETRANGE, SETRANGE, and binary-safe strings

    Objectives

    • Use string commands for counters, flags, and simple caching
    • Implement basic distributed locking with SETNX

    Key concepts

    • SET options (EX, NX, XX)
    • MGET/MSET batch operations
    • INCR/DECR atomic counters
    • APPEND and STRLEN
    • GETRANGE/SETRANGE
    • binary-safe strings
    • maximum string size (512MB)
    • SETNX for locking
2 · Data Structures5 topics
  • Hashes

    Hash data type for object storage: HSET/HGET, HMSET/HMGET, HINCRBY, HDEL, HGETALL, HSCAN, memory optimization with ziplist encoding, and hash use cases

    Objectives

    • Model application objects using Redis hashes
    • Understand ziplist encoding and its memory benefits

    Key concepts

    • HSET/HGET commands
    • HMSET/HMGET batch operations
    • HINCRBY/HINCRBYFLOAT
    • HGETALL vs HSCAN
    • HDEL and HEXISTS
    • ziplist encoding
    • hash-max-ziplist-entries
    • object modeling with hashes
  • Lists & Sets

    Lists (LPUSH, RPUSH, LPOP, RPOP, LRANGE, LINDEX, BLPOP) and Sets (SADD, SREM, SMEMBERS, SINTER, SUNION, SDIFF, SRANDMEMBER) for queues and unique collections

    Objectives

    • Implement job queues and task lists using Redis lists
    • Use sets for membership testing and intersection operations

    Key concepts

    • LPUSH/RPUSH/LPOP/RPOP
    • LRANGE and LINDEX
    • BLPOP/BRPOP blocking
    • SADD/SREM/SMEMBERS
    • SINTER/SUNION/SDIFF
    • SRANDMEMBER
    • lists as queues
    • sets for unique collections
  • Sorted Sets

    Sorted sets (ZADD, ZRANGE, ZRANK, ZSCORE, ZRANGEBYSCORE, ZRANGEBYLEX, ZINCRBY, ZUNIONSTORE, ZINTERSTORE) for leaderboards, priority queues, and time-series indexing

    Objectives

    • Design leaderboard and ranking systems with sorted sets
    • Understand O(log N) complexity of sorted set operations

    Key concepts

    • ZADD with NX/XX/GT/LT
    • ZRANGE/ZREVRANGE
    • ZRANGEBYSCORE/ZRANGEBYLEX
    • ZRANK/ZSCORE
    • ZINCRBY for score updates
    • ZUNIONSTORE/ZINTERSTORE
    • skiplist implementation
    • leaderboard patterns
  • Streams

    Redis Streams for event sourcing and message queues: XADD, XREAD, XRANGE, XLEN, consumer groups (XGROUP, XREADGROUP, XACK), pending entries, XCLAIM, and stream trimming

    Objectives

    • Implement reliable message processing with consumer groups
    • Compare Streams, Pub/Sub, and list-based queues

    Key concepts

    • XADD/XREAD/XRANGE
    • stream entry IDs
    • consumer groups (XGROUP)
    • XREADGROUP/XACK
    • pending entries list (PEL)
    • XCLAIM for recovery
    • XTRIM/MAXLEN
    • streams vs Pub/Sub vs lists
  • Bitmaps & HyperLogLog

    Bitmaps (SETBIT, GETBIT, BITCOUNT, BITOP, BITPOS) for flags and analytics, HyperLogLog (PFADD, PFCOUNT, PFMERGE) for cardinality estimation with minimal memory

    Objectives

    • Track binary state at scale using bitmaps
    • Estimate cardinality with HyperLogLog and understand its trade-offs

    Key concepts

    • SETBIT/GETBIT
    • BITCOUNT/BITOP
    • BITPOS for first set bit
    • PFADD/PFCOUNT/PFMERGE
    • HLL error rate (~0.81%)
    • bitmap memory efficiency
    • daily active users with bitmaps
    • unique visitor counting with HLL
3 · Persistence & Replication4 topics
  • RDB & AOF Persistence

    RDB snapshots (SAVE, BGSAVE, configuration), AOF (append-only file, fsync policies, AOF rewrite), hybrid persistence (RDB+AOF), durability trade-offs, and recovery procedures

    Objectives

    • Configure RDB and AOF for appropriate durability guarantees
    • Understand the performance impact of each persistence mode

    Key concepts

    • RDB snapshots (BGSAVE)
    • save configuration directives
    • AOF append-only logging
    • AOF fsync policies (always, everysec, no)
    • AOF rewrite (BGREWRITEAOF)
    • hybrid RDB+AOF persistence
    • fork() and copy-on-write
    • recovery procedure ordering
  • Replication

    Master-replica architecture, REPLICAOF command, full and partial resynchronization, replication backlog, replica read scaling, replication lag, and diskless replication

    Objectives

    • Set up master-replica topology for read scaling
    • Diagnose replication lag and synchronization issues

    Key concepts

    • REPLICAOF/SLAVEOF command
    • full resynchronization (RDB)
    • partial resynchronization (backlog)
    • replication ID and offset
    • replica-read-only
    • replication lag monitoring
    • diskless replication
    • min-replicas-to-write
  • Sentinel

    Redis Sentinel for high availability: monitoring, automatic failover, notification, quorum configuration, Sentinel API, client discovery, and split-brain prevention

    Objectives

    • Deploy Sentinel for automatic failover with proper quorum
    • Handle split-brain scenarios in distributed Sentinel setups

    Key concepts

    • Sentinel monitoring
    • automatic failover
    • quorum configuration
    • SENTINEL commands (masters, get-master-addr-by-name)
    • notification via Pub/Sub
    • client reconfiguration
    • split-brain scenarios
    • Sentinel deployment topology
  • Redis Cluster

    Redis Cluster for horizontal scaling: hash slots (16384), cluster topology, MOVED/ASK redirections, resharding, cluster bus, replica migration, and multi-key operation constraints

    Objectives

    • Design and deploy a Redis Cluster for horizontal scaling
    • Understand hash slot distribution and multi-key limitations

    Key concepts

    • 16384 hash slots
    • CRC16 hash function
    • MOVED/ASK redirections
    • cluster-enabled configuration
    • resharding slots
    • cluster bus (gossip protocol)
    • replica migration
    • multi-key constraints (hash tags)
4 · Caching Patterns4 topics
  • Caching Strategies

    Cache-aside (lazy loading), read-through, write-through, write-behind (write-back), refresh-ahead patterns, cache warming, and choosing the right strategy per use case

    Objectives

    • Select the appropriate caching strategy for different consistency requirements
    • Prevent cache stampedes and thundering herd problems

    Key concepts

    • cache-aside (lazy loading)
    • read-through cache
    • write-through cache
    • write-behind (write-back)
    • refresh-ahead pattern
    • cache warming
    • cache stampede prevention
    • thundering herd problem
  • TTL & Eviction Policies

    Key expiration (EXPIRE, PEXPIRE, EXPIREAT, TTL, PERSIST), eviction policies (noeviction, allkeys-lru, volatile-lru, allkeys-lfu, volatile-lfu, allkeys-random, volatile-random, volatile-ttl), maxmemory configuration, and lazy vs active expiration

    Objectives

    • Configure eviction policies appropriate for workload patterns
    • Understand the difference between lazy and active key expiration

    Key concepts

    • EXPIRE/PEXPIRE/EXPIREAT
    • TTL/PTTL commands
    • PERSIST to remove expiration
    • maxmemory configuration
    • LRU eviction policy
    • LFU eviction policy
    • volatile vs allkeys policies
    • lazy vs active expiration
  • Cache Invalidation

    Invalidation strategies: time-based, event-driven, version-based, tag-based invalidation, keyspace notifications, Redis-assisted client-side caching (tracking), and consistency patterns

    Objectives

    • Design invalidation strategies that balance consistency and performance
    • Use Redis keyspace notifications for event-driven invalidation

    Key concepts

    • time-based invalidation
    • event-driven invalidation
    • version-based cache keys
    • tag-based invalidation
    • keyspace notifications
    • client-side caching (tracking)
    • cache consistency patterns
    • invalidation at scale
  • Session Management

    Redis for session storage: session data modeling with hashes, sliding window expiration, session sharing across services, secure session handling, and session store scalability

    Objectives

    • Design scalable session management with Redis hashes and TTL
    • Implement secure session handling across distributed services

    Key concepts

    • session data in hashes
    • sliding window TTL
    • session ID generation
    • cross-service session sharing
    • session serialization
    • secure session tokens
    • session store scalability
    • graceful session migration
5 · Advanced Features4 topics
  • Pub/Sub

    Publish/Subscribe messaging: PUBLISH, SUBSCRIBE, PSUBSCRIBE, UNSUBSCRIBE, pattern-based subscriptions, Pub/Sub in Cluster mode, limitations, and real-time use cases

    Objectives

    • Implement real-time messaging with Pub/Sub channels
    • Understand Pub/Sub limitations and when to use Streams instead

    Key concepts

    • PUBLISH/SUBSCRIBE commands
    • PSUBSCRIBE pattern matching
    • UNSUBSCRIBE/PUNSUBSCRIBE
    • fire-and-forget delivery
    • Pub/Sub in Cluster mode
    • channel naming conventions
    • message ordering guarantees
    • Pub/Sub vs Streams
  • Transactions

    Redis transactions with MULTI/EXEC/DISCARD, optimistic locking with WATCH, pipeline batching, atomicity guarantees, error handling in transactions, and comparison with Lua scripts

    Objectives

    • Implement atomic operations with MULTI/EXEC and WATCH
    • Decide between transactions and Lua scripts for atomic operations

    Key concepts

    • MULTI/EXEC/DISCARD
    • WATCH for optimistic locking
    • pipeline batching
    • atomicity guarantees
    • transaction error handling
    • queued command execution
    • CAS (check-and-set) pattern
    • transactions vs Lua scripts
  • Lua Scripting

    Server-side Lua scripting: EVAL/EVALSHA, script caching, KEYS and ARGV arrays, redis.call vs redis.pcall, script atomicity, debugging scripts, and Cluster-aware scripting

    Objectives

    • Write Lua scripts for complex atomic operations
    • Understand script caching and performance implications

    Key concepts

    • EVAL/EVALSHA commands
    • SCRIPT LOAD/EXISTS/FLUSH
    • KEYS[] and ARGV[] arrays
    • redis.call vs redis.pcall
    • script atomicity guarantees
    • script debugging
    • Cluster-aware key hashing
    • Redis Functions (Redis 7+)
  • Modules

    Redis modules ecosystem: RedisJSON, RediSearch, RedisTimeSeries, RedisBloom, RedisGraph (deprecated), module loading, MODULE LOAD/UNLOAD, and Redis Stack

    Objectives

    • Select appropriate Redis modules for specialized workloads
    • Understand the Redis Stack distribution and its components

    Key concepts

    • RedisJSON (JSON data type)
    • RediSearch (full-text search)
    • RedisTimeSeries
    • RedisBloom (probabilistic)
    • Redis Stack distribution
    • MODULE LOAD/UNLOAD
    • module API basics
    • choosing modules vs native types
6 · Production Operations2 topics
  • Monitoring & Performance

    Redis monitoring and performance tuning: INFO command, SLOWLOG, LATENCY monitoring, MEMORY USAGE/DOCTOR, redis-benchmark, key metrics (hit ratio, memory fragmentation, connected clients), and performance anti-patterns

    Objectives

    • Monitor Redis health using INFO, SLOWLOG, and LATENCY commands
    • Identify and resolve performance bottlenecks in production

    Key concepts

    • INFO command sections
    • SLOWLOG analysis
    • LATENCY LATEST/HISTORY
    • MEMORY USAGE/DOCTOR
    • redis-benchmark tool
    • cache hit ratio calculation
    • memory fragmentation ratio
    • big key detection
  • Security

    Redis security: ACL system (users, permissions, categories), requirepass authentication, TLS/SSL encryption, protected-mode, rename-command, network security, and security best practices

    Objectives

    • Configure Redis ACLs with principle of least privilege
    • Harden Redis deployments with TLS, network restrictions, and authentication

    Key concepts

    • ACL SETUSER/GETUSER/LIST
    • ACL categories and permissions
    • requirepass authentication
    • TLS/SSL configuration
    • protected-mode
    • rename-command obfuscation
    • bind address restrictions
    • security best practices

Levels: Junior, Mid, and Senior

Explain it in your own words

Graded by AI · no account · 1 question

No options to guess from: you write, the AI grades against the topic's rubric and tells you what level your answer reads at.

0 / 600

Already studying Redis & Caching?

The assessment measures topic by topic, and your plan skips what you already know.

Open to read. An account is only needed to be measured.

Frequently asked questions

Where should I start studying Redis & Caching?

Start with Fundamentals: Core Concepts, CLI & Basic Commands, and Strings. The map orders topics by what they depend on, so each one prepares the next.

How long does a full Redis & Caching assessment take?

A full assessment of this path takes about 45 minutes. Study time depends on where you start; a diagnostic shows which topics you can skip.

Do I need an account to use this page?

No. The map, objectives and key concepts are open. You only need an account to be measured, get your gap by topic and receive a plan.