-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
82893: pkg/util/log: enable buffering by default for fluent/http sinks r=andreimatei a=abarganier This patch updates the default `httpSink` and `fluentSink` configuration to enable buffering with a `max-staleness` of 5 seconds, `trigger-size` of 1MiB, and `max-buffer-size` of 50MiB. It's been identified that unavailable fluentd/http addresses, when part of an un-buffered `fluentSink` or `httpSink`, can lead to nodes becoming unavailable due to hanging synchronous requests to write logs to the sink target. With a newly improved `bufferedSink` wrapper, we should now enable buffering by default for these network sinks to avoid this possibility. Network sinks can still disable buffering via the `buffering: NONE` option being set on the sink in the log config YAML. Note that this will also affect the output of `debug check-log-config`. Finally, the `DescribeAppliedConfig()` function previously did not include any information about configured `httpSink`'s in its output. This is incorrect behavior and a fix was required to verify the default buffering config was being applied to http sinks successfully. Therefore, this patch also updates `DescribeAppliedConfig()` to include descriptions of http sinks. Release note (ops change): `httpSink`'s and `fluentSinks`'s will now, by default, have buffered writes enabled. This means that writes to these sinks will be asynchronous. This is enabled via a new default `buffering` configuration for both the `httpSink` and `fluentSink`, where the default values are as follows: ``` buffering: // The maximum amount of time between flushes to the underlying // http or fluent sink. max-staleness: 5s // `flush-trigger-size` is the size in bytes of accumulated messages // in the buffer which will trigger a flush. 0 disables this trigger. flush-trigger-size: 1MiB // `max-buffer-size` limits the size of the buffer. When a new message // is causing the buffer to overflow beyond this limit, old messages // are dropped max-buffer-size: 50MiB ``` This will show in `debug check-log-config` as well as impact the default behavior of these two types of network sinks. Co-authored-by: Alex Barganier <[email protected]>
- Loading branch information
Showing
9 changed files
with
193 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.