Redis

Redis
Developer(s) Salvatore Sanfilippo[1][2]
Initial release May 10, 2009 (2009-05-10)
Stable release
4.0.1 / July 24, 2017 (2017-07-24)[3]
Repository github.com/antirez/redis
Development status Active
Written in ANSI C
Operating system Cross-platform
Available in English
Type Data structure store
License BSD
Website redis.io

Redis is an in-memory database open-source software project implementing a networked, in-memory key-value store 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.[4]

History

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

According to monthly rankings by DB-Engines.com, Redis is often ranked the most popular key-value database.[11] Redis has also been ranked the #4 NoSQL database in user satisfaction and market presence based on user reviews,[12] the most popular NoSQL database in containers,[13] and the #1 NoSQL database among Top 50 Developer Tools & Services.[14]

Supported languages

Many languages have Redis bindings, including:[15] ActionScript, C, C++, C#, Chicken Scheme, Clojure, Common Lisp, D, Dart, Erlang, Go, Haskell, Haxe, Io, Java, JavaScript (Node.js), Julia, Lua, Objective-C, OCaml, Perl, PHP, Pure Data, Python, R[16], Racket, Ruby, Rust, Scala, Smalltalk and Tcl.

Several client software programs exist in these languages[17].

Data types

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:

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.

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[19] 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.

Replication

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.[20]

Performance

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

Clustering

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

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.[26] Large companies such as Twitter are using Redis,[27] and Amazon Web Services is offering Redis in its portfolio.

See also

References

  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. Kepes, Ben (July 15, 2015),"Redis Labs hires the creator of Redis, Salvatore Sanfilippo", Network World, Retrieved August 30, 2015.
  5. 1 2 "FAQ, Redis".
  6. Gwen Shapira (March 17, 2010). "VMware Hires Redis Key Developer – But Why?". Blog. Retrieved September 25, 2016.
  7. Salvatore Sanfilippo (March 15, 2010). "VMware: the new Redis home". Blog. Retrieved September 25, 2016.
  8. 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.
  9. Salvatore Sanfilippo. "Redis Sponsors". Redis Labs. Retrieved September 25, 2016.
  10. Thanks Pivotal, Hello Redis Labs, July 15, 2015, By Salvatore Sanfilippo, Redis Labs
  11. DB-Engines Ranking of Key-value Stores
  12. Best NoSQL Databases: Fall 2015 Report from G2 Crowd
  13. The Current State of Container Usage
  14. Top 50 Developer Tools and Services of 2015
  15. Redis language bindings
  16. CRAN – Package rredis
  17. https://redis.io/clients
  18. Redis 3.2 Release Notes, Retrieved 2017-03-10
  19. Redis documentation "Virtual Memory", redis.io, accessed January 18, 2011.
  20. ReplicationHowto – redis – A persistent key-value database with built-in net interface written in ANSI-C for Posix systems – Google Project Hosting
  21. http://antirez.com/news/111
  22. Redis 3.0 Release Notes, Retrieved 2017-03-10
  23. Cluster Spec, Retrieved 2017-03-10
  24. Cluster Spec, Retrieved 2017-03-10
  25. Cluster Tutorial, Retrieved 2017-03-10
  26. http://objectrocket.com/blog/how-to/top-5-redis-use-cases
  27. http://highscalability.com/blog/2014/9/8/how-twitter-uses-redis-to-scale-105tb-ram-39mm-qps-10000-ins.html
Further reading
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.