Redis Cluster: Should I go or should i stay?

First all i just want make clear a respect Redis and Salvatore a lot. This is just my view of the topic, no intention to create any kind of FUD or flame war here, just sharing my toughs and experiences. I use redis in production since 2011, its a great piece of technology. Redis has amazing throughput for single instance solution given the fact redis does not have threads(compared with Memcached). Do i recommend use Redis in production? Yes i do :-)

Redis: The K/V Solution

Whats is Redis? What is good for? Redis is a K/V store and its great for caching. Memcached have few key/set operations in comparison with Redis, there are lots of commands todo very precision operations. Redis cluster was added recently but originally redis was used more like a farm of servers like Memcached case, so replication and other tasks was carry out by the clients apps. Redis has a cluster now. Redis is written in C and has very fast and direct access do data structures like lists, sets and maps. Single instance(Also single thread) redis has support for some small level of transactions so you got atomic and isolated.
Redis Cluster: Enter the Room

Redis clusters uses the master/slave model and does async data replication, any system design like that will have data loss, i was checking last redis presentations and they are being very clear about that witch is nice. Redis has another process called Sentinel but during a network partition is easy to have the split-brain problem.

Operation and Awareness

What about operation: Operation is not mature yet, has some lake of tooling, you need use some bash and ruby scripts bundled with redis to operated, so in other words right now you will need write down your tools to operate redis if you want use its default built in cluster mechanism. They key question is can i afford Data Loss? If you are building a cache yes, even if you are not using as a cache, like some people use redis for different purposes like session store, message queue or even distributed lock it might be okay but given the fact you can lost data it might not be the best tool for the job. 

Installing, Configuring and running the cluster

How to Install Redis 3 Amazon Linux OS / CentOS 

This is the Redis single instance config file, the most important thing is the bind to be able to accept connections from other boxes(in the case you upgrade to use the cluster). You also will need change the default create-cluster script, here is the one i changed a bit.
Redis Create Cluster

As i said before you will need replace the default script with this one. 

Create-Cluster Script

Diego Pacheco

Popular posts from this blog

Podman in Linux

Java Agents

Manage Work not People