We have observed drastic performance improvements on Linux, with proper kernel parameter settings. If you have high-volume TCP traffic, follow Before Installing Fluentd instructions.
Here is a Ruby example to send an event to in_tcp:
Tips
How to Enable TLS Encryption
in_tcp supports TLS transport.
Example:
How to Enable TLS Mutual Authentication
Fluentd supports TLS mutual authentication (i.e. client certificate auth). If you want to use this feature, please set the client_cert_auth and ca_path options like this:
When this feature is enabled, Fluentd will check all the incoming requests for a client certificate signed by the trusted CA. Requests with an invalid client certificate will fail.
To check if mutual authentication is working properly, issue these commands:
If the connection gets established successfully, your setup is working fine.
require 'socket'
# This example uses json payload.
# In in_tcp configuration, need to configure "@type json" in "<parse>"
TCPSocket.open('127.0.0.1', 5170) do |s|
s.write('{"k":"v1"}' + "\n")
s.write('{"k":"v2"}' + "\n")
end