Book Image

Learning Redis

By : Vinoo Das
Book Image

Learning Redis

By: Vinoo Das

Overview of this book

Table of Contents (16 chapters)
Learning Redis
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Configuring Redis Sentinel


Datastores provide capability in handling faulty scenarios. These capabilities are in-built and do not expose themselves in the manner in which they handle fault tolerance. Redis, which started with simple key value datastore, has evolved into a system which provides an independent node to take care of the fault management. This system is called Sentinel.

The idea behind Sentinel is that it's an independent node which keeps a track on the master node and the other slave nodes. When a master node goes down, it promotes the slave node to become the master. As discussed, in a master-slave scenario, master is meant to write and slaves are meant to read, so when a slave is promoted to master, it has the capability to read and write. All the other slaves will become slave to this new slave turned master. The following figure shows how Sentinel works:

The working of Sentinel

Let's have an example now to demonstrate how Sentinel works as of Redis 2.6 Version. Sentinel has...