2

I am trying to understand how one can perform mass insertion in Redis instances operating in the cluster mode. I came across this link:

https://redis.io/topics/mass-insert

It has a sample code one could use to generate data and populate Redis using the below command:

ruby proto.rb | redis-cli --pipe

While it works perfectly for one instance, how it can be modified to be used in cluster mode with multiple Redis instances?

I also tried setting up the cluster and use the below command to insert the data:

ruby proto.rb | redis-cli -c --pipe

I was hoping that it would insert data by following the redirection but it didn't work.

pree
  • 2,297
  • 6
  • 37
  • 55
  • Don't know and don't have a cluster here so just an idea... could it probably work if you just pipe that into every master node each and ignore the moved errors? – sui Jan 13 '19 at 22:32
  • @sui that's exactly what I ended up doing! :) Can you post your idea as an answer and I will accept it given there is no other way at this point. – pree Jan 14 '19 at 01:58

0 Answers0