# Multiple TCP output plugins in Logstash

**URL:** <https://discuss.elastic.co/t/multiple-tcp-output-plugins-in-logstash/344204>\
**Category:** Logstash\
**Created:** [October 2, 2023, 6:38am UTC](https://discuss.elastic.co/t/multiple-tcp-output-plugins-in-logstash/344204 "2023-10-02T06:38:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mano/32/126161_2.png) [@Mano](https://discuss.elastic.co/u/Mano)\
**Post date:** [October 2, 2023, 6:38am UTC](https://discuss.elastic.co/t/multiple-tcp-output-plugins-in-logstash/344204/1 "2023-10-02T06:38:10Z")

</div>

Hi,

I am planning to send logs to 2 different servers over TCP. My output section looks looks something like,

```auto
output {
          tcp {
                 host => "XX.X.XXX.XXX" #ip address of server 1
                  mode => "server"
                  port => 689
              }
       tcp {
             host => "XX.X.XXX.XXX" #ip address of server 2
              mode => "server"
              port => 689
          }
    }

```

Is there a way to send the logs in Round Robin like LOG A to Server 1 and Log B to Server 2 .?

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [October 2, 2023, 12:16pm UTC](https://discuss.elastic.co/t/multiple-tcp-output-plugins-in-logstash/344204/2 "2023-10-02T12:16:44Z")

</div>

> [@Mano](#):
>
> Is there a way to send the logs in Round Robin like LOG A to Server 1 and Log B to Server 2 .?

No, this configuration will send all logs to both servers.

Also, using just one output and setting the two servers in the host will also not work, the `tcp` output does not support load balancing.

If you need to load balance between those two servers, you will need to have something in front of them.

---

<div class="post-metadata">

**Author:** ![Mano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mano/32/126161_2.png) [@Mano](https://discuss.elastic.co/u/Mano)\
**Post date:** [October 2, 2023, 3:37pm UTC](https://discuss.elastic.co/t/multiple-tcp-output-plugins-in-logstash/344204/3 "2023-10-02T15:37:07Z")

</div>

Thank you Lean. I am very new to Logstash.

Can we apply Fingerprint in Filter and send the output to different servers using IF statements please ?

---

<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:** [October 30, 2023, 3:38pm UTC](https://discuss.elastic.co/t/multiple-tcp-output-plugins-in-logstash/344204/4 "2023-10-30T15:38:04Z")

</div>

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