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

Cluster pattern – master-master


This pattern of cluster is created for applications where read and writes are very frequent and the state across the nodes needs to be the same at any given point in time.

From a nonfunctional requirement perspective, following behaviors can be seen in a master-master setup:

Getters and setters in master–master cluster pattern

Performance

The performance for reads and writes are very high in this kind of setup. Since the requests are load balanced across the master nodes, the individual load on a master reduces, thus resulting in better performance. As Redis inherently does not have this capability, this has to be provided outside the box. A write replicator and read load balancer kept in front of the master-master cluster will do the trick. What we are doing here is that, if there is a write request, the data will be written to all the masters, and all the read requests can be split among any of the master nodes, since the data in all the master nodes is in a...