Hey all, I have a question about Fluentd behaviour...
# fluentd
n
Hey all, I have a question about Fluentd behaviour with following setup: forward -> aggregator using the forward plugins where Fluentd runs in Podman containers This is the forward config:
Copy code
system
  log_level debug
/system
source
  @type sample
  sample {"hello":"world", "TimeLogged":1762855871000}
  auto_increment_key counter_key
  tag isc.is-collector
/source

filter isc.**
  @type record_transformer
  enable_ruby true
  record
    #timestamp_iso8601 ${Time.at(record["TimeLogged"]/1000.0).strftime("%Y-%m-%dT%H:%M:%S.%L%z")}
    timestamp_iso8601 ${Time.at(record["TimeLogged"]/1000.0).iso8601(3)}
  /record
/filter

match isc.**
    @type forward
    server
        host fluentd-aggregator
        port 24224
    /server
/match
The aggregator config:
Copy code
system
  log_level debug
/system
source
    @type forward
    port 24224
    bind 0.0.0.0
/source

match **
  @type stdout
/match
So pretty standard config. The aggregator receives the logs from the generated logs, but the forwarder continuously logs the following: " [fluentd-collector-1] | 2025-11-25 152142 +0000 [info]: #0 fluent/log.rb362info: fluentd worker is now running worker=0 [fluentd-collector-1] | 2025-11-25 152143 +0000 [debug]: #0 fluent/log.rb341debug: connect new socket [fluentd-collector-1] | 2025-11-25 152144 +0000 [debug]: #0 fluent/log.rb341debug: connect new socket [fluentd-collector-1] | 2025-11-25 152145 +0000 [debug]: #0 fluent/log.rb341debug: connect new socket [fluentd-collector-1] | 2025-11-25 152146 +0000 [debug]: #0 fluent/log.rb341debug: connect new socket [fluentd-collector-1] | 2025-11-25 152147 +0000 [debug]: #0 fluent/log.rb341debug: connect new socket [fluentd-collector-1] | 2025-11-25 152148 +0000 [debug]: #0 fluent/log.rb341debug: connect new socket [fluentd-collector-1] | 2025-11-25 152149 +0000 [debug]: #0 fluent/log.rb341debug: connect new socket [fluentd-collector-1] | 2025-11-25 152150 +0000 [debug]: #0 fluent/log.rb341debug: connect new socket [fluentd-collector-1] | 2025-11-25 152151 +0000 [debug]: #0 fluent/log.rb341debug: connect new socket [fluentd-collector-1] | 2025-11-25 152152 +0000 [debug]: #0 fluent/log.rb341debug: connect new socket " My question is why is it behaving like this? Should it not only create a new socket when sending the data? I know I can configure the keepalive flag, but if I do this the socket is created and opened like forever I feel. And when running above config in a k8s cluster with multiple aggregators, I want the forwarder to load balance between the aggregator, but due to the keepalive, only 1 socket is created and used resulting in only forwarding the data to 1 aggregator by reusing the same socket. Am I missing some concepts here?