Redis is an open-source in-memory database 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] Redis Labs creates and maintains the official Redis Enterprise Pack.

 


1. 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:
•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.[18]

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.

 


2. 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.

 


3. 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.

 


4. Supported languages

Many languages have Redis bindings, including: 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.

 

+ Recent posts