Databases and storage · Database

Redis

An in-memory key-value store that answers in well under a millisecond, used for caching, sessions, rate limits, queues and live counters.

Document and key-value · Open source · updated

How it works

Redis keeps data in memory and maps keys to values: strings, lists, sets, sorted sets, hashes and streams. Because nothing waits on a disk, reads and writes are extremely fast, which makes it the usual choice for a cache in front of a slower database, for session storage and for counting things such as requests per minute.

It can save to disk, but it is usually a fast helper beside a main database rather than the only copy of important data. A 2024 licence change led to Valkey, a fully open-source fork under the Linux Foundation, and Redis later added an AGPL option. Upstash and Redis Cloud host it for you.

Redis pros and cons

Pros

  • Extremely fast, with rich data structures
  • Simple to use for caching, sessions and rate limiting
  • Built-in pub/sub, streams and keys that expire on their own

Cons

  • Memory costs more than disk, so large datasets get expensive
  • Not a replacement for a durable main database
  • Licence changes mean checking which flavour (Redis or Valkey) you run

When to use Redis

Pick it when

  • Caching slow queries or API responses
  • Rate limits, sessions, leaderboards and short-lived data
  • Simple job queues and real-time counters

Skip it when

  • It would be the only copy of data you cannot afford to lose

Redis pricing

Open source

Free to run yourself. Redis Cloud has a free 30 MB database and paid plans from about $5 a month; Upstash bills per request.

Redis pricing page (opens in a new tab)Approximate, checked September 2026.What the other tools cost

More in Databases and storage

Document and key-value

All 25 Databases and storage terms

Crafted in the dark. Shipped to the world.

Tell us what you are building. You get a private project space with a proposal and a line-by-line quote within a day.