redis
Redis — cache, lock, rate limiter, queue done correctly
Redis is four primitives wearing one server: a cache, a distributed lock, a rate
limiter, and a job queue. Each has a correctness contract that has nothing to do with
whether SET returns OK. You almost certainly already "have Redis working" — a value goes
in, a value comes out. What you do not yet have is a cache that won't stampede your database, a
lock that won't release someone else's hold, a rate limiter that survives concurrent requests,
and a queue whose jobs aren't silently lost when a worker dies. This skill is engine- and
pattern-level, client-SDK-agnostic: examples are redis-cli and Lua, so they hold across
node-redis, ioredis, redis-py, go-redis, and Lettuce. Every pattern applies unchanged to Valkey
and any Redis-protocol store, since Valkey is a BSD fork of Redis 7.2 and stays protocol-compatible.
When to use / When NOT
Use when you are: