# Log4net UDP alternative

**URL:** <https://discuss.elastic.co/t/log4net-udp-alternative/133804>\
**Category:** Logstash\
**Created:** [May 30, 2018, 7:12am UTC](https://discuss.elastic.co/t/log4net-udp-alternative/133804 "2018-05-30T07:12:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cowensel](https://avatars.discourse-cdn.com/v4/letter/c/eb9ed0/32.png) [@cowensel](https://discuss.elastic.co/u/cowensel)\
**Post date:** [May 30, 2018, 7:12am UTC](https://discuss.elastic.co/t/log4net-udp-alternative/133804/1 "2018-05-30T07:12:50Z")

</div>

We currently use log4net that uses UDP to parse data over the network to logstash where we have recently found that it is silently dropping messages as the UDP appender cannot keep up. Can anyone advise if there are any alternatives to UDP like TCP that will allow us to parse messages more reliably. Adjusting the workers does not improve the stability of UDP

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 30, 2018, 6:50pm UTC](https://discuss.elastic.co/t/log4net-udp-alternative/133804/2 "2018-05-30T18:50:51Z")

</div>

Write the log entries to disk and use Filebeat to ship them. Having appenders send logs directly over the network is inherently unreliable.

---

<div class="post-metadata">

**Author:** ![cowensel](https://avatars.discourse-cdn.com/v4/letter/c/eb9ed0/32.png) [@cowensel](https://discuss.elastic.co/u/cowensel)\
**Post date:** [June 1, 2018, 11:21am UTC](https://discuss.elastic.co/t/log4net-udp-alternative/133804/3 "2018-06-01T11:21:31Z")

</div>

Thanks for the response.

We have a number of servers that currently have log4net that parses into logstash across the network using UDP which we have recently found that logstash cannot keep up after a while. Parsing to a file on the server than logstash reads from the file defeats the object. Is there another way? or how do others do it?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [June 1, 2018, 1:36pm UTC](https://discuss.elastic.co/t/log4net-udp-alternative/133804/4 "2018-06-01T13:36:57Z")

</div>

> We have a number of servers that currently have log4net that parses into logstash across the network using UDP which we have recently found that logstash cannot keep up after a while. Parsing to a file on the server than logstash reads from the file defeats the object.

Which objective? My objectives are always a) reliable applications with b) reliable remote logging. I don't see how both those objectives can be met when logging directly over the network.

> Is there another way? or how do others do it?

Most people make the applications log to disk and ship the logs asynchronously via e.g. Filebeat so I'm not advocating anything controversial.

---

<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:** [June 29, 2018, 1:36pm UTC](https://discuss.elastic.co/t/log4net-udp-alternative/133804/5 "2018-06-29T13:36:58Z")

</div>

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