Redis
An in-memory data-structure server: the default cache, and also queues, counters and leaderboards.
- What it is
- Key-value stores
- Used for
- Caching,Message queues
- 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 →
Amazon DynamoDBAWSAWS’s serverless key-value and document database, with single-digit-millisecond reads at any size.
Amazon ElastiCacheAWSAWS’s managed Valkey, Redis OSS and Memcached, as node-based clusters or a serverless cache.
Amazon MemoryDBAWSA Valkey- and Redis-compatible database that keeps everything in memory but loses no acknowledged write.
ValkeyOpen sourceThe Linux Foundation’s BSD-licensed fork of Redis 7.2.4: an in-memory key-value server that Redis clients can talk to unchanged.How it fits with other technologies
What uses Redis
- Cis the implementation language ofRedis
- Beta9depends onRedis
- BullMQkeeps jobs and locks inRedis
- Felderawrites view changes toRedis
- Quix Streamswrites keyed results toRedis
- Apache OpenDALcan use as a key-value backendRedis
- WAL-Gbacks up (beta)Redis
- Amazon ElastiCacheoffers managed clusters ofRedis
- Amazon MemoryDBspeaks the commands and protocol ofRedis
- Valkeyforked from version 7.2.4 ofRedis
- Logstashreads queued events from lists inRedis
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.
| Pattern | Commands | If a consumer crashes mid-job | Who gets each message |
|---|---|---|---|
| List | LPUSH to add; RPOP, or BRPOP to block until something arrives | The message is lost: it left the list when it was popped | One consumer |
| List with a processing list | LMOVE (or blocking BLMOVE) pops it and pushes it onto a processing list in one step; LREM removes it when done | It stays in the processing list; a separate monitor pushes items that sit there too long back onto the queue | One consumer |
| Stream with a consumer group | XADD to append; XREADGROUP … > to read new entries; XACK when done | It 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/sub | PUBLISH and SUBSCRIBE | The message is lost: delivery is at most once and nothing is stored | Every subscriber connected at that moment |
LMOVEarrived in Redis 6.2 and replaces the deprecatedRPOPLPUSH.
See it in a real stack
Web app on Kubernetes →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
- 2009
Built to scale LLOOGG; released as open source in February
- 2010
VMware hires Sanfilippo to work on Redis full time
- 2015
Redis 3.0 ships Redis Cluster; Redis Labs becomes sponsor
- 2020
Sanfilippo steps down as maintainer
- 2024
Core moves to RSALv2/SSPLv1; Linux Foundation forks Valkey
- 2025
Redis 8 adds the AGPLv3 option and vector sets
- Redis FAQ: why Redis keeps data in memory, the name, and LLOOGG
- antirez on GitHub: LMDB, the first version of Redis written in Tcl
- Hacker News: Redis (Feb 2009)
- GitHub blog: Introducing Resque (Nov 2009)
- antirez: VMware, the new Redis home (Mar 2010)
- antirez: Thanks Pivotal, hello Redis Labs (Jul 2015)
- Redis 3.0 release notes (Apr 2015)
- antirez: The end of the Redis adventure (Jun 2020)
- antirez: From where I left (Dec 2024)
- antirez: Redis is open source again (May 2025)
- Brachiosoft: Story of Redis and its creator antirez
Sources20 · facts checked 5 October 2026
- Redis docs: Data types
- Redis docs: Diagnosing latency issues
- Redis docs: Persistence
- Redis docs: Scale with Redis Cluster
- Redis docs: Client libraries
- Redis docs: EXPIRE
- Redis licenses
- Redis blog: Redis adopts dual source-available licensing (Mar 2024)
- Redis blog: Redis is now available under the AGPLv3 open source license (May 2025)
- Linux Foundation: Launches open source Valkey community (Mar 2024)
- Amazon ElastiCache
- Google Cloud Memorystore
- Redis glossary: Redis queue
- Redis docs: BRPOP
- Redis docs: LMOVE (pattern: reliable queue)
- Redis docs: Redis Streams
- Redis docs: XREADGROUP
- Redis docs: XACK
- Redis docs: XAUTOCLAIM
- Redis docs: Pub/sub (delivery semantics)