3 ms·
I think the lesson is not that TCP should not be used, but rather that service-affecting code-paths should not block inappropriately. I disagree with the conve
by colmmacc 15y ago
I think the lesson is not that TCP should not be used, but rather that service-affecting code-paths should not block inappropriately.
I disagree with the conversion to UDP, and consider it an anti-pattern. In general, whenever you have many front-ends sharing a back-end service (in this case syslog), some flow-control is necessary - and UDP with no flow control will one day come back to bite you.
Consider an attack or peak load event on the front-ends, now in addition to the direct capacity problems that that may induce, you also impact your backend and control-planes by flooding a network or service with uncontrollable UDP.
As others have noted; it would be better to use non-blocking TCP I/O with some bounded queuing for retries. It's also generally a good idea to use a LIFO queue, so that when the backend is restored after an outage, the recent data takes priority over old data (for logging information the health of the live system is most important).