# Elasticsearch HA and geocluster

**URL:** <https://discuss.elastic.co/t/elasticsearch-ha-and-geocluster/174148>\
**Category:** Elasticsearch\
**Created:** [March 27, 2019, 2:39pm UTC](https://discuss.elastic.co/t/elasticsearch-ha-and-geocluster/174148 "2019-03-27T14:39:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rohlik](https://avatars.discourse-cdn.com/v4/letter/r/aeb1de/32.png) [@Rohlik](https://discuss.elastic.co/u/Rohlik)\
**Post date:** [March 27, 2019, 2:39pm UTC](https://discuss.elastic.co/t/elasticsearch-ha-and-geocluster/174148/1 "2019-03-27T14:39:06Z")

</div>

Hello,  
how setup HA Elasticsearch cluster in geocluster environment? We have 2 datacenter location and for each of datacenter we have 1 hardware virtualization server.

I know that best setup is use odd number of Elasticsearch nodes, so should we use two ES nodes for DC 1 a one for DC 2 or is there some better approach?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 27, 2019, 4:52pm UTC](https://discuss.elastic.co/t/elasticsearch-ha-and-geocluster/174148/2 "2019-03-27T16:52:49Z")

</div>

We don't really support having cluster split across different regions.

The best thing to do is to have 2 different clusters, one in each node.  
I'd recommend in each region at least 2 data nodes + one master only node.

To synchronize data between zones, you can:

- Send your data in both clusters
- Send your data to a message queue system like Kafka and use a Logstash instance in each zone to read the queue and index documents locally
- Use the Cross Cluster Replication feature (available with a platinum license or a trial). See [https://www.elastic.co/subscriptions](https://www.elastic.co/subscriptions)

---

<div class="post-metadata">

**Author:** ![Rohlik](https://avatars.discourse-cdn.com/v4/letter/r/aeb1de/32.png) [@Rohlik](https://discuss.elastic.co/u/Rohlik)\
**Post date:** [April 8, 2019, 11:53am UTC](https://discuss.elastic.co/t/elasticsearch-ha-and-geocluster/174148/3 "2019-04-08T11:53:45Z")

</div>

Thank you @dadoonet for your tips.  
I'm a little bit suprised that Elastic does not have support out-of-the-box. Is it on roadmap?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 8, 2019, 12:11pm UTC](https://discuss.elastic.co/t/elasticsearch-ha-and-geocluster/174148/4 "2019-04-08T12:11:21Z")

</div>

> [@Rohlik](#):
>
> I'm a little bit suprised that Elastic does not have support out-of-the-box. Is it on roadmap?

Not really, at least not within a single cluster. Each cluster relies on the node-to-node network connections being (a) reliable, (b) low-latency and (c) high-bandwidth, and none of these are really true of connections between different regions. Multi-region deployments are supported out-of-the-box using federation: [cross-cluster search](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-cross-cluster-search.html) and/or [cross-cluster replication](https://www.elastic.co/guide/en/elastic-stack-overview/current/xpack-ccr.html).

I mean technically you _can_ split a cluster across geographically separated regions, and it'll do the right thing even if the connection is unreliable and/or slow, but it won't necessarily perform very well.

If you only have two failure domains (e.g. regions) then it is not possible to achieve high availability. At least, you cannot build a system that can tolerate the loss of either domain. This isn't a limitation of Elasticsearch, it's a fundamental property of distributed systems: with two domains one or other of them will always be critical to the health of your cluster. The recommended approach is to have at least three failure domains. Fortunately with Elasticsearch you only need a single, small, dedicated master node in the third domain and you can leave all the heavy machinery in the other two.

---

<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:** [May 6, 2019, 12:11pm UTC](https://discuss.elastic.co/t/elasticsearch-ha-and-geocluster/174148/5 "2019-05-06T12:11:22Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
