Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.
David TOUREL edited this page Jan 30, 2018 · 2 revisions

Welcome to redis-trib.php

Some examples

Remove an active master node from a cluster

Says we want to remove the node 6ed27fb48f82a02da25f6ebc6bc2c340184ef3e3 from the cluster 127.0.0.1:6381

First we need to rebalance the cluster in order to dispatch the slots allocated to 6ed27fb48f82a02da25f6ebc6bc2c340184ef3e3 , because a node containing data can't be removed from a cluster

Rebalance the cluster, forcing the weight of node 6ed27fb48f82a02da25f6ebc6bc2c340184ef3e3 to 0

~# ./redis-trib.php rebalance --weight 6ed27fb48f82a02da25f=0 127.0.0.1:6381

Remove the node form the cluster

~# ./redis-trib.php del-node 127.0.0.1:6381 6ed27fb48f82a02da25f6ebc6bc2c340184ef3e3

Clone this wiki locally