O'Reilly logo

Redis 4.x Cookbook by Zuofei Wang, Pengcheng Huang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How it works...

In the Getting ready section, we updated the configuration file to instruct the slave server to run on port 6380 and use a different working directory to the master server. The new line slave of 127.0.0.1 6379 we added to redis-slave.conf indicates that the server that listens on port 6380 is a slave of 127.0.0.1:6379. In addition, SLAVEOF is a command that can be executed in redis-cli to make the current Redis Server a slave of another instance on-the-fly.

The INFO command prints out the current server's information. In step 4, we used INFO REPLICATION to check whether the replication link is established. Most replication information items are self-explanatory. The master_replid is a random string generated on the master ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required