Redis

This article is about Redis software. For Redis people, see Romani people.
Redis
Developer(s) Salvatore Sanfilippo aka antirez[1][2]
Initial release April 10, 2009 (2009-04-10)
Stable release 3.2.0 / May 6, 2016 (2016-05-06)
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 a data structure server. It is open-source, networked, in-memory, and stores keys with optional durability. The development of Redis has been sponsored by Redis Labs since June 2015.[3] Before that, it was sponsored by Pivotal Software[4] and by VMware.[5][6] According to the monthly ranking by DB-Engines.com, Redis is the most popular key-value database.[7] Redis has also been ranked the #1 NoSQL (and #4 database) in User Satisfaction and Market Presence based on user reviews,[8] the most popular NoSQL database in containers,[9] and the #1 NoSQL among Top 50 Developer Tools & Services.[10] The name Redis means REmote DIctionary Server.[11]

Supported languages

Many languages have Redis bindings, including:[12] 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,[13] Racket, Ruby, Rust, Scala, Smalltalk and Tcl.

Data types

Redis maps keys to types of values. A key 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[14] in which some of the dataset is stored on disk, but this feature is deprecated. Persistence is now reached 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 syncs data to the disk 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.[15]

Performance

When the durability of data is not needed, the in-memory nature of Redis allows it to perform extremely well compared to database systems that write every change to disk before considering a transaction committed.[11] There is no notable speed difference between write and read operations. Redis operates as a single process and is single-threaded. Therefore, a single Redis instance cannot utilize parallel execution of tasks e.g. stored procedures (Lua scripts).

Clustering

The Redis project has a cluster specification,[16] but the cluster feature is currently in Beta stage.[17] According to a news post by Redis creator Sanfilippo, the first production version of Redis cluster (planned for beta release at end of 2013),[18] will support automatic partitioning of the key space and hot resharding, but will support only single key operations.[19] In the future Redis Cluster is planned to support up to 1000 nodes, fault tolerance with heartbeat and failure detection, incremental versioning ("epochs") to prevent conflicts, slave election and promotion to master, and publish/subscribe between all cluster nodes.[16][17][20]

See also

References

Notes

External links

This article is issued from Wikipedia - version of the Friday, May 06, 2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.