How to do it...

In this section, we will set up a Redis Cluster with three master Redis nodes, each with a single Redis slave-instance node. The topology of this Cluster is shown here:

  1. Each Redis instance has its own configuration file (redis.conf). To enable the Cluster feature, prepare a configuration file for every Redis instance and then change the IP, listening port, and log file path correspondingly (due to space limitations in this book, we only show you the configuration file of one instance on the first host; you can download all the configuration files from the source code provided along with this book):
redis@192.168.1.57:~> cat ...

Get Redis 4.x Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.