# Can I use ElasticSearch to avoid Single Point of Failure?

**URL:** <https://discuss.elastic.co/t/can-i-use-elasticsearch-to-avoid-single-point-of-failure/9610>\
**Category:** Elasticsearch\
**Created:** [November 7, 2012, 10:01pm UTC](https://discuss.elastic.co/t/can-i-use-elasticsearch-to-avoid-single-point-of-failure/9610 "2012-11-07T22:01:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mxims\_2](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@Mxims\_2](https://discuss.elastic.co/u/Mxims_2)\
**Post date:** [November 7, 2012, 10:01pm UTC](https://discuss.elastic.co/t/can-i-use-elasticsearch-to-avoid-single-point-of-failure/9610/1 "2012-11-07T22:01:57Z")

</div>

My goal is to have a search engine service which is reliable and highly  
available. If one of the server goes down, users should still be able to  
search, new documents should still be indexed, if there is an update to a  
document, update should be indexed, deletion of document should be updated  
in the index, etc. I want to avoid single point of failure.

I would like to know whether my goal above is achievable using  
ElasticSearch.

Currently I have configured two instances of the ElasticSearch service  
running on two different machine with the below configuration changes from  
the default elasticsearch.yml file.

elasticsearch.yml on "_server1_" server.

node.name: "server1"  
discovery.zen.ping.multicast.enabled: false  
discovery.zen.ping.unicast.hosts: ["149.59.34.195:9300",  
"149.59.96.99:9300"]

elasticsearch.yml on "_server2_" server.

node.name: "server2"  
discovery.zen.ping.multicast.enabled: false  
discovery.zen.ping.unicast.hosts: ["149.59.34.195:9300",  
"149.59.96.99:9300"]

- Is the above configuration sufficient to achieve my above goal?
- Would the index files gets auto synced between the two machines?
- If one of the server/service, say server2 goes down, would the search  
engine still function using server1?
  - What happens when the server2 gets back online? Would the index  
file from server1 gets synced to server2?

- Let's say server1 is up, sever2 is down for about 30 minutes. During  
this time some index files were modified on server1. What happens if the  
server1 was shut down while server2 was down, and if we bring back server2  
at first and server1 later? Would the updated index from server1 will get  
pushed to server2?

I hope my questions above made sense to you. I am kind of bit confused with  
the terms node, cluster and gateway. My guess is that the above two  
services running on server1 and serve2 are two different nodes.

I am planning to connect to these services using the Java code below.

```
    Client client = new TransportClient()
    .addTransportAddress(new 

```

InetSocketTransportAddress("149.59.34.195", 9300))  
.addTransportAddress(new InetSocketTransportAddress("149.59.96.99",  
9300));

Thanks  
Renjith

--

---

<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:** [November 8, 2012, 2:29am UTC](https://discuss.elastic.co/t/can-i-use-elasticsearch-to-avoid-single-point-of-failure/9610/2 "2012-11-08T02:29:38Z")

</div>

Hi,

In short: YES !

ES is designed for all your concerns.

I suggest that you look at some videos on ES site or at my slides on slideshare: [Elasticsearch - Devoxx France 2012 - English version | PPT](http://www.slideshare.net/mobile/dadoonet/elasticsearch-devoxx-france-2012-english-version)  
The last slides explains how docs are indexed, how searches works and failover feature...

HTH

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 7 nov. 2012 à 23:01, Mxims [renjith.ck@gmail.com](mailto:renjith.ck@gmail.com) a écrit :

> My goal is to have a search engine service which is reliable and highly available. If one of the server goes down, users should still be able to search, new documents should still be indexed, if there is an update to a document, update should be indexed, deletion of document should be updated in the index, etc. I want to avoid single point of failure.
> 
> I would like to know whether my goal above is achievable using Elasticsearch.
> 
> Currently I have configured two instances of the Elasticsearch service running on two different machine with the below configuration changes from the default elasticsearch.yml file.
> 
> elasticsearch.yml on "server1" server.
> 
> node.name: "server1"  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping.unicast.hosts: ["149.59.34.195:9300", "149.59.96.99:9300"]
> 
> elasticsearch.yml on "server2" server.
> 
> node.name: "server2"  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping.unicast.hosts: ["149.59.34.195:9300", "149.59.96.99:9300"]  
> Is the above configuration sufficient to achieve my above goal?  
> Would the index files gets auto synced between the two machines?  
> If one of the server/service, say server2 goes down, would the search engine still function using server1?  
> What happens when the server2 gets back online? Would the index file from server1 gets synced to server2?  
> Let's say server1 is up, sever2 is down for about 30 minutes. During this time some index files were modified on server1. What happens if the server1 was shut down while server2 was down, and if we bring back server2 at first and server1 later? Would the updated index from server1 will get pushed to server2?  
> I hope my questions above made sense to you. I am kind of bit confused with the terms node, cluster and gateway. My guess is that the above two services running on server1 and serve2 are two different nodes.
> 
> I am planning to connect to these services using the Java code below.
> 
> ```
> Client client = new TransportClient()
> .addTransportAddress(new InetSocketTransportAddress("149.59.34.195", 9300))
> .addTransportAddress(new InetSocketTransportAddress("149.59.96.99", 9300));
> 
> ```
> 
> ## Thanks Renjith

--

---

<div class="post-metadata">

**Author:** ![Mxims\_2](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@Mxims\_2](https://discuss.elastic.co/u/Mxims_2)\
**Post date:** [November 8, 2012, 6:49pm UTC](https://discuss.elastic.co/t/can-i-use-elasticsearch-to-avoid-single-point-of-failure/9610/3 "2012-11-08T18:49:24Z")

</div>

David, Thank you so much for the pointer. The slides answered most of my  
questions..

Would you please take a look at the configuration file I am using currently  
to make sure that I am going the right direction.

Thanks you

On Wednesday, November 7, 2012 6:29:54 PM UTC-8, David Pilato wrote:

> Hi,
> 
> In short: YES !
> 
> ES is designed for all your concerns.
> 
> I suggest that you look at some videos on ES site or at my slides on  
> slideshare:  
> [Elasticsearch - Devoxx France 2012 - English version | PPT](http://www.slideshare.net/mobile/dadoonet/elasticsearch-devoxx-france-2012-english-version)  
> The last slides explains how docs are indexed, how searches works and  
> failover feature...
> 
> HTH
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 7 nov. 2012 à 23:01, Mxims \<[renji...@gmail.com](mailto:renji...@gmail.com) \<javascript:\>\> a écrit :
> 
> My goal is to have a search engine service which is reliable and highly  
> available. If one of the server goes down, users should still be able to  
> search, new documents should still be indexed, if there is an update to a  
> document, update should be indexed, deletion of document should be updated  
> in the index, etc. I want to avoid single point of failure.
> 
> I would like to know whether my goal above is achievable using  
> Elasticsearch.
> 
> Currently I have configured two instances of the Elasticsearch service  
> running on two different machine with the below configuration changes from  
> the default elasticsearch.yml file.
> 
> elasticsearch.yml on "_server1_" server.
> 
> node.name: "server1"  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping.unicast.hosts: ["149.59.34.195:9300", "  
> 149.59.96.99:9300"]
> 
> elasticsearch.yml on "_server2_" server.
> 
> node.name: "server2"  
> discovery.zen.ping.multicast.enabled: false  
> discovery.zen.ping.unicast.hosts: ["149.59.34.195:9300", "  
> 149.59.96.99:9300"]
> 
> - Is the above configuration sufficient to achieve my above goal?
> - Would the index files gets auto synced between the two machines?
> - If one of the server/service, say server2 goes down, would the  
> search engine still function using server1?
> - What happens when the server2 gets back online? Would the index  
> file from server1 gets synced to server2?
> 
> - Let's say server1 is up, sever2 is down for about 30 minutes. During  
> this time some index files were modified on server1. What happens if the  
> server1 was shut down while server2 was down, and if we bring back server2  
> at first and server1 later? Would the updated index from server1 will get  
> pushed to server2?
> 
> I hope my questions above made sense to you. I am kind of bit confused  
> with the terms node, cluster and gateway. My guess is that the above two  
> services running on server1 and serve2 are two different nodes.
> 
> I am planning to connect to these services using the Java code below.
> 
> ```
> Client client = new TransportClient()
> .addTransportAddress(new 
> 
> ```
> 
> InetSocketTransportAddress("149.59.34.195", 9300))  
> .addTransportAddress(new  
> InetSocketTransportAddress("149.59.96.99", 9300));
> 
> Thanks  
> Renjith
> 
> --

--

---

<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:** [November 8, 2012, 7:46pm UTC](https://discuss.elastic.co/t/can-i-use-elasticsearch-to-avoid-single-point-of-failure/9610/4 "2012-11-08T19:46:46Z")

</div>

I think that everything is fine with your settings.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 8 nov. 2012 à 19:49, Mxims [renjith.ck@gmail.com](mailto:renjith.ck@gmail.com) a écrit :

> David, Thank you so much for the pointer. The slides answered most of my questions..
> 
> Would you please take a look at the configuration file I am using currently to make sure that I am going the right direction.
> 
> Thanks you
> 
> On Wednesday, November 7, 2012 6:29:54 PM UTC-8, David Pilato wrote:  
> Hi,
> 
> In short: YES !
> 
> ES is designed for all your concerns.
> 
> I suggest that you look at some videos on ES site or at my slides on slideshare: [Elasticsearch - Devoxx France 2012 - English version | PPT](http://www.slideshare.net/mobile/dadoonet/elasticsearch-devoxx-france-2012-english-version)  
> The last slides explains how docs are indexed, how searches works and failover feature...
> 
> HTH
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 7 nov. 2012 à 23:01, Mxims [renji...@gmail.com](mailto:renji...@gmail.com) a écrit :
> 
> > My goal is to have a search engine service which is reliable and highly available. If one of the server goes down, users should still be able to search, new documents should still be indexed, if there is an update to a document, update should be indexed, deletion of document should be updated in the index, etc. I want to avoid single point of failure.
> > 
> > I would like to know whether my goal above is achievable using Elasticsearch.
> > 
> > Currently I have configured two instances of the Elasticsearch service running on two different machine with the below configuration changes from the default elasticsearch.yml file.
> > 
> > elasticsearch.yml on "server1" server.
> > 
> > node.name: "server1"  
> > discovery.zen.ping.multicast.enabled: false  
> > discovery.zen.ping.unicast.hosts: ["149.59.34.195:9300", "149.59.96.99:9300"]
> > 
> > elasticsearch.yml on "server2" server.
> > 
> > node.name: "server2"  
> > discovery.zen.ping.multicast.enabled: false  
> > discovery.zen.ping.unicast.hosts: ["149.59.34.195:9300", "149.59.96.99:9300"]  
> > Is the above configuration sufficient to achieve my above goal?  
> > Would the index files gets auto synced between the two machines?  
> > If one of the server/service, say server2 goes down, would the search engine still function using server1?  
> > What happens when the server2 gets back online? Would the index file from server1 gets synced to server2?  
> > Let's say server1 is up, sever2 is down for about 30 minutes. During this time some index files were modified on server1. What happens if the server1 was shut down while server2 was down, and if we bring back server2 at first and server1 later? Would the updated index from server1 will get pushed to server2?  
> > I hope my questions above made sense to you. I am kind of bit confused with the terms node, cluster and gateway. My guess is that the above two services running on server1 and serve2 are two different nodes.
> > 
> > I am planning to connect to these services using the Java code below.
> > 
> > ```
> > Client client = new TransportClient()
> > .addTransportAddress(new InetSocketTransportAddress("149.59.34.195", 9300))
> > .addTransportAddress(new InetSocketTransportAddress("149.59.96.99", 9300));
> > 
> > ```
> > 
> > ## Thanks Renjith
> 
> --

--

---

<div class="post-metadata">

**Author:** ![cassianotartari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cassianotartari/32/749_2.png) [@cassianotartari](https://discuss.elastic.co/u/cassianotartari)\
**Post date:** [June 21, 2013, 6:59pm UTC](https://discuss.elastic.co/t/can-i-use-elasticsearch-to-avoid-single-point-of-failure/9610/5 "2013-06-21T18:59:22Z")

</div>

Hi Renjith!

I'm with the same scenario over here with the little difference that I'm setting the network.publish\_host with the machine ip.

But I was making some tests and one of them was to unplug the lan cable from one machine and plug it again to see if the cluster will discovery the nodes again. But it didn't happen, when I do this each one turn into master node and didn't see each other anymore...

Somebody knows what should I set to fix this?

Thanks!

---

<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 6, 2017, 2:29am UTC](https://discuss.elastic.co/t/can-i-use-elasticsearch-to-avoid-single-point-of-failure/9610/6 "2017-07-06T02:29:56Z")

</div>


