# Best practice of sync index cross multiple data centers

**URL:** <https://discuss.elastic.co/t/best-practice-of-sync-index-cross-multiple-data-centers/64397>\
**Category:** Elasticsearch\
**Created:** [October 31, 2016, 2:15am UTC](https://discuss.elastic.co/t/best-practice-of-sync-index-cross-multiple-data-centers/64397 "2016-10-31T02:15:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Youxu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youxu/32/117375_2.png) [@Youxu](https://discuss.elastic.co/u/Youxu)\
**Post date:** [October 31, 2016, 2:15am UTC](https://discuss.elastic.co/t/best-practice-of-sync-index-cross-multiple-data-centers/64397/1 "2016-10-31T02:15:21Z")

</div>

We have ES 2.x clusters deployed on 4 different data centers on Azure.

To ingest data to all ES clusters on different data center, we firstly push the index data to a centralized data source (either DB or Azure Event Hub) and then we have a microservice built on **each data center** to ingest the data from the data source to ES cluster.

The problem is that, if any one of the data center crash (either microsserice or ES cluster) for some reason, the index might be out of sync between data centers.

Is there any better way to make sure the index be synced cross data centers? Any thoughts could be helpful, not just limited to solution on Azure.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 31, 2016, 9:22am UTC](https://discuss.elastic.co/t/best-practice-of-sync-index-cross-multiple-data-centers/64397/2 "2016-10-31T09:22:32Z")

</div>

Using a message queue to store events and then index these separately into each cluster is currently the recommended best practice, which seems to be what you are doing. I do unfortunately not have any experience with Azure Event Hub, so do not know how to best use it in this kind of setup. [This blog post](https://www.elastic.co/blog/scaling_elasticsearch_across_data_centers_with_kafka) however contains a discussion around using Kafka to achieve this, which may be useful.

---

<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, 10:08pm UTC](https://discuss.elastic.co/t/best-practice-of-sync-index-cross-multiple-data-centers/64397/3 "2017-07-05T22:08:22Z")

</div>


