Cloud Parts

Redis

An in-memory data-structure server: the default cache, and also queues, counters and leaderboards.

Type
Open source
Made by
Redis Ltd.
License
AGPLv3, RSALv2 or SSPLv1 (Redis 8+)
Facts checked
5 October 2026

What it is

Redis keeps its whole dataset in RAM and answers commands over a simple TCP protocol, which is why reads and writes take well under a millisecond. Values aren’t just strings: there are hashes, lists, sets, sorted sets, streams and more, each with atomic commands such as INCR, ZADD or XADD. So one server can be a cache, a rate limiter, a leaderboard and a job queue. Redis 8 also folded JSON, time series, probabilistic types, the query engine and a new vector-set type into the core.

Durability is optional. RDB writes periodic snapshots. The append-only file (AOF) logs every write and, with the default once-a-second fsync, can lose about one second of data in a crash. Redis Cluster shards keys across nodes using 16,384 hash slots. Licensing has changed twice. Up to 7.2 Redis was BSD. In March 2024 version 7.4 moved to a choice of RSALv2 or SSPLv1, and the Linux Foundation forked 7.2.4 as Valkey, which stays BSD and is backed by AWS, Google, Oracle and others. Redis 8, released in May 2025, added the OSI-approved AGPLv3 as a third option.

Why teams pick it

  • Sub-millisecond reads and writes from memory
  • Rich data structures with atomic operations cover caching, counters, queues and rankings
  • Simple to run, with client libraries for most languages and managed services such as Amazon ElastiCache and Google Cloud Memorystore
  • Redis Cluster shards data and fails over automatically

Watch out for

  • The dataset has to fit in RAM, which costs far more per GB than disk
  • Even with AOF, the default setting can lose about a second of writes, and Redis Cluster can lose acknowledged writes during failover
  • Multi-key commands in a cluster work only when all keys share a hash slot, which means designing keys with hash tags
  • The licence history is complicated; teams that avoid AGPL often pick the BSD-licensed Valkey fork

Alternatives

What all key-value stores have in common →

How it fits with other technologies

A rate limiter, a leaderboard and a work queue with redis-cli · bash

# rate limit: count requests per API key per minute; the key expires on its own
redis-cli INCR rate:key_8812:202610050931
redis-cli EXPIRE rate:key_8812:202610050931 60 NX

# leaderboard: a sorted set ranks members by score
redis-cli ZADD leaderboard 3120 player:17 2890 player:42
redis-cli ZREVRANGE leaderboard 0 9 WITHSCORES

# work queue: a stream with a consumer group
redis-cli XADD orders '*' order_id 1042 total 59.90
redis-cli XGROUP CREATE orders billing 0
redis-cli XREADGROUP GROUP billing worker-1 COUNT 10 STREAMS orders '>'

Using Redis as a queue#

Redis has no queue type, but three of its features behave like one, with different answers to what happens when a consumer crashes. Job-queue libraries such as RQ for Python and Bull for Node.js build on them.

PatternCommandsIf a consumer crashes mid-jobWho gets each message
ListLPUSH to add; RPOP, or BRPOP to block until something arrivesThe message is lost: it left the list when it was poppedOne consumer
List with a processing listLMOVE (or blocking BLMOVE) pops it and pushes it onto a processing list in one step; LREM removes it when doneIt stays in the processing list; a separate monitor pushes items that sit there too long back onto the queueOne consumer
Stream with a consumer groupXADD to append; XREADGROUP … > to read new entries; XACK when doneIt stays in the group’s pending entries list; the consumer rereads it from ID 0, or another takes it over with XAUTOCLAIM (at least once)One consumer in each group; every group gets every entry, and entries stay until the stream is trimmed
Pub/subPUBLISH and SUBSCRIBEThe message is lost: delivery is at most once and nothing is storedEvery subscriber connected at that moment
  • LMOVE arrived in Redis 6.2 and replaces the deprecated RPOPLPUSH.

See it in a real stack

Web app on Kubernetes →
Live model
What you’re watchingRequests are spread across the pods. Each pod asks Redis first; hits come straight back, misses go on to PostgreSQL. Every 12 seconds one pod is taken down and the load balancer routes around it while Kubernetes replaces it.
Where it came from2009–2025

In 2009, Salvatore Sanfilippo (known as antirez) was trying to scale LLOOGG, a real-time web log analyzer run by his Italian startup. Every read and write in its MySQL backend went to disk, and as traffic grew the database couldn’t keep up. He prototyped a small in-memory server in Tcl, the “LLOOGG Memory DB”, which already stored strings and lists, then rewrote it in C. He called it Redis, for REmote DIctionary Server.

Once it worked, he decided to share it, and when it was posted to Hacker News in February 2009 it drew only a few comments, half of them his own replies. Developers caught on anyway: in November 2009 GitHub announced Resque, its Redis-backed job queue. VMware hired Sanfilippo in March 2010 to work on Redis full time. Pivotal later took over as sponsor, and in July 2015 Sanfilippo moved to Redis Labs (now Redis Ltd.). Redis 3.0, released that April, added Redis Cluster.

In June 2020 Sanfilippo stepped back as maintainer, writing that he “never wanted to be a software maintainer”. In March 2024 Redis Ltd. moved the core from the BSD licence to RSALv2 and SSPLv1, and eight days later the Linux Foundation forked the last BSD version as Valkey. Sanfilippo rejoined the company in December 2024, argued for the AGPLv3, and Redis 8 added it as a third licence option in May 2025.

Why it’s built this way

Keep the whole dataset in memory
Serving everything from RAM gives very fast reads and writes, at the cost of datasets no bigger than memory. Structures in memory are also much simpler to manipulate than on disk, so Redis does a lot with little internal complexity. An early experiment with virtual memory for bigger datasets was dropped.
Expose data structures, not just strings
Sanfilippo preferred working with lists and hash tables directly. Values are lists, sets, hashes and sorted sets with atomic commands on each, so a counter or a queue needs no locking in the application.
One thread runs every command
Redis is usually limited by memory or network, not CPU, and a single instance can serve around a million requests per second with pipelining. A single thread makes every command atomic; to use more cores, you run more instances.
Snapshots by fork, logs by appending
To save, Redis forks a child that shares memory pages copy-on-write and writes them out while the parent keeps serving. The on-disk formats never need random access, so they’re compact and always written append-only.

Timeline

  1. 2009

    Built to scale LLOOGG; released as open source in February

  2. 2010

    VMware hires Sanfilippo to work on Redis full time

  3. 2015

    Redis 3.0 ships Redis Cluster; Redis Labs becomes sponsor

  4. 2020

    Sanfilippo steps down as maintainer

  5. 2024

    Core moves to RSALv2/SSPLv1; Linux Foundation forks Valkey

  6. 2025

    Redis 8 adds the AGPLv3 option and vector sets

Sources20 · facts checked 5 October 2026

Improve this page on GitHub