Easy Implementation of redis master-slave configuration, chain, a master-slave multi-slave Nima is boring, a windows also to play master-slave, despise !!! Let's not talk about it much. Tom takes the initiative to search for Redis... Haha... The default configuration of the master, from: the original copy of the master 1, change the default port 6379 to 6380 # Acceptconnectionsonthespecif
Easy Implementation of redis master-slave configuration, chain, a master-slave multi-slave Nima is boring, a windows also to play master-slave, despise !!! Let's not talk about it much. Tom takes the initiative to search for Redis... Haha... The default configuration of the master, from: the original copy of the master 1, change the default port 6379 to 6380 # Accept connections on the specif
Easy to implement redis master-slave configuration, chain, one master, multiple slave
How boring Nima is. If I had a windows system, I still went to play master-slave games. despise it !!!
Let's not talk about it much. Tom takes the initiative to search for Redis... Haha...
The default configuration of the master,
SLAVE: original copy of the master
1. Change the default port 6379 to 6380.
# Accept connections on the specified port, default is 6379
Port 6380
2, # slaveof
Slaveof localhost 6379
The above is not enough. Please try it in Linux.
The first step is to configure three instances, slave1 and slave2, which are both original and intact copies of the master.
The configuration is master: port 6379.
Slave1
Port 6380
Slaveof localhost 6379
Slave2
Port 6381
Slaveof localhost 6380
The relationships are as follows: master <---- slave1 <---- slave2 (now it is chained)
Finally, let's take a look at the synchronization. The first is the master: set master slave. We found that the other two slaves can get the master.
However, when slave1 executes set slave master, get slave on the master returns-1 while slave2 returns master
But I can't hide a master, multiple slaves.
The master node is two slave nodes: slave1 slave2