# Winlogbeat to Kafka : failover or loadbalancer

**URL:** https://discuss.elastic.co/t/winlogbeat-to-kafka-failover-or-loadbalancer/159549
**Category:** Beats
**Tags:** winlogbeat
**Created:** [December 5, 2018, 2:06pm UTC](https://discuss.elastic.co/t/winlogbeat-to-kafka-failover-or-loadbalancer/159549 "2018-12-05T14:06:11Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![blenski](https://avatars.discourse-cdn.com/v4/letter/b/ebca7d/32.png) [@blenski](https://discuss.elastic.co/u/blenski)
#### Post date: [December 5, 2018, 2:06pm UTC](https://discuss.elastic.co/t/winlogbeat-to-kafka-failover-or-loadbalancer/159549/1 "2018-12-05T14:06:11Z")

</div>

Hi

I am willing to set up winlogbeat to send logs to my Kafka cluster (3 machines)  
I have seen that I can set several Kafka destination servers, thanks to the following config

output.kafka:

# initial brokers for reading cluster metadata

hosts: ["kafka1:9092", "kafka2:9092", "kafka3:9092"]

My question is : is that a fall over set up or a load balancing one ?

If I want to balance the charge should I put a VIP in front of the Kakfa or use the above setting ?

Thanks for your help

Bruno Lenski

---

<div class="post-metadata">

### Author: ![bigphil](https://avatars.discourse-cdn.com/v4/letter/b/65b543/32.png) [@bigphil](https://discuss.elastic.co/u/bigphil)
#### Post date: [December 5, 2018, 3:04pm UTC](https://discuss.elastic.co/t/winlogbeat-to-kafka-failover-or-loadbalancer/159549/2 "2018-12-05T15:04:28Z")

</div>

According to [this](https://www.elastic.co/guide/en/beats/filebeat/current/load-balancing.html) filebeat document, the Kafka output handles loadbalancing internally. I can only assume that Winlogbeat uses the same Kafka output as Filebeat.

---

<div class="post-metadata">

### Author: ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)
#### Post date: [December 6, 2018, 12:40pm UTC](https://discuss.elastic.co/t/winlogbeat-to-kafka-failover-or-loadbalancer/159549/3 "2018-12-06T12:40:33Z")

</div>

When using kafka it is the client that is responsible for load balancing. It's a load-balance always service! Clients have to choose a partition and then send events to the current leader of that partition. Do not put kafka behind HAProxy or any other load balancer. The kafka leader provides a cluster state with a `(topic/partition ID)->kafka` host mapping to the client.

---

<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: [January 3, 2019, 12:40pm UTC](https://discuss.elastic.co/t/winlogbeat-to-kafka-failover-or-loadbalancer/159549/4 "2019-01-03T12:40:34Z")

</div>

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