From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
Redis Logo.svg
Developer(s) Salvatore Sanfilippo[1][2]
Initial release May 10, 2009; 9 years ago (2009-05-10)
Stable release
4.0.11 / August 3, 2018; 49 days ago (2018-08-03)[3]
Repository Edit this at Wikidata
Written in ANSI C
Operating system Cross-platform
Available in English
Type Data structure store, Key-value database
License BSD

Redis (Remote Dictionary Server) /'redɪs/, RE-dis[4][5] is an open-source in-memory data structure project implementing a distributed, in-memory key-value database with optional durability. Redis supports different kinds of abstract data structures, such as strings, lists, maps, sets, sorted sets, hyperloglogs, bitmaps and spatial indexes. The project is mainly developed by Salvatore Sanfilippo and is currently sponsored by Redis Labs.[6]


The name Redis means REmote DIctionary Server.[7] Salvatore Sanfilippo, also known as antirez, the original developer of Redis, was hired by VMware in March, 2010.[8][9][10] In May, 2013, Redis was sponsored by Pivotal Software (a VMware spin-off).[11] In June 2015, development became sponsored by Redis Labs.[12]


According to monthly rankings by DB-Engines, Redis is often ranked the most popular key-value database.[13] Redis has also been ranked the #4 NoSQL database in user satisfaction and market presence based on user reviews,[14] the most popular NoSQL database in containers,[15] and the #1 NoSQL database of 2015 by ranking website[16]

Supported languages[edit]

Since version 2.6 Redis features server-side Lua scripting.[17]

Many languages have Redis bindings on the client side, including:[18] ActionScript, C, C++, C#, Chicken Scheme, Clojure, Common Lisp, Crystal, D, Dart, Erlang, Go, Haskell, Haxe, Io, Java, JavaScript (Node.js), Julia, Lua, Objective-C, OCaml, Perl, PHP, Pure Data, Python, R,[19] Racket, Ruby, Rust, Scala, Smalltalk, Swift, and Tcl. Several client software programs exist in these languages.[18]

Data types[edit]

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:

  • Lists of strings
  • Sets of strings (collections of non-repeating unsorted elements)
  • Sorted sets of strings (collections of non-repeating elements ordered by a floating-point number called score)
  • Hash tables where keys and values are strings
  • HyperLogLogs used for approximated set cardinality size estimation.
  • Geospatial data through the implementation of the geohash technique since Redis 3.2.[20]

The type of a value determines what operations (called commands) are available for the value itself. Redis supports high-level, atomic, server-side operations like intersection, union, and difference between sets and sorting of lists, sets and sorted sets.

The Redis module ReJSON implements ECMA-404 (the JSON Data Interchange Standard) as a native data type.[21]


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[22] in which some of the dataset is stored on disk, but this feature is deprecated. Persistence is now achieved in two different ways: one is called snapshotting, and is a semi-persistent durability mode where the dataset is asynchronously transferred from memory to disk from time to time, written in RDB dump format. Since version 1.1 the safer alternative is AOF, an append-only file (a journal) that is written as operations modifying the dataset in memory are processed. Redis is able to rewrite the append-only file in the background in order to avoid an indefinite growth of the journal.

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.


Redis supports master-slave replication. Data from any Redis server can replicate to any number of slaves. A slave may be a master to another slave. This allows Redis to implement a single-rooted replication tree. Redis slaves 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 slave 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.[23]


When the durability 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.[7] Redis operates as a single process and is single-threaded or double-threaded when it rewrites the AOF (append-only file).[24] Therefore, a single Redis instance cannot utilize parallel execution of tasks such as stored procedures.


Redis introduced clustering in April 2015 with the release of version 3.0.[25] 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.[26] A Redis cluster is able to scale up to 1,000 nodes, achieve "acceptable" write safety and to continue operations when some nodes fail.[27][28]

Use cases[edit]

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.[29] Large companies such as Twitter are using Redis,[30] Amazon Web Services is offering Redis in its portfolio and Microsoft is offering the Redis Cache in Azure.[31]

