# Using HAProxy in front of ES cluster?

**URL:** <https://discuss.elastic.co/t/using-haproxy-in-front-of-es-cluster/302739>\
**Category:** Elasticsearch\
**Created:** [April 19, 2022, 5:36pm UTC](https://discuss.elastic.co/t/using-haproxy-in-front-of-es-cluster/302739 "2022-04-19T17:36:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tflorac](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tflorac/32/42393_2.png) [@tflorac](https://discuss.elastic.co/u/tflorac)\
**Post date:** [April 19, 2022, 5:36pm UTC](https://discuss.elastic.co/t/using-haproxy-in-front-of-es-cluster/302739/1 "2022-04-19T17:36:58Z")

</div>

Hi,

When using an Elasticsearch cluster, I understand that I can set the addresses of all the cluster nodes on my client application side.

But:

- what occurs if I define only one node address on application side?
- is there any benefit or drawback to put a single HAProxy server (with a single address), or a small active/active HAProxy cluster, between the ES cluster and the application to simplify application(s) configuration and future cluster evolutions?

Best regards,  
Thierry

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [April 20, 2022, 2:58pm UTC](https://discuss.elastic.co/t/using-haproxy-in-front-of-es-cluster/302739/2 "2022-04-20T14:58:29Z")

</div>

Hi @tflorac Just a couple thoughts... stuff you probably know...

> [@tflorac](#):
>
> - what occurs if I define only one node address on application side?

You can get a hot node... also if you lose that node / or connectivity then app stops working

> [@tflorac](#):
>
> - is there any benefit or drawback to put a single HAProxy server (with a single address), or a small active/active HAProxy cluster, between the ES cluster and the application to simplify application(s) configuration and future cluster evolutions?

Benefit is to distribute the inbound request and abstract scaling the cluster or any other cluster... this is a pretty common option / pattern

---

<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:** [May 18, 2022, 2:59pm UTC](https://discuss.elastic.co/t/using-haproxy-in-front-of-es-cluster/302739/3 "2022-05-18T14:59:17Z")

</div>

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