Skip to content

Cluster Replication and Failover in Garnet - Single Master Node Issue #1030

Answered by shanipribadi
wessisaac asked this question in Q&A
Discussion options

You must be logged in to vote

it is possible,

the doc in https://microsoft.github.io/garnet/docs/cluster/overview only gives instruction of using redis-cli --cluster command, which does not work with only a single node (the cli has a validation for minimum 3 master nodes).

but you can achieve it by using the CLUSTER RESP commands manually.

start garnet using the --cluster flag (if both primary and replica is on single machine, then make sure to use different data dir, and either different --bind address (e.g. 127.0.0.2 and 127.0.0.3) or --port number for the two.

  1. redis-cli -h [primary-ip] CLUSTER ADDSLOTSRANGE 0 16383
  2. redis-cli -h [primary-ip] CLUSTER MYID # take note of the node-id
  3. redis-cli -h [primary-ip] CLUSTER …

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@vazois
Comment options

Answer selected by vazois
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants