# Logstash output traffic significantly higher than input (minimal transformations) + TCP RST

**URL:** <https://discuss.elastic.co/t/logstash-output-traffic-significantly-higher-than-input-minimal-transformations-tcp-rst/378868>\
**Category:** Logstash\
**Created:** [June 4, 2025, 1:26pm UTC](https://discuss.elastic.co/t/logstash-output-traffic-significantly-higher-than-input-minimal-transformations-tcp-rst/378868 "2025-06-04T13:26:37Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![vasek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vasek/32/136636_2.png) [@vasek](https://discuss.elastic.co/u/vasek)\
**Post date:** [June 9, 2025, 11:47am UTC](https://discuss.elastic.co/t/logstash-output-traffic-significantly-higher-than-input-minimal-transformations-tcp-rst/378868/21 "2025-06-09T11:47:40Z")

</div>

I’m not very familiar with low-level TCP details, but I **would expect Logstash to send a FIN/ACK instead of a RST when closing the connection**. This way, the session would close cleanly, and the agent could simply reconnect when it has data to send. Letting the session expire after client\_inactivity\_timeout makes sense — just not by sending a RST.

I’m glad I wasn’t the only one confused. Thanks a lot for clarifying the situation. 🙂

---

<div class="post-metadata">

**Author:** ![vasek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vasek/32/136636_2.png) [@vasek](https://discuss.elastic.co/u/vasek)\
**Post date:** [June 9, 2025, 12:04pm UTC](https://discuss.elastic.co/t/logstash-output-traffic-significantly-higher-than-input-minimal-transformations-tcp-rst/378868/22 "2025-06-09T12:04:57Z")

</div>

**I’ve opened a question specifically about the RST behavior here:**

> [@Why does Logstash close idle TCP connections with RST instead of FIN?](https://discuss.elastic.co/t/why-does-logstash-close-idle-tcp-connections-with-rst-instead-of-fin/379000):
>
> Hi Elastic team, I’m trying to better understand how client\_inactivity\_timeout works in Logstash. I’ve noticed that when this timeout is reached, Logstash closes the TCP connection by sending a RST, even though the connection is still technically alive — TCP keep-alives are being sent by Winlogbeat every ~15 seconds and acknowledged by Logstash (confirmed via Wireshark). As I understand it: client\_inactivity\_timeout is based only on application-level data (e.g., log events), TCP-level activ…

**Hopefully someone from the Elastic team can provide more insight or consider addressing it if it makes sense.**

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [June 9, 2025, 12:50pm UTC](https://discuss.elastic.co/t/logstash-output-traffic-significantly-higher-than-input-minimal-transformations-tcp-rst/378868/23 "2025-06-09T12:50:48Z")

</div>

> [@vasek](#):
>
> Winlogbeat sends a TCP Keep-Alive approximately every 15 seconds, and Logstash responds with a Keep-Alive ACK

I don't think that is quite right. When TCP keepalives are enabled the TCP stack on the end that enabled them will send a keepalive ACK and the receiving TCP stack will ack it (the receiving TCP stack has no idea that it is a keepalive). logstash never sees the keepalive. It's entirely at the TCP level.

Keepalives provide rapid notification of the termination of the remote process or server, and also try to preserve the connection across any stateful components in the network (firewalls, NAT devices, etc.).

The application has no idea that TCP keepalives are happening (except to the extent that it may have enabled them when it opened the connection).

Typically an application would close using RST rather than FIN if it is uninterested in processing any additional data from the connection (including data already received).

---

<div class="post-metadata">

**Author:** ![RainTown](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raintown/32/140206_2.png) [@RainTown](https://discuss.elastic.co/u/RainTown)\
**Post date:** [June 9, 2025, 1:38pm UTC](https://discuss.elastic.co/t/logstash-output-traffic-significantly-higher-than-input-minimal-transformations-tcp-rst/378868/24 "2025-06-09T13:38:56Z")

</div>

Thanks for keeping us precise @Badger !!

> [@vasek](#):
>
> Logstash responds with a Keep-Alive ACK

That wording is not accuraret. There was an ACK, it wasn't logstash's ACK.

And the "ignoring" I mentioned is also a bit dubious wording, logstash didn't see then indeed.

> [@Badger](#):
>
> The application has no idea that TCP keepalives are happening (except to the extent that it may have enabled them when it opened the connection).

Well yes, it (the application) might have no idea, and it (the TCP layer) just ACKs to packets that contain no data, so dont need processing by the application (logstash in this case).

But I guess both applications _could_ use SO\_KEEPALIVE. I'm not informed enough to comment on whether that would be better or not, for any definition of better, but I do know, as @vasek also discovered, that RSTs are a bit untidy when troubleshooting things.

[Previous page](https://discuss.elastic.co/t/logstash-output-traffic-significantly-higher-than-input-minimal-transformations-tcp-rst/378868.md?page=1)
