# Cluster-to-Cluster replication using polling

**URL:** <https://discuss.elastic.co/t/cluster-to-cluster-replication-using-polling/28168>\
**Category:** Elasticsearch\
**Created:** [August 27, 2015, 10:43am UTC](https://discuss.elastic.co/t/cluster-to-cluster-replication-using-polling/28168 "2015-08-27T10:43:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dux2](https://avatars.discourse-cdn.com/v4/letter/d/2acd7d/32.png) [@dux2](https://discuss.elastic.co/u/dux2)\
**Post date:** [August 27, 2015, 10:43am UTC](https://discuss.elastic.co/t/cluster-to-cluster-replication-using-polling/28168/1 "2015-08-27T10:43:26Z")

</div>

Hi

I have two DCs (A and P), each of them runs its own ES cluster in Active/Passive deployment,  
I would like to mirror all data from A to P continuously with latency as low as possible (up to 60 sec).  
I try to avoid using another DB (such as CouchBase) as a primary DB due to the additional computing resources and complexity involved.

I can go ahead using the snapshot and restore mechanism, but I fear that P will not get updated soon enough.  
I thought of writing a custom poller for changes that polls A for changes (for example, based on last poll time-stamp) and apply them to P (as suggested by Shay, see reference below).

Is that a viable option? Any drawbacks? Can you suggest another strategy?

References:

> [@Continuous async replication](https://discuss.elastic.co/t/continuous-async-replication/17088/10):
>
> Correct, this would create new indices. On Apr 21, 2014, at 2:50 PM, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com) wrote: If I understand this correct with this pattern evey restore is a new index? curl -XPOST "localhost:9200/snapshot/my\_backup/snapshot\_1/restore" -d '{ "indices": "index\_1,index\_2", "ignore\_unavailable": "true", "include\_global\_state": false, "rename\_pattern": "index(.+)", "rename\_replacement": "restored\_index$1" }' On Mon, Apr 21, 2014 at 2:32 PM, Andrew Selden [andrew.selden@…](mailto:andrew.selden@elasticsearch.com)

> [@Replication Strategies](https://discuss.elastic.co/t/replication-strategies/3081):
>
> Curious, if you guys are using ElasticSearch for replication, how do you replicate your data? I'm assuming your main data source is slow, so I was wondering how you go around it to have a faster replication. Do you do your huge/slow query on your main data store and store that in ElasticSearch, or do you guys query expensive tables and store those in ElasticSearch, and then later recombine them? ...or? slight_smile Do you guys do lazy replication wherein the first time a query is made, …

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:53pm UTC](https://discuss.elastic.co/t/cluster-to-cluster-replication-using-polling/28168/2 "2017-07-05T23:53:30Z")

</div>


