elastic / elasticsearch-php

Official PHP client for Elasticsearch.
https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/index.html
MIT License
35 stars 970 forks source link

store data on multiple clusters #1197

Closed mardif closed 2 years ago

mardif commented 2 years ago

Summary of problem or feature request

Hi all, we have a ElasticSearch ( v. 7.14 ) cluster with 3 nodes, and all works fine! Great!

Now we have to replicate the cluster to an additional cluster (with 3 nodes also) located in another farm, and of course, when our application store the data in a cluster, we need to synch it to other cluster.

I see there is a crosscluster replication on 8.x and > 7.7.x, but we need to store data in 2 different clusters from the es-php client at the same time.... do you think is it possible?

Thanks in advance

Code snippet of problem

No code to provide

System details

ezimuel commented 2 years ago

@mardif sorry for the late reply. Yes, you can write in different cluster using multiple elasticsearch-php client instances but I do not recommend this approach since Elasticsearch is able to provide this feature using the cross-cluster replication mechanism. You can read the documentation for more information, as you can see there are many different use cases covered,

mardif commented 2 years ago

Thank you @ezimuel for your reply. I thought it was not possible, I just wanted to have a confirmation