HOME

TheInfoList



OR:

Redis (; Remote Dictionary Server) is an in-memory key–value
database In computing, a database is an organized collection of data or a type of data store based on the use of a database management system (DBMS), the software that interacts with end users, applications, and the database itself to capture and a ...
, used as a distributed cache and message broker, with optional
durability Durability is the ability of a physical product to remain functional, without requiring excessive maintenance or repair, when faced with the challenges of normal operation over its design lifetime. There are several measures of durability in us ...
. Because it holds all data in
memory Memory is the faculty of the mind by which data or information is encoded, stored, and retrieved when needed. It is the retention of information over time for the purpose of influencing future action. If past events could not be remembe ...
and because of its design, Redis offers low- latency reads and writes, making it particularly suitable for use cases that require a cache. Redis is the most popular
NoSQL NoSQL (originally meaning "Not only SQL" or "non-relational") refers to a type of database design that stores and retrieves data differently from the traditional table-based structure of relational databases. Unlike relational databases, which ...
database, and one of the most popular databases overall. The project was developed and maintained by Salvatore Sanfilippo, starting in 2009. From 2015 until 2020, he led a project core team sponsored by Redis Ltd. Salvatore Sanfilippo left Redis as the maintainer in 2020. In 2021 Redis Labs dropped the Labs from its name and now is known simply as "Redis". In 2018, some modules for Redis adopted a modified Apache 2.0 with a Commons Clause. In 2024, the main Redis code switched from the
open-source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use and view the source code, design documents, or content of the product. The open source model is a decentrali ...
BSD-3 license to being dual-licensed under the Redis
Source Available Source-available software is software released through a source code distribution model that includes arrangements where the source can be viewed, and in some cases modified, but without necessarily meeting the criteria to be called ''open-source ...
License v2 and the
Server Side Public License The Server Side Public License (SSPL) is a Source-available software, source-available copyleft software license introduced by MongoDB Inc. in 2018. It includes most of the text and provisions of the GNU Affero General Public License version ...
v1. On May 1, 2025, Redis became tri-licensed beginning with version 8.0, with the
GNU Affero General Public License The GNU Affero General Public License (GNU AGPL) is a free, copyleft license published by the Free Software Foundation in November 2007, and based on the GNU GPL version 3 and the ''Affero General Public License'' (non-GNU). It is intended fo ...
as the third option.


History

