Home > other >  Redis cluster creation
Redis cluster creation

Time:09-25

Three sets of redis, each 2 nodes, what is the way which can be specified when creating the cluster node is the master node, which a few is it from the node,

CodePudding user response:

1, creates only contains the main node cluster
Redis - cli - cluster create 172.16.71.183:7001 172.16.71.183:7002 172.16.71.183:7003 - cluster - replicas 0

2, to the master node from the specified node
Redis - cli - cluster add -node 172.16.71.183:7004 172.16.71.183:7001 - cluster - slave - cluster - master - id ba8415845612eceeb50f89eaa44485a393b58d1a

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Specify the master node meaning in where? The relationship between the master-slave node may be turning from time to time,

CodePudding user response:

Don't know the master node may be two main nodes are on the same host, if there are only 3 main from 3, in the two main nodes are on the same host, not a cluster or hang up, if every one are a primary node, is not,
  • Related