📦

Redis

database

The in-memory data structure server that became the default cache, queue, session store, and pub/sub bus for modern backends.

About

Redis is an in-memory data structure server that started as a cache and grew into a multi-purpose data backbone. It supports strings, hashes, lists, sets, sorted sets, bitmaps, hyperloglog, streams, and (since 7.x) JSON and time-series modules — all in memory, all single-digit-microsecond latency. The modern Redis stack is much more than key-value caching. Redis is the default choice for: session storage, rate limiting, job queues (BullMQ, Sidekiq), leaderboards, real-time analytics, pub/sub messaging, and (with the Redis Stack modules) vector search, full-text search, and JSON document storage. The main caveat: data lives in memory by default, so cost scales with the working set. Persistence (RDB snapshots, AOF) exists but the operational model assumes you treat Redis as a cache, not a system of record. Pair it with Postgres for the durable layer.

Key Features

  • Sub-ms latency

    In-memory data structures with single-digit-microsecond response times.

  • Data structure variety

    Strings, hashes, lists, sets, sorted sets, streams, JSON, plus bitmap and HyperLogLog commands.

  • Pub/Sub and Streams

    Built-in messaging: pub/sub for fanout, Streams for durable logs and consumer groups.

  • Lua scripting

    Server-side scripts for atomic operations across multiple keys.

  • Modules

    RedisJSON, RediSearch, RedisTimeSeries, RedisGraph, RedisBloom — bolt on more capability without leaving the server.

Best For

Backend engineers caching database reads
Teams building real-time features (chat, leaderboards, sessions)
Anyone running a job queue on top of BullMQ or Sidekiq

Use Cases

  • Caching Postgres query results
  • Session storage for web apps
  • Rate limiting with token bucket in a Lua script
  • Job queues with BullMQ
  • Real-time leaderboards with sorted sets

Pros & Cons

Pros

  • In-memory speed is genuinely unmatched for the price
  • Data structures are richer than `get`/`set` — sorted sets and lists do real work
  • The ecosystem of clients and tooling is enormous
  • Redis Stack adds search, JSON, and time-series without a new server

Cons

  • Memory cost: expensive at scale if the working set is large
  • Persistence is real but you have to think about it; not a system of record
  • Single-threaded for command execution — CPU-bound workloads need clustering
4
4 votes

Comments

Login to comment

A
ariadJun 14, 2026

BullMQ on top of Redis is the default job queue in our stack now. Replaces a lot of cron jobs and SQS-style systems.

D
devtomJun 14, 2026

Don't underestimate how much time you'll spend on `maxmemory-policy` tuning. The default is to error, not evict. Set it explicitly or you'll learn the hard way at 3am.

A
ariadJun 14, 2026

BullMQ on top of Redis is the default job queue in our stack now. Replaces a lot of cron jobs and SQS-style systems.

D
devtomJun 14, 2026

Don't underestimate how much time you'll spend on `maxmemory-policy` tuning. The default is to error, not evict. Set it explicitly or you'll learn the hard way at 3am.

A
ariadJun 14, 2026

BullMQ on top of Redis is the default job queue in our stack now. Replaces a lot of cron jobs and SQS-style systems.

D
devtomJun 14, 2026

Don't underestimate how much time you'll spend on `maxmemory-policy` tuning. The default is to error, not evict. Set it explicitly or you'll learn the hard way at 3am.