The name ''Redis'' means Remote Dictionary Server. The Redis project began when Salvatore Sanfilippo, nicknamed ''antirez'', the original developer of Redis, was trying to improve the scalability of his Italian startup, developing a real-time web log analyzer. After encountering significant problems in scaling some types of workloads using traditional database systems, Sanfilippo began in 2009 to prototype a first proof of concept version of Redis in Tcl. Later Sanfilippo translated that prototype to the C language and implemented the first data type, the list. After a few weeks of using the project internally with success, Sanfilippo decided to open source it, announcing the project on Hacker News. The project began to get traction, particularly among the Ruby community, with
GitHub GitHub () is a Proprietary software, proprietary developer platform that allows developers to create, store, manage, and share their code. It uses Git to provide distributed version control and GitHub itself provides access control, bug trackin ...
and
Instagram Instagram is an American photo sharing, photo and Short-form content, short-form video sharing social networking service owned by Meta Platforms. It allows users to upload media that can be edited with Social media camera filter, filters, be ...
being among the first companies adopting it. Sanfilippo was hired by VMware in March 2010. In May 2013, Redis was sponsored by Pivotal Software (a VMware spin-off). In June 2015, development became sponsored by Redis Ltd. In August 2018, to control usage of the software by managed cloud providers without adequate compensation, Redis Ltd. announced that it would relicense the optional Redis modules from the
GNU Affero General Public License The GNU Affero General Public License (GNU AGPL) is a free, copyleft license published by the Free Software Foundation in November 2007, and based on the GNU GPL version 3 and the ''Affero General Public License'' (non-GNU). It is intended fo ...
(AGPL) to the
Apache License The Apache License is a permissive free software license written by the Apache Software Foundation (ASF). It allows users to use the software for any purpose, to distribute it, to modify it, and to distribute modified versions of the software ...
, but subject to an addendum known as the " Commons Clause" that restricts commercial usage. This made the modules source-available and no longer
free software Free software, libre software, libreware sometimes known as freedom-respecting software is computer software distributed open-source license, under terms that allow users to run the software for any purpose as well as to study, change, distribut ...
. The core Redis software remained under a
BSD license BSD licenses are a family of permissive free software licenses, imposing minimal restrictions on the use and distribution of covered software. This is in contrast to copyleft licenses, which have share-alike requirements. The original BSD lic ...
, with Redis Ltd. committing to maintaining these terms. In October 2018, Redis 5.0 was released, introducing Redis Stream – a new data structure that allows storage of multiple fields and string values with an automatic, time-based sequence at a single key. In February 2019, citing confusion over the licensing terms, the Apache License with Commons Clause licensing terms for Redis modules was replaced with the "Redis Source Available License" (RSAL), which explicitly prohibits commercial use of the modules as part of "a database, a caching engine, a stream processing engine, a search engine, an indexing engine or an ML/DL/AI serving engine." The last revision of the modules under a
free and open source Free and open-source software (FOSS) is software available under a license that grants users the right to use, modify, and distribute the software modified or not to everyone free of charge. FOSS is an inclusive umbrella term encompassing free ...
license were forked by community members as the GoodFORM project. In June 2020, Salvatore Sanfilippo stepped down as Redis' sole maintainer. Sanfilippo was succeeded by Yossi Gottlieb and Oran Agra. In March 2024, Redis Ltd. announced that beginning with version 7.4, the core Redis software would be relicensed under the RSAL and
Server Side Public License The Server Side Public License (SSPL) is a Source-available software, source-available copyleft software license introduced by MongoDB Inc. in 2018. It includes most of the text and provisions of the GNU Affero General Public License version ...
(SSPL), both of which are source-available and non-free. The
Linux Foundation The Linux Foundation (LF) is a non-profit organization established in 2000 to support Linux development and open-source software projects. Background The Linux Foundation started as Open Source Development Labs in 2000 to standardize and prom ...
subsequently announced that it would fork the last BSD-licensed version of Redis as Valkey. In May 2025, Redis Ltd. announced that it would change the license again to the AGPL beginning on version 8.0, citing that that forks had achieved their goal of creating a "level playing field" of differentiated products, and that Redis has achieved "record growth" since the change in license.


Differences from other database systems

Redis popularized the idea of a system that can be considered a store and a cache at the same time. It was designed so that data is always modified and read from the main computer memory, but also stored on disk in a format that is unsuitable for random data access. The formatted data is only reconstructed into memory once the system restarts. Redis also provides a data model that is very unusual compared to a
relational database management system A relational database (RDB) is a database based on the relational model of data, as proposed by E. F. Codd in 1970. A Relational Database Management System (RDBMS) is a type of database management system that stores data in a structured for ...
(RDBMS). User commands do not describe a query to be executed by the database engine but rather specific operations that are performed on given abstract data types. Therefore data must be stored in a way which is suitable later for fast retrieval. The retrieval is done without help from the database system in form of secondary indexes, aggregations or other common features of traditional RDBMS. The Redis implementation makes heavy use of the fork system call, to duplicate the process holding the data, so that the parent process continues to serve clients while the child process writes the in-memory data to disk.


Popularity

According to monthly DB-Engines rankings, Redis is often the most popular key–value database. Redis has also been ranked the #4
NoSQL NoSQL (originally meaning "Not only SQL" or "non-relational") refers to a type of database design that stores and retrieves data differently from the traditional table-based structure of relational databases. Unlike relational databases, which ...
database in user satisfaction and market presence based on user reviews, the most popular NoSQL database in containers, and the #4 Data store of 2019 by ranking website stackshare.io. It was voted most loved database in the
Stack Overflow In software, a stack overflow occurs if the call stack pointer exceeds the stack bound. The call stack may consist of a limited amount of address space, often determined at the start of the program. The size of the call stack depends on many fa ...
br>Developer Survey
each year from 2017 to 2021, however, it has since fallen to sixth place.


Supported languages

Since version 2.6, Redis features server-side scripting in the language Lua. Many
programming language A programming language is a system of notation for writing computer programs. Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
s have Redis language bindings on the client side, including:
ActionScript ActionScript is an object-oriented programming language originally developed by Macromedia Inc. (later acquired by Adobe). It is influenced by HyperTalk, the scripting language for HyperCard. It is now an implementation of ECMAScript (mean ...
, C, C++, C#,
Chicken The chicken (''Gallus gallus domesticus'') is a domesticated subspecies of the red junglefowl (''Gallus gallus''), originally native to Southeast Asia. It was first domesticated around 8,000 years ago and is now one of the most common and w ...
,
Clojure Clojure (, like ''closure'') is a dynamic programming language, dynamic and functional programming, functional dialect (computing), dialect of the programming language Lisp (programming language), Lisp on the Java (software platform), Java platfo ...
,
Common Lisp Common Lisp (CL) is a dialect of the Lisp programming language, published in American National Standards Institute (ANSI) standard document ''ANSI INCITS 226-1994 (S2018)'' (formerly ''X3.226-1994 (R1999)''). The Common Lisp HyperSpec, a hyperli ...
,
Crystal A crystal or crystalline solid is a solid material whose constituents (such as atoms, molecules, or ions) are arranged in a highly ordered microscopic structure, forming a crystal lattice that extends in all directions. In addition, macros ...
, D, Dart,
Delphi Delphi (; ), in legend previously called Pytho (Πυθώ), was an ancient sacred precinct and the seat of Pythia, the major oracle who was consulted about important decisions throughout the ancient Classical antiquity, classical world. The A ...
,
Elixir An elixir is a sweet liquid used for medical purposes, to be taken orally and intended to cure one's illness. When used as a dosage form, pharmaceutical preparation, an elixir contains at least one active ingredient designed to be taken orall ...
, Erlang, Go,
Haskell Haskell () is a general-purpose, statically typed, purely functional programming language with type inference and lazy evaluation. Designed for teaching, research, and industrial applications, Haskell pioneered several programming language ...
,
Haxe Haxe is a high-level cross-platform programming language and compiler that can produce applications and source code for many different computing platforms from one code-base. It is free and open-source software, released under an MIT License. ...
, Io,
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
, Nim,
JavaScript JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior. Web browsers have ...
( Node.js), Julia, Lua,
Objective-C Objective-C is a high-level general-purpose, object-oriented programming language that adds Smalltalk-style message passing (messaging) to the C programming language. Originally developed by Brad Cox and Tom Love in the early 1980s, it was ...
,
OCaml OCaml ( , formerly Objective Caml) is a General-purpose programming language, general-purpose, High-level programming language, high-level, Comparison of multi-paradigm programming languages, multi-paradigm programming language which extends the ...
,
Perl Perl is a high-level, general-purpose, interpreted, dynamic programming language. Though Perl is not officially an acronym, there are various backronyms in use, including "Practical Extraction and Reporting Language". Perl was developed ...
, PHP, Pure Data, Python, R, Racket,
Ruby Ruby is a pinkish-red-to-blood-red-colored gemstone, a variety of the mineral corundum ( aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called sapph ...
,
Rust Rust is an iron oxide, a usually reddish-brown oxide formed by the reaction of iron and oxygen in the catalytic presence of water or air moisture. Rust consists of hydrous iron(III) oxides (Fe2O3·nH2O) and iron(III) oxide-hydroxide (FeO(OH) ...
, Scala,
Smalltalk Smalltalk is a purely object oriented programming language (OOP) that was originally created in the 1970s for educational use, specifically for constructionist learning, but later found use in business. It was created at Xerox PARC by Learni ...
,
Swift Swift or SWIFT most commonly refers to: * SWIFT, an international organization facilitating transactions between banks ** SWIFT code * Swift (programming language) * Swift (bird), a family of birds It may also refer to: Organizations * SWIF ...
, and Tcl. Several client software programs exist in these languages.


Redis data types, processing engines, and capabilities

Redis maps keys to types of values. An important difference between Redis and other structured storage systems is that Redis supports not only strings, but also
abstract data types In computer science, an abstract data type (ADT) is a mathematical model for data types, defined by its behavior (semantics) from the point of view of a '' user'' of the data, specifically in terms of possible values, possible operations on data ...
:
String
- A Redis string is the most basic Redis data type. It holds a sequence of bytes. A string may represent a text, an integer value, a floating-point value, a serialized object, or anything else.
JSON
- The Redis JSON data type provides JavaScript Object Notation (JSON) support for Redis. It lets users store, retrieve, and update JSON documents. A JSON document can be queried and manipulated using JSONPath expressions. JSON works seamlessly with the Redis Query Engine to let users index and query JSON documents.
Hash
A Redis hash is a collection of fields, each field is a name-value string pair. Users can use hashes to represent flat objects and to store groupings of counters, among other things. Expiration time or a time-to-live can be set for each hash field. Hash works seamlessly with the Redis Query Engine to let users index and query hashes.
Redis Query Engine
The Redis Query Engine allows users to use Redis as a
document database A document-oriented database, or document store, is a computer program and data storage system designed for storing, retrieving and managing document-oriented information, also known as Semi-structured model, semi-structured data. Document-orie ...
, a vector database, a secondary index, and a search engine. With Redis Query Engine, users can define indexes for hash and JSON documents, and use a rich query language for vector search, full-text search, geospatial queries, and aggregations.
List
A Redis list is a list of strings, sorted by insertion order. Lists are great for stacks, queues, and for queue management and worker systems.
Set
A Redis set is an unordered collection of unique strings (members). Sets can be used to track unique items (e.g., track all unique IP addresses accessing a given blog post), represent relations (e.g., the set of all users with a given role). Redis also supports common set operations such as
intersection In mathematics, the intersection of two or more objects is another object consisting of everything that is contained in all of the objects simultaneously. For example, in Euclidean geometry, when two lines in a plane are not parallel, their ...
, union, and difference.
Sorted Set
A Redis sorted set is similar to a set, but each member is associated with a score. When more than one member has the same score, the members are ordered lexicographically. Some use cases for sorted sets include leaderboards and sliding-window rate limiters.
Vector Set
A Redis vector set is a data type similar to a sorted set, but instead of a score, each member is associated with a vector embedding. Users can add items to a vector set and then retrieve the members that are the most similar to a specified vector embedding or the vector embedding of an existing member.
Geospatial Index
Redis Geospatial indexes let users store coordinates and search for them. This data structure is useful for finding nearby points within a given radius or bounding box.
Bitmap
Redis bitmaps provide bit-oriented operations on a bit array. Users can get bits, set bits, and perform
bitwise operations In computer programming, a bitwise operation operates on a bit string, a bit array or a binary numeral (considered as a bit string) at the level of its individual bits. It is a fast and simple action, basic to the higher-level arithmetic opera ...
between bitmaps. Bitmaps are often used to efficiently manage memberships or permissions, where each bit represents a particular member.
Bitfield
Redis bitfields let users set, increment, and get integer values of arbitrary bit length - from unsigned 1-bit integers to signed 63-bit integers. Bitfields are often used to efficiently manage arrays of limited-range counters or numerical values.
HyperLogLog
Redis HyperLogLog is a Redis probabilistic data structure used for approximating the cardinality of a stream (i.e., the number of unique elements).
Bloom filter
Bloom filter is a Redis probabilistic data structure used for checking if a given value is present in a
stream A stream is a continuous body of water, body of surface water Current (stream), flowing within the stream bed, bed and bank (geography), banks of a channel (geography), channel. Depending on its location or certain characteristics, a strea ...
.
Cuckoo filter
Cuckoo filter, just like Bloom filter, is a Redis probabilistic data structure for checking if a given value is present in a
stream A stream is a continuous body of water, body of surface water Current (stream), flowing within the stream bed, bed and bank (geography), banks of a channel (geography), channel. Depending on its location or certain characteristics, a strea ...
, while also allowing limited counting and deletions.
Top-k
Top-k is a Redis probabilistic data structure used for tracking the most frequent values in a
stream A stream is a continuous body of water, body of surface water Current (stream), flowing within the stream bed, bed and bank (geography), banks of a channel (geography), channel. Depending on its location or certain characteristics, a strea ...
.
Count-min sketch
Count–min sketch is a Redis probabilistic data structure used for estimating how many times a given value appears in a
stream A stream is a continuous body of water, body of surface water Current (stream), flowing within the stream bed, bed and bank (geography), banks of a channel (geography), channel. Depending on its location or certain characteristics, a strea ...
.
t-digest
t-digest is a Redis probabilistic data structure used for estimating which fraction / how many values in a
stream A stream is a continuous body of water, body of surface water Current (stream), flowing within the stream bed, bed and bank (geography), banks of a channel (geography), channel. Depending on its location or certain characteristics, a strea ...
are smaller than a given value, or which value is smaller than ''p'' percent of the values in a stream (the ''p''-percentile value).
Time Series
A Redis
time series In mathematics, a time series is a series of data points indexed (or listed or graphed) in time order. Most commonly, a time series is a sequence taken at successive equally spaced points in time. Thus it is a sequence of discrete-time data. ...
allows storing and querying a series of timetagged data points (samples).
Pub/Sub
Redis Pub/Sub (short for publish/subscribe) is a lightweight messaging capability. Publishers send messages to a channel, and subscribers receive messages from that channel.
Stream
A Redis stream is a data structure that acts like an append-only log. Each stream entry consists of name-value string pairs, similar to a hash. Streams support multiple consumption strategies, where consumers can pop entries, consume entries by range, or listen to entries. Consumer groups allow multiple workers to retrieve different stream entries in order to scale message processing.
Transactions
A Redis transaction allows the execution of a group of commands in a single step. A request sent by another client will never be served during the execution of a transaction. This guarantees that the commands are executed as a single isolated operation.
Programmability
Redis users can upload and execute Lua scripts on the server. Scripts can employ programmatic control structures and use most of the commands while executing to access the database. Because scripts are executed on the server, reading and writing data from scripts is very efficient. Functions provide the same core functionality as scripts but are first-class software artifacts of the database. Redis manage
functions
as an integral part of the database and ensures their availability via data persistence and replication.


Persistence

Redis typically holds the whole dataset in memory. Versions up to 2.4 could be configured to use what they refer to as virtual memory in which some of the dataset is stored on disk, but this feature is deprecated. Persistence in Redis can be achieved through two different methods. First by snapshotting, where the dataset is asynchronously transferred from memory to disk at regular intervals as a binary dump, using the Redis RDB Dump File Format. Alternatively by journaling, where a record of each operation that modifies the dataset is added to an append-only file (AOF) in a background process. Redis can rewrite the append-only file in the background to avoid an indefinite growth of the journal. Journaling was introduced in version 1.1 and is generally considered the safer approach. By default, Redis writes data to a file system at least every 2 seconds, with more or less robust options available if needed. In the case of a complete system failure on default settings, only a few seconds of data would be lost.


Replication

Redis supports master–replica replication. Data from any Redis server can replicate to any number of replicas. A replica may be a master to another replica. This allows Redis to implement a single-rooted replication tree. Redis replicas can be configured to accept writes, permitting intentional and unintentional inconsistency between instances. The publish–subscribe feature is fully implemented, so a client of a replica may subscribe to a channel and receive a full feed of messages published to the master, anywhere up the replication tree. Replication is useful for read (but not write) scalability or data redundancy.


Performance

When the
durability Durability is the ability of a physical product to remain functional, without requiring excessive maintenance or repair, when faced with the challenges of normal operation over its design lifetime. There are several measures of durability in us ...
of data is not needed, the in-memory nature of Redis allows it to perform well compared to database systems that write every change to disk before considering a transaction committed. Redis operates as a single process and is single-threaded or double-threaded when it rewrites the AOF (append-only file). Thus, a single Redis instance cannot use parallel execution of tasks such as
stored procedure A stored procedure (also termed prc, proc, storp, sproc, StoPro, StoredProc, StoreProc, sp, or SP) is a subroutine available to applications that access a relational database management system (RDBMS). Such procedures are stored in the database d ...
s.


Clustering

Redis introduced clustering in April 2015 with the release of version 3.0. The cluster specification implements a subset of Redis commands: all single-key commands are available, multi-key operations (commands related to unions and intersections) are restricted to keys belonging to the same node, and commands related to database selection operations are unavailable. A Redis cluster can scale up to 1,000 nodes, achieve "acceptable" write safety and to continue operations when some nodes fail.


Use cases

Due to the nature of the database design, typical use cases are session caching, full page cache, message queue applications, leaderboards and counting among others. The publish–subscribe messaging paradigm allows real-time communication between servers.
Amazon Web Services Amazon Web Services, Inc. (AWS) is a subsidiary of Amazon.com, Amazon that provides Software as a service, on-demand cloud computing computing platform, platforms and Application programming interface, APIs to individuals, companies, and gover ...
offers a managed Redis service called ElastiCache for Redis,
Google Google LLC (, ) is an American multinational corporation and technology company focusing on online advertising, search engine technology, cloud computing, computer software, quantum computing, e-commerce, consumer electronics, and artificial ...
offers a managed Redis service called Cloud Memorystore,
Microsoft Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
offers Azure Cache for Redis in Azure, and Alibaba offers ApsaraDB for Redis in Alibaba Cloud.


Users

Redis has been used by companies including
Twitter Twitter, officially known as X since 2023, is an American microblogging and social networking service. It is one of the world's largest social media platforms and one of the most-visited websites. Users can share short text messages, image ...
,
Airbnb Airbnb, Inc. ( , an abbreviation of its original name, "Air Bed and Breakfast") is an American company operating an online marketplace for short-and-long-term homestays, experiences and services in various countries and regions. It acts as a ...
,
Tinder Tinder is easily Combustibility and flammability, combustible material used to Firemaking, start a fire. Tinder is a finely divided, open material which will begin to glow under a shower of sparks. Air is gently wafted over the glowing tinder unt ...
,
Yahoo Yahoo (, styled yahoo''!'' in its logo) is an American web portal that provides the search engine Yahoo Search and related services including My Yahoo, Yahoo Mail, Yahoo News, Yahoo Finance, Yahoo Sports, y!entertainment, yahoo!life, an ...
, Adobe,
Hulu Hulu (, ) is an American Subscription business model, subscription streaming media service owned by Disney Streaming, a subsidiary of the Disney Entertainment segment of the Walt Disney Company. It was launched on October 29, 2007, initially as ...
,
Amazon Amazon most often refers to: * Amazon River, in South America * Amazon rainforest, a rainforest covering most of the Amazon basin * Amazon (company), an American multinational technology company * Amazons, a tribe of female warriors in Greek myth ...
and OpenAI.


See also

* Conflict-free replicated data type * Memcached * Infinispan * Valkey


References


Further reading

* Isabel Drost and Jan Lehnard (29 October 2009)
Happenings: NoSQL Conference, Berlin
The H
Slides
for the Redis presentation

* Billy Newport (IBM):
Evolving the Key/Value Programming Model to a Higher Level
Qcon Conference 2009 San Francisco. * A Mishra:

. * E. Mouzakitis:
Monitoring Redis Performance


External links

*
Valkey: Ongoing development home of the original BSD-licensed Redis software
{{DEFAULTSORT:Redis C (programming language) software Database caching Database management systems Distributed computing architecture Key-value databases Lua (programming language)-scriptable software NoSQL Software using the Server Side Public License Structured storage In-memory database management systems