Redis : An Introduction

redis

 

                In this article we will talk about Redis (REmote  DIctionary Server). Redis is an open source, in memory, key value store. It also referred as dictionary server as the key values are not only strings, but also hashes, sets, lists and sorted sets.

Redis looks similar to memcached but has differences between them.

            Feature               Redis             Memcached
In memory                  X                       X
Replication                  X
Partitioning                  X
Data Structures                  X
Authentication                  X                       X
Pub/Sub model                  X
Data persistence                  X
Virtual memory                  X

Feature Details:

In Memory: Redis stores the key values in primary memory for quick access of read writes.

Replication: Redis supports for master slave replication. The data access can be done from slave and the writes can be performed from master. The replication provides scalability and availability. As any one of the slave gets failed, the other slave provide data access.

Data Structures: Redis stores not only strings but also lists, sets, hashes and sorted sets.

Virtual memory: Redis uses RAM for in memory storage. But, during the shortage of RAM it uses virtual memory to keep the data.

Pub/Sub modal: Redis creates Publish and Subscribe channels where the Redis clients can subscribe to any channel to consume the data and any subscribed client to a channel can publish the data.

Data Persistence: Redis persist the in memory data to file system on regular intervals. During the failure of Redis node, the data can be restored from Redis Data file.

Redis has rich set of SDK support. You can find the list of client libraries here(http://redis.io/clients).

There are lot of high traffic sites already using Redis.

  • Stackoverflow
  • Criaglist
  • Rackspace
  • Plugin support for Magento
  • Github

The growth the of the Redis over the years is increasing. The stats for Redis and Memcached from DB-Engines is given below. This is how DB-Engines calculate the trend.

Redis Growth

Advertisements

I am Siva Prasad Rao Janapati. Working as a software developer. Has hands on experience on ATG Commerce(DAS/DPS/DCS), Mozu commerce, Broadleaf Commerce, Java, JEE, Spring, Play, JPA, Hibernate, Velocity, JMS, Jboss, Weblogic,Tomcat, Jetty, Apache, Apache Solr, Spring Batch, JQuery, NodeJS, SOAP, REST, MySQL, Oracle, Mongo DB, Memcached, HazelCast, Git, SVN, CVS, Ant, Maven, Gradle, Amazon Web services, Rackspace, Quartz, JMeter, Junit, Open NLP, Facebook Graph,Twitter4J, YouTube Gdata, Bazzarvoice,Yotpo, 4-Tell, Alatest, Shopzilla, Linkshare. I have hands on experience on open sources and commercial technologies.

Tagged with: ,
Posted in Performance, Redis
2 comments on “Redis : An Introduction
  1. Nice comparison with memcache @Siva, even if its quite short actually!

    It will be shared in our next RedisWeekly (http://redisweekly.com/)!

  2. itamarredislabs says:

    More of a comparison to Memcached rather than an intro to Redis, but still very nice. On the same topic: http://www.infoworld.com/article/2825890/application-development/why-redis-beats-memcached-for-caching.html

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

DZone

DZone MVB

Java Code Geeks
Java Code Geeks
%d bloggers like this: