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

Apache Kafka Scaler: Implementation for Excluding Persistent Lag #3904

Closed
josephangbc opened this issue Nov 23, 2022 · 0 comments
Closed

Apache Kafka Scaler: Implementation for Excluding Persistent Lag #3904

josephangbc opened this issue Nov 23, 2022 · 0 comments
Labels
feature-request All issues for new features that have not been committed to needs-discussion

Comments

@josephangbc
Copy link
Contributor

josephangbc commented Nov 23, 2022

Proposal

Add implementation for excluding consumer lag from partitions with persistent lag.

Use-Case

In situations where consumer is unable to process / consume from partition due to errors etc., committed offset will not change, and consumer lag on that partition will be increasing and never be decreased. KEDA trigger scaling towards the maxReplicaCount.

If partition lag is deemed as persistent, excluding its consumer lag will allow KEDA to trigger scaling appropriately based on the consumer lag observed on other topics and partition, and not be affected by this consumer lag which will not be resolved by scaling.

Anything else?

Implementation I have in mind is as follows:
Upon each polling cycle, check if current consumer offset is same as previous consumer offset.

  • Different: return endOffset - consumerOffset (No different from current implementation)
  • Same: return 0 (To exclude this partition's consumer lag from the total lag)

I have a working proof-of-concept for this implementation, will add a PR to this feature request issue if neccessary. Please let me know your thoughts / comments about the usefulness of this proposal and also about the implementation I suggested above.

Pull Requests

keda: #3965
keda-docs: kedacore/keda-docs#984

@josephangbc josephangbc added feature-request All issues for new features that have not been committed to needs-discussion labels Nov 23, 2022
@tomkerkhove tomkerkhove moved this to Proposed in Roadmap - KEDA Core Nov 23, 2022
Repository owner moved this from Proposed to Ready To Ship in Roadmap - KEDA Core Dec 9, 2022
@JorTurFer JorTurFer moved this from Ready To Ship to Done in Roadmap - KEDA Core Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request All issues for new features that have not been committed to needs-discussion
Projects
Archived in project
Development

No branches or pull requests

2 participants