Skip to content
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

Change Kafka Buffer defaults for fetch.max.wait.ms, fetch.min.bytes, partition.assignment.strategy, close consumer on shutdown #5373

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

graytaylor0
Copy link
Member

@graytaylor0 graytaylor0 commented Jan 30, 2025

Description

When data prepper scales horizontally and removes data prepper instances, this can cause instability due to using the RangeAssignor, since the behavior for RangeAssignor is

When a rebalance occurs, all consumers drop all their partitions and get reassigned (a full rebalance).

CoopeartiveStickyAssignor will gradually release partitions instead of dropping them all at once and reassigning when a consumer leave the group

Additionally, the fetch.max.wait.ms at 500 ms and fetch.min.bytes as 1 will lead to many more calls to consume and return smaller number of records. Changing this to 1000 ms and 2 kb will lead to less calls to consume and more records being returned in each poll call, which will also lower the utilization on the kafka cluster.

Lastly, the Kafka buffer consumers were not calling consumer.close() on shutdown, which will mean that the Kafka server will wait for heartbeat to fail (around 45 seconds) before it realizes it has lost a consumer, rather than immediately.

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…partition.assignment.strategy, close consumer on shutdown

Signed-off-by: Taylor Gray <[email protected]>
@graytaylor0 graytaylor0 merged commit 49c6a2b into opensearch-project:main Jan 30, 2025
46 of 50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants