8000 Kafka consumer: per-partition size-limited queue for backpressure, configurable fetch_max_wait by FZambia · Pull Request #997 · centrifugal/centrifugo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Kafka consumer: per-partition size-limited queue for backpressure, configurable fetch_max_wait #997

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

FZambia
Copy link
Member
@FZambia FZambia commented Jul 1, 2025

Proposed changes

This is a refactoring of Kafka consumer which aims to simplify the code and avoid SetOffsets call during poll loop.

We also tune fetch max wait time here to be 500ms instead of 5000ms since there is a chance that loaded partition may be paused until fetch returns (if no other partitions are active at this point - fetch blocks for up to 5 seconds).

With the changes made PR improves consumer throughput (according to added benchmark) in 3 times, having 30k msgs per seconds instead of 10k msgs per second (mostly due to fetch max wait time tuning).

New options:

  • fetch_max_wait - duration, default 500ms
  • partition_queue_max_size - int, default 1000

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.

1 participant
0