Redis patterns, one picture at a time
Five short foundations — commands, key names and expiry, the single thread, a Node.js + Express project, lists and sets — then fifteen real use cases. Every diagram has a ▶ Play button and every chapter has a Redis you can type into.
Foundations
- 01 Hello Redis: keys, values, first commands One dictionary in RAM · SET, GET, MSET, INCR, DEL · reading replies · a live CLI
- 02 Keys you can find, data that cleans itself up Name keys like paths · TTLs that delete data on time · the SET-erases-TTL trap · expiry vs eviction
- 03 Atomicity and the single thread One queue, one executor · why KEYS freezes Redis (use SCAN) · the lost update race · MULTI/EXEC, WATCH, Lua, pipelines
- 04 Redis in a Node.js app node-redis client · cache a slow route · invalidate on write · refresh in background · Express rate-limit middleware by IP
- 05 Lists and sets in depth Head, tail, indexes · stack, queue, capped feed · SINTER, SUNION, SDIFF · which structure to pick