Hands-on task
This task is step 12 of the course “Redis in production”
Your own Redis Cluster of three masters
Build a Redis Cluster of three master nodes on this machine:
- Start three
redis-serverinstances on ports7000,7001,7002in the background with cluster mode enabled. Each node has its own working directory/root/cluster/<port>(itsnodes.confand data will live there). - Join them into a cluster of 3 masters with no replicas — all 16384 slots must be assigned.
- Through the cluster, write the key
user:42with the valuealice— it must end up on the node that owns its slot and be readable through any node.
The main Redis on 6379 is not needed for this task.
Reference:redis-cli
What you'll practise:
- redis
- Redis Cluster
- sharding
- hash slots
- redis-cli --cluster
- MOVED