See also[edit]

Commercial implementations[edit]

Some companies have used Redis and created commercial offerings around it:

On August 22, 2018, Redis Labs relicensed some Redis Modules under a combination of the Apache License 2.0 and the Commons Clause, which is a source-available arrangement that prohibits users from selling the software.[32][33] Redis Modules were previously licensed under the Affero General Public License.[34][35]


  1. ^ An interview with Salvatore Sanfilippo, creator of Redis, working out of Sicily, January 4, 2011, by Stefano Bernardi, EU-Startups
  2. ^ Salvatore Sanfilippo – Welcome to Redis Labs, July 15, 2015, By Itamar Haber, Redis Labs
  3. ^ "Redis 4.0 release notes". 
  4. ^ "FAQ – Redis". 
  5. ^ "Google Groups". 
  6. ^ Kepes, Ben (July 15, 2015),"Redis Labs hires the creator of Redis, Salvatore Sanfilippo", Network World, Retrieved August 30, 2015.
  7. ^ a b "FAQ, Redis". 
  8. ^ Gwen Shapira (March 17, 2010). "VMware Hires Redis Key Developer – But Why?". Blog. Retrieved September 25, 2016. 
  9. ^ Salvatore Sanfilippo (March 15, 2010). "VMware: the new Redis home". Blog. Retrieved September 25, 2016. 
  10. ^ Derek Collison (March 15, 2010). "VMware: The Console: VMware hires key developer for Redis". Blog. Archived from the original on March 22, 2010. Retrieved September 25, 2016. 
  11. ^ Salvatore Sanfilippo. "Redis Sponsors". Redis Labs. Retrieved September 25, 2016. 
  12. ^ Thanks Pivotal, Hello Redis Labs, July 15, 2015, By Salvatore Sanfilippo, Redis Labs
  13. ^ "DB-Engines Ranking - popularity ranking of key-value stores". 
  14. ^ "Best NoSQL Databases: Fall 2015 Report from G2 Crowd". 
  15. ^ "8 Surprising Facts about Real Docker Adoption". Datadog. 
  16. ^ "Top 50 Developer Tools & Services of 2015 - StackShare". 
  17. ^ "EVAL – Redis". 
  18. ^ a b "Redis". 
  19. ^ Lewis, B. W. (5 July 2015). "rredis: "Redis" Key/Value Database Client" – via R-Packages. 
  20. ^ Redis 3.2 Release Notes, Retrieved 2017-03-10
  21. ^ "ReJSON - a JSON data type for Redis". 
  22. ^ Redis documentation "Virtual Memory",, accessed January 18, 2011.
  23. ^ "Google Code Archive - Long-term storage for Google Code Project Hosting". 
  24. ^ "Redis on the Raspberry Pi: adventures in unaligned lands - <antirez>". 
  25. ^ Redis 3.0 Release Notes, Retrieved 2017-03-10
  26. ^ Cluster Spec, Retrieved 2017-03-10
  27. ^ Cluster Spec, Retrieved 2017-03-10
  28. ^ Cluster Tutorial, Retrieved 2017-03-10
  29. ^ "Top 5 Redis use cases - ObjectRocket". 7 November 2017. 
  30. ^ "How Twitter Uses Redis to Scale - 105TB RAM, 39MM QPS, 10,000+ Instances - High Scalability -". 
  31. ^ "Azure Redis Cache - Redis cache cloud service - Microsoft Azure". 
  32. ^ "Commons Clause License". Commons Clause License. Retrieved 2018-08-24. 
  33. ^ Asay, Matt. "Why Redis Labs made a huge mistake when it changed its open source licensing strategy". TechRepublic. Retrieved 2018-08-24. 
  34. ^ Shoolman, Yiftach (5 July 2016). "Why Redis Labs' Modules are AGPL". Redis Labs. Retrieved 2018-08-24. 
  35. ^ Claburn, Thomas. "Redis has a license to kill: Open-source database maker takes some code proprietary". The Register. Retrieved 2018-08-24. 
Further reading

External links[edit]