<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 24, 2023, 18:05 Steve Bernacki <<a href="mailto:steve@copacetic.net">steve@copacetic.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am running syslog-ng 3.38.1.<br>
<br>
I have a scenario where I am receiving logs from hundreds devices over a <br>
number of different protocols (tcp, udp, tcp/TLS). I perform some <br>
filtering on these logs and then send them to one or more destinations <br>
for further processing. Due to the volume of logs being received, the <br>
destinations are becoming saturated and logs begin queuing up on my end. <br>
I have memory and disk buffering enabled, but the receiving end isn't <br>
able to pull logs off quickly enough since they are being funneled <br>
through a single TCP connection. I'd like to be able to establish some <br>
number of concurrent tcp connections to a single destination ip:port, <br>
and balance all of the incoming logs through those connections.<br>
<br>
I'm aware of techniques to load balance to destinations using multiple <br>
channels in a single destination and filtering traffic by the R_MSEC, <br>
but this technique quickly causes simple configs to balloon to hundreds <br>
of lines. I suppose this would work even if the destinations are all the <br>
same (I'd need to use unique persist-name() labels), but is there an <br>
easier / more straightforward way of accomplishing this?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">Just one idea to throw around, you can generate syslog-ng config using confgen (using a Shell script in earlier versions or a python function since 4.0). This would mean that your primary config would only contain a single destination and behind that  you can have the entire load balancing logic.</div><div dir="auto"><br></div><div dir="auto">Here's a sample for a python based confgen from the 4.0 announcement.</div><div dir="auto"><br></div><div dir="auto"><a href="https://github.com/syslog-ng/syslog-ng/releases/tag/syslog-ng-4.0.1">https://github.com/syslog-ng/syslog-ng/releases/tag/syslog-ng-4.0.1</a><br></div><div dir="auto"><br></div><div dir="auto">Bazsi</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div></div>