# Adding seconde node

**URL:** https://discuss.elastic.co/t/adding-seconde-node/141117
**Category:** Elasticsearch
**Created:** [July 23, 2018, 9:04am UTC](https://discuss.elastic.co/t/adding-seconde-node/141117 "2018-07-23T09:04:55Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![kimfut](https://avatars.discourse-cdn.com/v4/letter/k/b9e5f3/32.png) [@kimfut](https://discuss.elastic.co/u/kimfut)
#### Post date: [July 23, 2018, 9:04am UTC](https://discuss.elastic.co/t/adding-seconde-node/141117/1 "2018-07-23T09:04:55Z")

</div>

hello everyone ,

i would like to know , what are benefits to added a second elasticsearch node (beside that make elasticsearch in green state ), and how to proceed via docker-compose (i installed elk stack via docker) ?

thank you in advance

---

<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: [July 23, 2018, 9:16am UTC](https://discuss.elastic.co/t/adding-seconde-node/141117/2 "2018-07-23T09:16:15Z")

</div>

On the same physical machine? I think it does make a lot of sense to add a new one.

If you just want to have a green cluster with one single node, just change the number of replica shards to 0 in your index settings.

---

<div class="post-metadata">

### Author: ![kimfut](https://avatars.discourse-cdn.com/v4/letter/k/b9e5f3/32.png) [@kimfut](https://discuss.elastic.co/u/kimfut)
#### Post date: [July 23, 2018, 9:23am UTC](https://discuss.elastic.co/t/adding-seconde-node/141117/3 "2018-07-23T09:23:32Z")

</div>

thank you for your response  
yes it's for the same physical machine , i am asking if when we added a second node (by the way each node do an job ,like an multithreading code ) that increase performance .

---

<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: [July 23, 2018, 9:53am UTC](https://discuss.elastic.co/t/adding-seconde-node/141117/4 "2018-07-23T09:53:01Z")

</div>

On the same physical machine? I think it will most likely degrade the performance but you have to test it.

---

<div class="post-metadata">

### Author: ![kimfut](https://avatars.discourse-cdn.com/v4/letter/k/b9e5f3/32.png) [@kimfut](https://discuss.elastic.co/u/kimfut)
#### Post date: [July 23, 2018, 10:25am UTC](https://discuss.elastic.co/t/adding-seconde-node/141117/5 "2018-07-23T10:25:08Z")

</div>

i tried to make number of replica "0" with this command :  
curl -XPUT 'localhost:9200/my\_index/\_settings' -d '{  
"index.number\_of\_replicas" : 0  
}'

it doesn't work with this error message :  
{"error":"Content-Type header [application/x-www-form-urlencoded] is not supported","status":406}

---

<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: [July 23, 2018, 10:56am UTC](https://discuss.elastic.co/t/adding-seconde-node/141117/6 "2018-07-23T10:56:35Z")

</div>

You need to pass the json content type. Like:

```auto
curl -XPUT 'localhost:9200/my_index/_settings' -H 'Content-Type: application/json' -d'{
  "index.number_of_replicas" : 0
}'

```

---

<div class="post-metadata">

### Author: ![kimfut](https://avatars.discourse-cdn.com/v4/letter/k/b9e5f3/32.png) [@kimfut](https://discuss.elastic.co/u/kimfut)
#### Post date: [July 23, 2018, 2:26pm UTC](https://discuss.elastic.co/t/adding-seconde-node/141117/7 "2018-07-23T14:26:12Z")

</div>

thank you , it works

---

<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: [August 20, 2018, 2:26pm UTC](https://discuss.elastic.co/t/adding-seconde-node/141117/8 "2018-08-20T14:26:14Z")

</div>

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