New intermediate
Redis Course: Free Redis Tutorial from Basics to Cluster
Free Redis tutorial course: data structures, caching, rate limiting, Lua, streams, locks, persistence, replication and Cluster, with tested Python code.
- Lessons
- 10
- Modules
- 4
- Time
- 6-8 hours
Your progress
0 of 10 lessons done 0%
- Free, no sign-up
- Progress saved in this browser
- Code you can copy and run
What you'll learn
- Choose the right Redis data structure: strings, lists, hashes, sets, sorted sets, streams or HyperLogLog
- Build caches with cache-aside, invalidation, TTL jitter and the right eviction policy
- Implement leaderboards and sliding-window and token-bucket rate limiters
- Make multi-step logic atomic with MULTI/EXEC, WATCH and Lua scripts
- Use Streams with consumer groups for reliable messaging, and know when Pub/Sub is enough
- Write a correct Redis lock and understand its limits
- Configure persistence, replication, Sentinel and Cluster with clear trade-offs
Course curriculum
10 lessons in 4 modules ยท 6-8 hours
Foundations
2 lessons
- Lesson 1: What Is Redis? Setup and First Commands What Redis is, why it's fast, when to use it and when not to, plus installing Redis 8, first redis-cli commands and a quick benchmark. 25-35 min beginner
- Lesson 2: Redis Strings, Keys and Expiry (TTL) Redis strings and keys in practice: atomic counters, TTL expiry, SET NX for first-writer-wins, MGET batching, key naming, and SCAN instead of KEYS. 30-40 min beginner
Data Structures
2 lessons
- Lesson 3: Redis Lists, Hashes, Sets and HyperLogLog Redis lists as queues and capped feeds, hashes for objects, sets for tags and membership, and HyperLogLog for approximate unique counts, in Python. 35-45 min beginner
- Lesson 4: Redis Sorted Sets: Leaderboards, Rate Limits Redis sorted sets explained: a real-time leaderboard with ZINCRBY and ZREVRANK, score range queries, and a sliding-window rate limiter in Python. 35-45 min intermediate
Patterns
4 lessons
- Lesson 5: Caching with Redis: Patterns and Eviction Caching with Redis: cache-aside, invalidation on write, TTL jitter against stampedes, and maxmemory eviction policies like allkeys-lru, with Python code. 40-50 min intermediate
- Lesson 6: Redis Transactions, WATCH and Lua Scripts Atomic operations in Redis: MULTI/EXEC transactions, WATCH for optimistic locking with retries, and a Lua token bucket rate limiter, all in Python. 40-50 min intermediate
- Lesson 7: Redis Pub/Sub vs Redis Streams Redis Pub/Sub for live broadcast versus Redis Streams for durable messaging: consumer groups, XACK, pending entries and reclaiming with XAUTOCLAIM. 45-55 min intermediate
- Lesson 8: Distributed Locks with Redis (and Pitfalls) Build a Redis lock with SET NX PX and a token-checked Lua release, see what happens when a lock expires, and learn when to use fencing tokens instead. 35-45 min advanced
Operations
2 lessons
- Lesson 9: Redis Persistence: RDB vs AOF Explained How Redis persists data: RDB snapshots vs the append-only file, fsync options, a kill -9 crash test of both, and how to choose for caches and stores. 35-45 min intermediate
- Lesson 10: Redis Replication, Sentinel and Cluster Scale and protect Redis: replicas and WAIT, automatic failover with Sentinel, and Redis Cluster hash slots and hash tags, with a working demo. 45-55 min advanced