redis Getting started with redis Overview


Redis is an in-memory remote database that offers high performance, replication, and a unique data model to produce a platform for solving problems. Redis is an open source (BSD licensed), in-memory data structure , used as database, cache and message broker. It is categorized as a NoSQL key-value store. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs and geospatial indexes with radius queries. Supporting five different types of data structures,

  1. STRING (Operate on the whole string, parts, integers and floats)
  2. LIST (Push or pop items from both ends)
  3. SET (Add, fetch, remove, check, intersect, union, difference etc)
  4. HASH (store, fatch, remove in hash)
  5. ZSET (same as set but in ordered way)
  6. GEO (Add, update, delete latitude and longitude, get within given redius)

Redis has built-in replication, Lua scripting, LRU eviction, transactions and different levels of on-disk persistence(sync/async).

Prior to version 3, Redis works in master-slave mode and required Redis-Sentinel to provide high-availability.Only master accepts writes and syncs data to its slaves by forking.

From version 3, Redis works & recommends multi-master mode where failover, sharding/paritioning, resharding features are in-built. Redis-Sentinel is not required from version-3. In order for the redis cluster to operate a minimum of 3 master nodes/processes are required.

Additional features are replication, persistence, and client-side sharding. Redis accommodates a wide variety of problems that can be naturally mapped into what Redis offers, allowing you to solve your problems without having to perform the conceptual work required by other databases.