All guides

Redis

Focused redis articles with clear context, practical examples, source links where needed, and honest limits.

15 articles in this section.

Redis distributed locks: when a lease is not enough

A Redis lock can coordinate short work, but a lease expiring while the original worker is still running can create a split-brain side effect. Use locks ...

Redis cluster hash tags: colocate only the keys that transact

Hash tags place related keys in one cluster slot for multi-key operations, but an overly broad tag creates a hot shard.

Redis keyspace notifications are hints, not a durable queue

Keyspace notifications can trigger lightweight reactions but disconnected subscribers miss events, making them unsuitable as the only audit or workflow channel.

Redis eviction policies: choose what may disappear

An eviction policy is a data-loss policy when Redis stores anything authoritative, so separate durable state from disposable cache before tuning memory.

Negative caching in Redis: cache missing without hiding new data

Caching a not-found result can block repeated abusive lookups, but its TTL should be shorter because the missing record may be created soon.

Stop cache stampedes with stale-while-revalidate in Redis

When a popular key expires, serving a bounded stale value while one worker refreshes it can protect the origin from a synchronized traffic spike.

Redis Lua idempotency keys: reserve, complete, and replay

An idempotency record needs states for in-progress and completed work so concurrent retries do not both execute and completed retries receive the same response.

Redis distributed locks need fencing tokens

A lock can expire while its original holder is paused, so downstream systems need a monotonically increasing fencing token to reject stale owners.

Trim Redis Streams without deleting unread events

Stream retention should account for the slowest required consumer and replay window instead of trimming only to a convenient item count.

Recover stuck Redis Streams messages with XAUTOCLAIM

XAUTOCLAIM moves idle pending messages to a healthy consumer, but the handler must tolerate receiving work more than once.

Redis client-side caching in Node.js: invalidation without stale data

Server-assisted client-side caching reduces network reads, but reconnects, invalidations, TTLs, and memory limits decide whether values stay safe.

Redis hot-key detection: find the key behind uneven latency

A healthy average can hide one key receiving a disproportionate share of traffic and blocking a Redis.

Redis vector sets in Node.js: build semantic search you can debug

A vector search feature becomes maintainable only when embeddings, distance metrics, filters, and evaluation examples are versioned.

Redis 8.8 arrays explained: where ordered values fit

Redis arrays add another way to represent ordered data, so teams should compare update patterns and memory rather than replacing lists.

Redis 8.8 INCREX rate limiting: model windows without fragile Lua

INCREX can simplify expiring counters, yet a useful limiter still needs a clear identity, window rule, failure policy, and.