Inquiry about load balancing of elasticsearch cluster

Hi, guys.

I am configuring an elastic stack with multiple servers and would like to know how load balancing is implemented for each connection to each component.

  1. elastic agent -> multiple elasticsearch or logstash nodes
    If I set the IP:port of multiple elasticsearch or logstash in the elastic agent using kibana's fleet-server configuration, will index traffic be distributed evenly to all listed nodes? Or, will all data be sent with the first node by default and be transmitted to the next node if the communication with a node a impossible?

  2. logstash -> elasticsearch data nodes
    If I set the IP:port of multiple elasticsearch using logstash.yml, will the traffic from logstash be sent evenly to all listed nodes? Or, will all data be sent with the first node of the list by default and be transmitted to the next node if the communication with the node is impossible?

  3. kibana -> elasticsearch coordination nodes
    If I set the IP:port of multiple elasticsearch using kibana.yml, will the request from kibana be sent evenly to all listed nodes? Or, will all requests be sent with the first node of the list by default and be transmitted to the next node if the communication with the node is impossible?

Hello,

For Elastic Agent it depends on the output, if the output is elasticsearch and you have multiple hosts configured, then it will use round robin to load balance between them, if the output is logstash you need to configure loadbalance: true for it to load balance between the nodes.

The documentation is here and here.

For Logstash if you have multiple nodes in the hosts settings it will load balance between them using round robin as explained here.

And for Kibana is the same thing, if the setting has multiple nodes it will load balance between them, the documentation is here.

I clearly understand thanks to you! All of them were written explicitly on the document.
Thank you very much!