Skip to main content
Databases

Redis Tutorial with Examples.

Redis tutorial: in-memory data structures, from strings, hashes and sorted sets to pub/sub, streams, Lua scripting and caching.

Beginner

Start here — no prior experience needed

4 lessons

Intermediate

For developers with core concepts down

7 lessons
redis intermediate
5 min read

Queue commands with MULTI, run them atomically with EXEC — then watch a real transaction abort mid-flight when another client changes a WATCHed key first.

redis intermediate
5 min read

Publishing to a channel with no subscribers doesn't queue the message for later — it's just gone. Real fan-out to multiple subscribers, pattern subscriptions, and sharded Pub/Sub follow.

redis intermediate
5 min read

A graceful restart saves your data by default — Redis snapshots on SIGTERM. A hard kill (docker kill, a power loss, an OOM kill) gives it no such chance, and only AOF protects against that. Then: the new BACKUP command family.

redis intermediate
5 min read

Writing directly to a replica fails with READONLY by design — and WAIT doesn't error when it can't reach the number of replicas you asked for, it just tells you how many actually acknowledged in time.

redis intermediate
5 min read

A default Redis install lets every connection run every command against every key. ACL SETUSER changes that — including a real NOPERM the moment a restricted user reaches outside its allowed keys or commands.

redis intermediate
5 min read

Cap Redis at 3 MB and fill it: watch noeviction refuse writes, volatile-lru fail with no TTLs, and LRU, LFU and LRM pick different keys to throw away.

redis intermediate
5 min read

Put Redis in front of a slow database and break it on purpose: a stale read, two invalidation races, a 50-request stampede, and the fix for each, measured.

Advanced

Production-grade patterns for experienced engineers

3 lessons

Also part of Redis

Taught in other topics. Each link opens the lesson in its home topic.

3 lessons