Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple things could slowdown drastically TcpSyslogMessageSender #41

Open
bsigouin opened this issue Jul 7, 2020 · 1 comment
Open

Comments

@bsigouin
Copy link

bsigouin commented Jul 7, 2020

TcpSyslogMessageSender has three things that need to be change in order for that class to be more reliable regarding performance

  1. Connection timeout should be configurable and have a default value of 5ms (or even less)
  2. Inner retry mechanism should be remove or be configurable
  3. sendMessage should not be a synchronize method (actually one thread at a time can sent a log and could lead to huge slowdown when there is high volume of event being log)
  • my recommendation is to start using non-blocking socket and remove the synchronization in order to avoid any performance issue
@bsigouin bsigouin changed the title Multiple things could slowdown drasctically TcpSyslogMessageSender Multiple things could slowdown drastically TcpSyslogMessageSender Jul 7, 2020
@cyrille-leclerc
Copy link
Contributor

Connection timeout should be configurable and have a default value of 5ms (or even less)

Please see TcpSyslogMessageSender#setSocketConnectTimeoutInMillis(int socketConnectTimeoutInMillis)

https://github.com/CloudBees-community/syslog-java-client/blob/syslog-java-client-1.1.7/src/main/java/com/cloudbees/syslog/sender/TcpSyslogMessageSender.java#L256

Inner retry mechanism should be remove or be configurable

Please see TcpSyslogMessageSender#setMaxRetryCount(int maxRetryCount)

https://github.com/CloudBees-community/syslog-java-client/blob/syslog-java-client-1.1.7/src/main/java/com/cloudbees/syslog/sender/TcpSyslogMessageSender.java#L260

sendMessage should not be a synchronize method (actually one thread at a time can sent a log and could lead to huge slowdown when there is high volume of event being log)

2 key ideas that motivated this choice are:

  • For reliability & scalability, users can introduce a syslog forwarder on their infrastructure, close to the emitter.
  • The UDP sender could solve some scalability problems ... with some downsides

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants