-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Kafka scaler: limit number of replicas to the number of partitions with lag. #3997
Comments
Sounds reasonable. My Kafka knowledge is limited, but could you consider following example:
and we have one active consumer subscribed to |
Usually a consumer subscribes to topic (not to partition), i.e. one active consumer will be subscribed to all partitions. |
ack, thanks for the clarification. Are you willing to contribute this feature? |
Unfortunately, I am not golang developer. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed due to inactivity. |
So was it implemented? |
I was not. It was autoclosed, are you interested in contributing this @DmitrySenin ? |
@zroubalik , I would love to try |
This issue has been automatically closed due to inactivity. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
I'm interested in this feature as well - it could be useful for use case where you're manually assigning partition by producer - to e.g. not block all partitions with huge events publication. In that case you end up with only some partitions with lag. |
Proposal
I would like to have an option to limit number of replicas to the number of partitions with lag > 0 only.
Use-Case
When using Kafka key, the amount of records per key (partition) not always could be distributed evenly, and in some cases only some partitions have a lag while most of the partitions have no lag.
A special case is when only one partition has a lag which could easily scale to the max allowed number of replicas while all the consumers will be idle except one. In such case there is no need to scale over one replica.
In a general case, I would like to limit scaling to min(max allowed number of replicas as of today, number of partitions with lag > 0). Even though, the partitions could be distributed unevenly between consumers, sometimes it is more efficient way to allocate resources rather than scaling idle consumers.
Anything else?
No response
The text was updated successfully, but these errors were encountered: