-
Notifications
You must be signed in to change notification settings - Fork 1.9k
in_kafka: Make back pressure workable and add a mechanism of polling threshold #8174
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
Merged
edsiper
merged 7 commits into
master
from
cosmo0920-register-pause-and-resume-callbacks-on-in_kafka
Dec 19, 2023
Merged
in_kafka: Make back pressure workable and add a mechanism of polling threshold #8174
edsiper
merged 7 commits into
master
from
cosmo0920-register-pause-and-resume-callbacks-on-in_kafka
Dec 19, 2023
Conversation
This file contains hidden or 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
…rectly Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
… config parameter Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
…g topics Referring Mem_Buf_Limit and relying on pause/resume should cause performance degredation. Only relying on buffer_max_size should be better to adjust flow rate. Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
5f18744 to
6ff7f73
Compare
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We need to register pause/resume callback for correct handling of back pressure in in_kafka.
Back pressure implementation of Fluent Bit is relying on pause/resume callback which is registered in the each of plugins.
Also, the current implementation of in_kafka does not consider the threshold to halt polling after reaching the limit of chunks.It causes always over limit status of chunks. This shouldn't happen if the parameters are correctly set up.I implemented restrictive polling in in_kafka. This shouldn't cause spikes of memory consumption.
Enter
[N/A]in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
The above config is effective to restrict polling records at once:
Also, when specifying buffer_chunk_size, this parameter is effective to restrict polling events at once:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-testlabel to test for all targets (requires maintainer to do).Documentation
fluent/fluent-bit-docs#1257
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.