Strings, lists, sets, sorted sets, hashes, hyperloglogs, bitmaps, and streams each solve a different class of problem. Here is the decision tree, the memory cost of each type, and the production patterns that separate the "I learned Redis in a tutorial" tier from the "I run it in production" tier.
A practical guide to running WebSocket servers across multiple instances using Redis Pub/Sub, including connection management, session routing, and message delivery patterns that actually work in production.
Most teams throw a cache in front of their database and hope for the best. The wrong caching strategy gives you stale data, thundering herds, or memory that never gets evicted. Here is the decision framework for cache-aside, read-through, write-behind, and write-through, with working Node.js + Redis code for each.
Redis Pub/Sub drops messages the moment a subscriber disconnects. Redis Streams with consumer groups gives you at-least-once delivery, horizontal scaling, and failure recovery without adding Kafka to your stack.
Redlock is the most-recommended distributed-lock algorithm and the one with the most published criticism. The truth: simple Redis locks are fine for most teams, Redlock fixes a narrow set of failure modes most teams don't experience, and the cases where you really need correctness call for Postgres or Zookeeper. Here is the decision tree.
The “sliding window” rate limiter every tutorial shows you breaks at scale. Token bucket is the algorithm real APIs use because it allows bursts without exceeding the average rate. Here is a 30-line Lua-on-Redis implementation, the failure modes to test for, and the headers you should be returning to clients.