为什么rancher logging operator同时拥有Fluent Bit和Fluentd?

Why does rancher logging operator have both Fluent Bit and Fluentd?

Rancher v2.5 日志记录使用 banzai 云日志记录运算符 - 请参阅 here

The operator deploys and configures a Fluent Bit DaemonSet on every node to collect container and application logs from the node file system. Fluent Bit queries the Kubernetes API and enriches the logs with metadata about the pods, and transfers both the logs and the metadata to Fluentd. Fluentd receives, filters, and transfer logs to multiple outputs

我不太了解 Fluent Bit,但是 documentation

Fluent Bit is an open source Log Processor and Forwarder which allows you to collect any data like metrics and logs from different sources, enrich them with filters and send them to multiple destinations.

听起来与 Fluentd(以及其他日志转发器,如 LogStash)非常相似。

那么,将 Fluent bit 和 Fluentd 作为日志操作符的一部分的 reason/benefit 会是什么?

性能和资源利用率。 FluentBit 更轻量级,因此作为 DaemonSet 比 运行 更便宜。转向 FluentD 也很有意义,因为 FluentD 有数百个插件,而且通常更灵活和可配置。 FluentBit docs 他们自己说:

Fluentd is a great option due to it flexibility and availability of plugins (more than 300 extensions!) but if the data collection will happen in an Embedded environment or an IoT device where the system capacity is restricted, Fluent Bit is the solution to use.

所以看起来这个操作员正在做的是使用 FluentBit 将日志转发到尽可能轻量级的进程中,然后使用 FluentD 将繁重的 processing/aggregating/shipping 转发到目的地,就像应用程序可能的方式一样使用它自己的日志转发器发送到 FluentD(例如通过来自 Kubernetes 外部某处的 HTTP 输入),然后让 FluentD 管理处理这些日志并将它们发送到目的地。