Is there way to add node to a Redis Cluster without manual intervention if the cluster enabled redis instance is started?

31 views
Skip to first unread message

Akshay Salunke

unread,
Aug 7, 2017, 5:55:14 AM8/7/17
to Redis DB

Problem Description :

Suppose we have Redis Cluster with 3 master 3 slaves. Each redis instance is running on some different Node.(VM)
I do failover for one of these Nodes. So the Redis instance running on this Node fails. But at the same time one more Redis Instance is started on different Node(VM) with different Redis Node Id.
To add new instance this to cluster I have to use ruby script and execute the command. 
This is feasible if we have small size Redis Cluster but if the Cluster is huge. How can this be handled?


Please suggest a way if any to handle this situation. 
Thanks in Advance.!!!!

andyh

unread,
Aug 7, 2017, 9:33:31 AM8/7/17
to redi...@googlegroups.com
Hi

It's much easier than you think. If you look at the redis-trib.rb source code, despite of some convenience utilities it provides, the core is `meet` command. ref: https://redis.io/commands/cluster-meet.

If you want the new node to be a slave of a master, you can then use `cluster replicate` command: https://redis.io/commands/cluster-replicate

Andy

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+unsubscribe@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.



--
andyh
Andy Huang (Huangkejun)

Akshay Salunke

unread,
Aug 8, 2017, 2:24:12 AM8/8/17
to Redis DB
Thanks for the quick response Andy.
But here we need manual intervention to add new node to cluster i.e. we need to manually execute this command. I am trying to find a way where this doesn't require any manual intervention.


On Monday, August 7, 2017 at 7:03:31 PM UTC+5:30, iandyh wrote:
Hi

It's much easier than you think. If you look at the redis-trib.rb source code, despite of some convenience utilities it provides, the core is `meet` command. ref: https://redis.io/commands/cluster-meet.

If you want the new node to be a slave of a master, you can then use `cluster replicate` command: https://redis.io/commands/cluster-replicate

Andy
On Mon, Aug 7, 2017 at 6:42 PM, Akshay Salunke <akki...@gmail.com> wrote:

Problem Description :

Suppose we have Redis Cluster with 3 master 3 slaves. Each redis instance is running on some different Node.(VM)
I do failover for one of these Nodes. So the Redis instance running on this Node fails. But at the same time one more Redis Instance is started on different Node(VM) with different Redis Node Id.
To add new instance this to cluster I have to use ruby script and execute the command. 
This is feasible if we have small size Redis Cluster but if the Cluster is huge. How can this be handled?


Please suggest a way if any to handle this situation. 
Thanks in Advance.!!!!

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.

To post to this group, send email to redi...@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages