# Elasticsearch on double servers

**URL:** https://discuss.elastic.co/t/elasticsearch-on-double-servers/165557
**Category:** Elasticsearch
**Created:** [January 24, 2019, 8:48am UTC](https://discuss.elastic.co/t/elasticsearch-on-double-servers/165557 "2019-01-24T08:48:01Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Sylvain\_Attoumani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylvain_attoumani/32/45401_2.png) [@Sylvain\_Attoumani](https://discuss.elastic.co/u/Sylvain_Attoumani)
#### Post date: [January 24, 2019, 8:48am UTC](https://discuss.elastic.co/t/elasticsearch-on-double-servers/165557/1 "2019-01-24T08:48:01Z")

</div>

Hi ! I'm a web developer and working with symfony. I have a problem and can't figure out how to solve it.  
So I have a database of product. You can search them using ES. Everytime I change something on a product I have a listener that changes the ES index.

We have two servers (In case something wrong happen) and the user is randomly directed to one server or the other one. ES is running on both server.

The problem is when one of the products is changed, the listener only changes the product on one of the two servers. Leaving the other one with error.

I tried to find a solution. Maybe using a shared folder with the data for both of the elasticsearch ?  
Maybe putting a listener on both ES and if one is changed, the other one too?

Anyway, I'm not looking for a definitive solution but if someone can give me a hint! Thank you!

---

<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: [January 24, 2019, 9:07am UTC](https://discuss.elastic.co/t/elasticsearch-on-double-servers/165557/2 "2019-01-24T09:07:47Z")

</div>

Are both elasticsearch nodes within the same cluster?  
What is the output of

```
GET /_cat/nodes?v
```

---

<div class="post-metadata">

### Author: ![Sylvain\_Attoumani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylvain_attoumani/32/45401_2.png) [@Sylvain\_Attoumani](https://discuss.elastic.co/u/Sylvain_Attoumani)
#### Post date: [January 24, 2019, 9:23am UTC](https://discuss.elastic.co/t/elasticsearch-on-double-servers/165557/3 "2019-01-24T09:23:04Z")

</div>

I have two independant server so two different cluster. For the first one I have :

```
ip heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name
127.0.0.1 33 91 6 1.98 2.34 2.02 mdi * wqkQSDF

```

And :

```
ip heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name
127.0.0.1 43 63 20 1.41 1.80 1.70 mdi * DxHDBN4

```

I can share folder beetween the two folder so I thought I could changes the `path.data :/var/lib/elasticsearch` to `path.data:/shared-folder` what do you think of that ?

---

<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: [January 24, 2019, 9:46am UTC](https://discuss.elastic.co/t/elasticsearch-on-double-servers/165557/4 "2019-01-24T09:46:39Z")

</div>

Definitely a bad design.  
Just make your 2 nodes part of the same cluster and you're done.  
Well you will need a 3rd master only small node to act as a tie breaker.

---

<div class="post-metadata">

### Author: ![Sylvain\_Attoumani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylvain_attoumani/32/45401_2.png) [@Sylvain\_Attoumani](https://discuss.elastic.co/u/Sylvain_Attoumani)
#### Post date: [January 24, 2019, 9:48am UTC](https://discuss.elastic.co/t/elasticsearch-on-double-servers/165557/5 "2019-01-24T09:48:03Z")

</div>

So it's better to create only one cluster instead of two and shared a folder ? Why that ?

---

<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: [January 24, 2019, 10:03am UTC](https://discuss.elastic.co/t/elasticsearch-on-double-servers/165557/6 "2019-01-24T10:03:37Z")

</div>

Read [https://www.elastic.co/guide/en/elasticsearch/reference/current/tune-for-indexing-speed.html#\_use\_faster\_hardware](https://www.elastic.co/guide/en/elasticsearch/reference/current/tune-for-indexing-speed.html#_use_faster_hardware)

---

<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: [February 21, 2019, 10:03am UTC](https://discuss.elastic.co/t/elasticsearch-on-double-servers/165557/7 "2019-02-21T10:03:39Z")

</div>

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