# Elastic agent sending to second node if first node unreachable

**URL:** https://discuss.elastic.co/t/elastic-agent-sending-to-second-node-if-first-node-unreachable/351564
**Category:** Elastic Agent
**Tags:** fleet
**Created:** [January 22, 2024, 4:26pm UTC](https://discuss.elastic.co/t/elastic-agent-sending-to-second-node-if-first-node-unreachable/351564 "2024-01-22T16:26:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![TIT](https://avatars.discourse-cdn.com/v4/letter/t/a8b319/32.png) [@TIT](https://discuss.elastic.co/u/TIT)
#### Post date: [January 22, 2024, 4:26pm UTC](https://discuss.elastic.co/t/elastic-agent-sending-to-second-node-if-first-node-unreachable/351564/1 "2024-01-22T16:26:40Z")

</div>

in fleet outputs settings if modifiying the hosts section and add multiple hosts will that mean that agent will send data the the second hosts only when the first one is unreachable , or data will be sent to the both nodes at the same time if yes could that lead to duplicated data in th cluster

---

<div class="post-metadata">

### Author: ![MichelLaterman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michellaterman/32/110221_2.png) [@MichelLaterman](https://discuss.elastic.co/u/MichelLaterman)
#### Post date: [January 22, 2024, 4:37pm UTC](https://discuss.elastic.co/t/elastic-agent-sending-to-second-node-if-first-node-unreachable/351564/2 "2024-01-22T16:37:10Z")

</div>

We use the go-elasticsearch client to connect to nodes.  
Data is not sent to all nodes for each request.  
Connections will be distributed by round-robin to each host  
See [Connecting | Elasticsearch Go Client [8.12] | Elastic](https://www.elastic.co/guide/en/elasticsearch/client/go-api/current/connecting.html#connecting-multiple-nodes) for more info.

---

<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: [February 19, 2024, 4:37pm UTC](https://discuss.elastic.co/t/elastic-agent-sending-to-second-node-if-first-node-unreachable/351564/3 "2024-02-19T16:37:17Z")

</div>

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