# Zen Discovery settings in EC2 and escaping from Java API

**URL:** <https://discuss.elastic.co/t/zen-discovery-settings-in-ec2-and-escaping-from-java-api/9090>\
**Category:** Elasticsearch\
**Created:** [September 21, 2012, 8:35am UTC](https://discuss.elastic.co/t/zen-discovery-settings-in-ec2-and-escaping-from-java-api/9090 "2012-09-21T08:35:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jae](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jae/32/791_2.png) [@Jae](https://discuss.elastic.co/u/Jae)\
**Post date:** [September 21, 2012, 8:35am UTC](https://discuss.elastic.co/t/zen-discovery-settings-in-ec2-and-escaping-from-java-api/9090/1 "2012-09-21T08:35:39Z")

</div>

Hi

Before asking my questions, I want to describe my situation.

I deployed elasticsearch in the production today but within 3 hours, I had  
to turn off all the clients because elasticsearch cluster got crashed.

Now, I am using elasticsearch for realtime log analysis. It should handle  
multi billion rows in a day and I deployed elasitcsearch to more than 30  
instances in EC2.  
I changed several settings including number of shards and replication but  
most settings were default.

First, its performance was really good but when the clients started to be  
throttling, whole elasticsearch cluster was gone to unhealthy. I checked  
the log and there were lots of fault detection but every instance was alive.

So my plan is to change the zen discovery setting as the following:

transport.tcp.connect\_timeout: 10s  
discovery.zen.minimum\_master\_nodes: 5  
discovery.zen.ping.timeout: 60s  
discovery.zen.fd.ping\_interval: 60s  
discovery.zen.fd.ping\_timeout: 60s  
discovery.zen.ping.multicast.enabled: false

My second question is, when I restart servers, do I have to restart the  
client too? Even though I restarted servers, the clients couldn't get  
connected. If I want the clients totally independent from servers, I have  
to use REST API, what's the best way to generate JSON string request? Is  
there any method from Java API to JSON string such as ToXContent interface?

Am I on the right track?

Thank you  
Best, Jae

--

---

<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, 3:12am UTC](https://discuss.elastic.co/t/zen-discovery-settings-in-ec2-and-escaping-from-java-api/9090/2 "2017-07-06T03:12:04Z")

</div>

Closed on July 6, 2017, 3:12am UTC


