Posted by: phillipnb | September 1, 2013

A look at Redis (Remote Dictionary Server)

Before we talk about Redis, we need to talk about NoSQL. The traditional database that we use, say RDBMs, prefers more structured, predictable data for storage. In case of NoSQL database, it can handle unstructured, unpredictable data and information. Hence NoSQL is not a relational database or atleast it does not show the characteristics of a traditional relational database. People say that NoSQL is not a relational database because it is not built on tables, rows, columns and does not use SQL to manipulate the stored data. NoSQL also does not provide full ACID (Atomicity, Consistency, Isolation, Durability) guarantees that we see in a relational database. Though NoSQL has so many drawbacks that we mentioned above it still has a distributed and fault tolerant architecture. The NoSQL type of database architecture supports key-value stores, document stores, BigTable and graph databases. The product that we are going to analyse in this blog today is called Redis, a NoSQL database based on key-value store.

Redis is a short form for Remote Dictionary Server. It is an open source key value store. People usually say that Redis is like memcache, an in-memory but persistent on disk database. Some people also say that Redis is memcache with rich data structure. It is called in-memory because all data lives in memory. The data is stored using key and its value, where keys can be made to expire. Another advantage of Redis is that it is very fast and also light weight. Some other benefits that we hear about Redis are:

  • Redis is simple and fast
  • Redis does not use threading, it is just one process
  • It has asynchronous non-blocking persistance
  • Implements persistence using snapshot or append only files
  • Redis uses key and value store where a value can be a string, set, list, sorted set and a hash. Hence Redis can also be called a data structure server because of this powerful data types
  • It has a queryable keyspace
  • Redis supports integer counters
  • Redis works like a journal
  • In Redis, Keys can be made to expire
  • Redis has the ability to easily backup
  • Redis is a cache, store and messaging server

One should not opt for Redis if the data cannot fit into the available memory. Redis is not for storing big amount of data. Also, Redis is not a data store that will scale easily and it will not act as a adhoc query tool. In spite of these negative defects, we should go for Redis if we:

  • Want to select and delete (expire) items in our cache
  • Want persistence for objects that rarely change
  • Want flexibility and feature rich product

To know more about Redis, take a look at the articles and blogs about Redis on the web. Here are a selected few writeups:

Anyway, I cannot recommend Redis as I have not fully experienced the power of Redis. But from the little that I know about Redis, I can boldly say that it is extremely good if your situation demands querying a key-value pair.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: