Redis also supports master-slave backup to avoid spof. In my personal experiments on Master backup, due to the limited number of machines, there are usually few machines to support. This article describes how to implement redis master-slave backup on a computer.
Multiple redis instances are deployed on the same machine. To avoid conflicts, each instance must use a different port number. It is easy to specify a different port number when starting redis, or specify a port number in the configuration file. My experiment is the port number specified in the configuration file:
Then, specify the configuration file to start at startup:
./Redis-server./redis. conf
You can also start it in other ways. For details, see the help of redis-Server:
./Redis-server-H
To implement master-slave backup, configure in the configuration file:
After the master and slave redis instances are started separately, redis will automatically synchronize.
Reference: 1, redis Official Website: http://redis.io/topics/replication
Zookeeper
Standalone deployment of redis master-slave backup