# Auth and load balance

**URL:** <https://discuss.elastic.co/t/auth-and-load-balance/203262>\
**Category:** Elasticsearch\
**Created:** [October 11, 2019, 3:34pm UTC](https://discuss.elastic.co/t/auth-and-load-balance/203262 "2019-10-11T15:34:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SirJune](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sirjune/32/55205_2.png) [@SirJune](https://discuss.elastic.co/u/SirJune)\
**Post date:** [October 11, 2019, 3:34pm UTC](https://discuss.elastic.co/t/auth-and-load-balance/203262/1 "2019-10-11T15:34:04Z")

</div>

Hi,

I have 4 nodes:  
host1,host2,host3 = master,data,ingest (all true)  
host4 = data,ingest (all true)

- enable auth (local)

1. start elasticsearch on all nodes  
do i need to run "bin/elasticsearch-setup-passwords interactive" on each node? or say only at host1

- load balance

1. should i point logstash this way?  
hosts =\> ["host4:9200", "host3:9200", "host2:9200", "host1:9200"]  
or  
it doesn't matter of host order as Logstash will load balance among them.

I'd appreciate any tips/help.

thanks!  
Sirjune

---

<div class="post-metadata">

**Author:** ![SirJune](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sirjune/32/55205_2.png) [@SirJune](https://discuss.elastic.co/u/SirJune)\
**Post date:** [October 11, 2019, 7:38pm UTC](https://discuss.elastic.co/t/auth-and-load-balance/203262/2 "2019-10-11T19:38:15Z")

</div>

well for auth in a cluster, i found this ([https://www.elastic.co/guide/en/elasticsearch/reference/7.4/configuring-tls.html#node-certificates](https://www.elastic.co/guide/en/elasticsearch/reference/7.4/configuring-tls.html#node-certificates)). Somehow my mind was following single-node steps.

in summary:

1. created CA cert
2. created cert & private key
3. enabled xpack and transport.ssl configs in elasticsearch.yml
4. started elasticsearch on all nodes
5. ran bin/elasticsearch-setup-passwords interactive on 1 node only
6. created roles & users for logstash & filebeat
7. added credentials in the config files of filebeat & logstash, then restart

elasticsearch is receiving the data

---

<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:** [November 8, 2019, 7:38pm UTC](https://discuss.elastic.co/t/auth-and-load-balance/203262/3 "2019-11-08T19:38:28Z")

</div>

Closed on November 8, 2019, 7:38pm UTC

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