# Separating index and query hosts

**URL:** <https://discuss.elastic.co/t/separating-index-and-query-hosts/52967>\
**Category:** Elasticsearch\
**Created:** [June 16, 2016, 8:55am UTC](https://discuss.elastic.co/t/separating-index-and-query-hosts/52967 "2016-06-16T08:55:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_van\_Rossum](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@Mark\_van\_Rossum](https://discuss.elastic.co/u/Mark_van_Rossum)\
**Post date:** [June 16, 2016, 8:55am UTC](https://discuss.elastic.co/t/separating-index-and-query-hosts/52967/1 "2016-06-16T08:55:01Z")

</div>

Hi,

I'm building an ELK2 stack, with two elasticsearch nodes, and was wondering if there is any benefit in configuring our load balancer to direct queries (using kibana) to one node, and indexing (using logstash) to the other? At the moment the load balancer just picks one of the hosts at random for each connection.

thanks!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 16, 2016, 9:45am UTC](https://discuss.elastic.co/t/separating-index-and-query-hosts/52967/2 "2016-06-16T09:45:42Z")

</div>

> [@Mark\_van\_Rossum](#):
>
> is any benefit in configuring our load balancer to direct queries (using kibana) to one node, and indexing (using logstash) to the other

Not really, if you query one node then chances are you will be getting data from the other one anyway.

---

<div class="post-metadata">

**Author:** ![Mark\_van\_Rossum](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@Mark\_van\_Rossum](https://discuss.elastic.co/u/Mark_van_Rossum)\
**Post date:** [June 16, 2016, 9:54am UTC](https://discuss.elastic.co/t/separating-index-and-query-hosts/52967/3 "2016-06-16T09:54:43Z")

</div>

thanks for the reply, would this apply even with the default setup, where each shard has 1 replica, so each node has a full copy of all the data?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 16, 2016, 9:00pm UTC](https://discuss.elastic.co/t/separating-index-and-query-hosts/52967/4 "2016-06-16T21:00:09Z")

</div>

Yes, because ES will round robin between a primary and replica shard.

---

<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 5, 2017, 10:43pm UTC](https://discuss.elastic.co/t/separating-index-and-query-hosts/52967/5 "2017-07-05T22:43:06Z")

</div>


