Write to two ElasticSearch clusters concurrently but read from only one with Searhckick and Rails

Viewed 52

I have a Rails app that writes to an ElasticSearch cluster using the SearchKick gem. I want to upgrade my ElasticSearch cluster version in staging and production. I've created my second cluster and have the URL. I'm trying to find a way that I can write to both clusters using Searchkick but read from the original cluster only.

Once the new cluster has all my data indexed, I'd like to switch to continue to writing to both but reading from the new cluster for a while. I'd do this to ensure I can rollback to the old cluster if anything breaks. Then finally, once I've assured everything is working correctly, I can decommission the old cluster and go back to writing to one cluster.

My question: how can I write to two clusters using Searchkick but read from only 1 cluster? I can't seem to find this in the documentation anywhere.

0 Answers
Related