# Do I tell the world to hit one node? Or many? Or load balance?

**URL:** <https://discuss.elastic.co/t/do-i-tell-the-world-to-hit-one-node-or-many-or-load-balance/21067>\
**Category:** Elasticsearch\
**Created:** [December 3, 2014, 8:19pm UTC](https://discuss.elastic.co/t/do-i-tell-the-world-to-hit-one-node-or-many-or-load-balance/21067 "2014-12-03T20:19:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christopher\_Ambler\_2](https://avatars.discourse-cdn.com/v4/letter/c/b5ac83/32.png) [@Christopher\_Ambler\_2](https://discuss.elastic.co/u/Christopher_Ambler_2)\
**Post date:** [December 3, 2014, 8:19pm UTC](https://discuss.elastic.co/t/do-i-tell-the-world-to-hit-one-node-or-many-or-load-balance/21067/1 "2014-12-03T20:19:06Z")

</div>

I have a nice, performant cluster of 5 nodes. They're all on separate  
machines on the same switch. Life is good.

Now...

Do I tell the consumers of my Elasticsearch cluster to hit any of the five  
nodes as suits their fancy? Or do I give them the name of ONE node? If so,  
is that node configured any differently?

Or do I put all five behind a virtual IP and load balance them?

I can't find any documentation on best practices here.

Thoughts?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/51237fd8-eefa-4d2b-9c1a-296dd391e98d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/51237fd8-eefa-4d2b-9c1a-296dd391e98d%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [December 3, 2014, 8:45pm UTC](https://discuss.elastic.co/t/do-i-tell-the-world-to-hit-one-node-or-many-or-load-balance/21067/2 "2014-12-03T20:45:01Z")

</div>

It's really left up to you to decide.

Options are;

- Load balancer like HAProxy, nginx
- Multi entry DNS record (ie roundrobin)
- Having a client join the cluster for inserts

There may be more others can suggest.

On 4 December 2014 at 07:19, Christopher Ambler [const.dogberry@gmail.com](mailto:const.dogberry@gmail.com)  
wrote:

> I have a nice, performant cluster of 5 nodes. They're all on separate  
> machines on the same switch. Life is good.
> 
> Now...
> 
> Do I tell the consumers of my Elasticsearch cluster to hit any of the five  
> nodes as suits their fancy? Or do I give them the name of ONE node? If so,  
> is that node configured any differently?
> 
> Or do I put all five behind a virtual IP and load balance them?
> 
> I can't find any documentation on best practices here.
> 
> Thoughts?
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/51237fd8-eefa-4d2b-9c1a-296dd391e98d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/51237fd8-eefa-4d2b-9c1a-296dd391e98d%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/51237fd8-eefa-4d2b-9c1a-296dd391e98d%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/51237fd8-eefa-4d2b-9c1a-296dd391e98d%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X8g5%2BWn8fYcH1HR%3DGahjz3V6dxr-W3ZNUMURX9zgpYDUA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X8g5%2BWn8fYcH1HR%3DGahjz3V6dxr-W3ZNUMURX9zgpYDUA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Christopher\_Ambler\_2](https://avatars.discourse-cdn.com/v4/letter/c/b5ac83/32.png) [@Christopher\_Ambler\_2](https://discuss.elastic.co/u/Christopher_Ambler_2)\
**Post date:** [December 3, 2014, 8:53pm UTC](https://discuss.elastic.co/t/do-i-tell-the-world-to-hit-one-node-or-many-or-load-balance/21067/3 "2014-12-03T20:53:04Z")

</div>

So you're saying, in essence, YES, I should try to balance search requests  
across all nodes and not just one node.

The method may be debatable, but the underlying answer is YES, distribute  
among machines.

(Just being sure I understand).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/622e1a1a-5ed7-4cb3-8873-f993bea1d847%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/622e1a1a-5ed7-4cb3-8873-f993bea1d847%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Christian\_Hedegaard](https://avatars.discourse-cdn.com/v4/letter/c/ee7513/32.png) [@Christian\_Hedegaard](https://discuss.elastic.co/u/Christian_Hedegaard)\
**Post date:** [December 3, 2014, 9:13pm UTC](https://discuss.elastic.co/t/do-i-tell-the-world-to-hit-one-node-or-many-or-load-balance/21067/4 "2014-12-03T21:13:37Z")

</div>

In our environment our cluster is inside EC2/VPC. We have an ELB in front of the cluster. We use DNS to assign a CNAME to the ELB for easier internal use. The cluster is currently at 15 nodes, 3 of which are “master only, no data” and associate themselves with the ELB. The ELB balances requests to/from the master nodes. The master nodes are slightly smaller in memory, but faster in CPU than the rest of the nodes so they can quickly serve requests. The rest of the nodes are “data only” nodes. They are not master eligible and they just store and serve data to/from the masters via the ELB.

This has worked really well for us, and also allows us to test rolling upgrades on a node that does not actually contain any data for faster confirmations.

From: [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) [[mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)] On Behalf Of Christopher Ambler  
Sent: Wednesday, December 03, 2014 12:53 PM  
To: [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
Subject: Re: Do I tell the world to hit one node? Or many? Or load balance?

So you're saying, in essence, YES, I should try to balance search requests across all nodes and not just one node.

The method may be debatable, but the underlying answer is YES, distribute among machines.

## (Just being sure I understand).

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com)[mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/622e1a1a-5ed7-4cb3-8873-f993bea1d847%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/622e1a1a-5ed7-4cb3-8873-f993bea1d847%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/622e1a1a-5ed7-4cb3-8873-f993bea1d847%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/622e1a1a-5ed7-4cb3-8873-f993bea1d847%40googlegroups.com?utm_medium=email&utm_source=footer).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/5CF8216AA982AF47A8E6DEACA629D22B4EFD95A9%40s-us-ex-6.US.R5S.com](https://groups.google.com/d/msgid/elasticsearch/5CF8216AA982AF47A8E6DEACA629D22B4EFD95A9%40s-us-ex-6.US.R5S.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Christopher\_Ambler\_2](https://avatars.discourse-cdn.com/v4/letter/c/b5ac83/32.png) [@Christopher\_Ambler\_2](https://discuss.elastic.co/u/Christopher_Ambler_2)\
**Post date:** [December 4, 2014, 6:57pm UTC](https://discuss.elastic.co/t/do-i-tell-the-world-to-hit-one-node-or-many-or-load-balance/21067/5 "2014-12-04T18:57:07Z")

</div>

I'm curious why no data. Wouldn't having the data local mean faster lookups?

On Wednesday, December 3, 2014 1:14:10 PM UTC-8, Christian Hedegaard wrote:

> In our environment our cluster is inside EC2/VPC. We have an ELB in  
> front of the cluster. We use DNS to assign a CNAME to the ELB for easier  
> internal use. The cluster is currently at 15 nodes, 3 of which are “master  
> only, no data” and associate themselves with the ELB. The ELB balances  
> requests to/from the master nodes. The master nodes are slightly smaller in  
> memory, but faster in CPU than the rest of the nodes so they can quickly  
> serve requests. The rest of the nodes are “data only” nodes. They are not  
> master eligible and they just store and serve data to/from the masters via  
> the ELB.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/a7b92cd3-1cd9-4d58-bb66-17e7aa02647b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a7b92cd3-1cd9-4d58-bb66-17e7aa02647b%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:45am UTC](https://discuss.elastic.co/t/do-i-tell-the-world-to-hit-one-node-or-many-or-load-balance/21067/6 "2017-07-06T00:45:51Z")

</div>


