cluster replicate
CLUSTER
CLUSTER REPLICATE node-id
The command reconfigures a node as a slave of the specified master. If the node receiving the command is an empty master, as a side effect of the command, the node role is changed from master to slave.
Once a node is turned into the slave of another master node, there is no need to inform the other cluster nodes about the change: heartbeat packets exchanged between nodes will propagate the new configuration automatically.
A slave will always accept the command, assuming that:
- The specified node ID exists in its nodes table.
- The specified node ID does not identify the instance we are sending the command to.
- The specified node ID is a master.
If the node receiving the command is not already a slave, but is a master, the comman