In-Memory Data Store

What is Redis

A blazing-fast in-memory store used for caching, queues, rate limiting and real-time streams.

Official site

Overview

Redis is an in-memory data structure store. Because it keeps data in RAM, reads and writes are sub-millisecond, which makes it the go-to layer for caching, session storage, rate limiting, pub/sub messaging and lightweight queues.

It is more than a key-value cache: it offers rich data types (lists, sets, sorted sets, hashes, streams) that turn common patterns — leaderboards, job queues, event streams — into a few native commands. It can persist to disk, but its heart is speed.

What it is

Redis is a single-purpose speed layer. It stores structured values in memory and exposes them through fast, atomic commands. Streams give it a durable append-only log; pub/sub gives it messaging; TTLs make it a natural cache.

  • Sub-millisecond in-memory reads and writes
  • Rich types: lists, sets, sorted sets, hashes, streams
  • Caching, rate limiting, queues, and pub/sub in one tool

When we reach for it

We add Redis whenever a system needs a cache in front of a slower database, a distributed rate limiter, a job/stream backbone, or shared ephemeral state across instances. It removes load from the primary datastore cheaply.

Trade-offs

Redis lives in RAM, so it is not your source of truth for large or critical data — memory is finite and (depending on config) data can be lost on failure. It complements a primary database; it does not replace one. Treat it as fast, disposable state.

How REO Rank uses it

Our crawler uses Redis Streams as its work backbone, coordinating jobs across distributed workers, and we use Redis for caching and rate limiting in the backend. It is the piece that keeps high-throughput paths from hammering the primary database.

Why it matters

Redis is an in-memory data store, most commonly used as a cache to make applications dramatically faster. It matters because keeping frequently-accessed data in memory — rather than fetching it from a disk-based database every time — cuts response times from milliseconds to microseconds, which is the difference between a snappy application and a slow one under load. Beyond caching, its speed and versatile data structures make it a Swiss-army knife for real-time features (sessions, rate limiting, queues, leaderboards, pub/sub), which is why it is one of the most widely-deployed pieces of infrastructure in modern web stacks.

  • An in-memory data store, most often used as a cache for speed
  • Serving data from memory cuts response times from ms to microseconds
  • Also powers sessions, rate limiting, queues, leaderboards and pub/sub

Key characteristics

Redis holds data in RAM, which is what makes it extraordinarily fast, and supports rich data structures — strings, hashes, lists, sets, sorted sets, streams — that let it do far more than simple key-value caching. It offers optional persistence (snapshots or an append-only log) so data can survive restarts, expiry/TTL for cache entries, atomic operations, and pub/sub messaging. The core trade-off is that RAM is more expensive and limited than disk, so Redis is for hot, frequently-accessed data, not as a primary store for everything. Used as a cache in front of a database, it absorbs read load and slashes latency.

  • In-memory storage for extreme speed; rich data structures beyond key-value
  • Optional persistence, TTL expiry, atomic operations and pub/sub
  • RAM is costly and limited — for hot data, not as a primary store for all data
  • As a cache in front of a database, it absorbs read load and cuts latency

In practice

The classic pattern is a cache in front of a slower data source: the application checks Redis first, returns the cached value on a hit, and on a miss fetches from the database, stores it in Redis with a TTL, and returns it — so repeated reads are served from memory. Beyond caching, Redis is reached for whenever speed and simple shared state matter: storing user sessions, implementing rate limiting (atomic counters with expiry), backing job queues, and real-time leaderboards (sorted sets). The discipline is to use it for what belongs in fast, ephemeral memory and keep the durable source of truth in a primary database, with sensible cache-invalidation so stale data does not linger.

  • Cache-aside pattern: check Redis first, populate on miss with a TTL
  • Sessions, rate limiting, queues and real-time leaderboards are common uses
  • Keep the durable source of truth in a primary database
  • Plan cache invalidation so stale data does not persist

Common questions

Redis — questions

Straight answers on how this fits your marketing and build.

Is Redis a database?
It can persist to disk and act as a primary store, but its main use is as a fast in-memory layer for caching, queues and streams alongside a durable database. We treat it as speed-critical, mostly disposable state rather than the source of truth.
What is Redis Streams used for?
Redis Streams is a durable, append-only log for event-driven and job-processing systems. It lets multiple workers consume a stream reliably with acknowledgements — which is exactly how our crawler distributes crawl jobs across workers.
What is Redis mainly used for?
Most commonly as a cache — storing frequently-accessed data in memory so applications can serve it in microseconds instead of querying a slower database each time. Its speed and rich data structures also make it popular for sessions, rate limiting, job queues, real-time leaderboards and pub/sub messaging.
Can Redis be my primary database?
For most applications, no. Because it stores data in RAM — which is fast but more expensive and limited than disk — it is best for hot, frequently-accessed or ephemeral data, with the durable source of truth kept in a primary database. It offers persistence options, but its typical role is a fast cache and real-time layer alongside a main database, not a replacement for it.

Still have questions? Talk to a specialist