# HTTP load balancer for dedicated master nodes

**URL:** <https://discuss.elastic.co/t/http-load-balancer-for-dedicated-master-nodes/272947>\
**Category:** Elasticsearch\
**Created:** [May 13, 2021, 7:00pm UTC](https://discuss.elastic.co/t/http-load-balancer-for-dedicated-master-nodes/272947 "2021-05-13T19:00:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kianm](https://avatars.discourse-cdn.com/v4/letter/k/8797f3/32.png) [@kianm](https://discuss.elastic.co/u/kianm)\
**Post date:** [May 13, 2021, 7:00pm UTC](https://discuss.elastic.co/t/http-load-balancer-for-dedicated-master-nodes/272947/1 "2021-05-13T19:00:01Z")

</div>

Hello,

I'm creating an Elasticsearch cluster on AWS EC2. I currently have:

- 1 kibana node
- 3 dedicated master nodes
- 5 data nodes

These nodes are configured with the [discovery-ec2 plugin](https://www.elastic.co/guide/en/elasticsearch/plugins/current/discovery-ec2-usage.html) which is working well.

I am considering placing an [Application Load Balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html) in front of the dedicated master nodes. This is an HTTP load balancer which will proxy API calls from clients to one of the healthy master nodes on TCP port 9200. I would also like to use it for SSL termination further down the road.

Is this architecture problematic?

I cannot find any official documentation stating one way or the other, though I did find an [old post from NGINX](https://www.nginx.com/blog/nginx-elasticsearch-better-together/) suggesting it should work.

Thank you.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 13, 2021, 7:07pm UTC](https://discuss.elastic.co/t/http-load-balancer-for-dedicated-master-nodes/272947/2 "2021-05-13T19:07:05Z")

</div>

Dedicated master nodes, which are often small, should generally not serve traffic. You should instead send the requests directly to the data nodes. I would probably use a network load balancer instead if I decided to use one, but others may have better guidance on this.

---

<div class="post-metadata">

**Author:** ![kianm](https://avatars.discourse-cdn.com/v4/letter/k/8797f3/32.png) [@kianm](https://discuss.elastic.co/u/kianm)\
**Post date:** [May 13, 2021, 7:31pm UTC](https://discuss.elastic.co/t/http-load-balancer-for-dedicated-master-nodes/272947/3 "2021-05-13T19:31:30Z")

</div>

Thank you - I was misunderstanding which addresses should be provided to clients. I assume this is a best-practice simply to keep master resources as free as possible? Or are there technical reasons why connecting to masters will not work?

For context, the reason I was looking at an LB at all, is because the master & data nodes are members of autoscaling groups. As nodes are added/removed, I'd need to update client connection strings (or implement a DNS record with multiple entries that's automatically updated during scaling).

---

<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:** [June 10, 2021, 7:31pm UTC](https://discuss.elastic.co/t/http-load-balancer-for-dedicated-master-nodes/272947/4 "2021-06-10T19:31:44Z")

</div>

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