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

More flexible Kafka topic configuration #2447

Open
loicmathieu opened this issue Jan 6, 2022 · 12 comments
Open

More flexible Kafka topic configuration #2447

loicmathieu opened this issue Jan 6, 2022 · 12 comments
Labels
feature-request All issues for new features that have not been committed to needs-discussion stale-bot-ignore All issues that should not be automatically closed by our stale bot

Comments

@loicmathieu
Copy link

Proposal

Today, Kafka scaler only allow to scale based on the lag of one topic.

A lot of streaming applications uses multiple topics, using the Kafka scaler can be cumbersome if using tens of topics, or a regex of topics.

Multiple improvements can be added if the underlying Kafka client support them to configure multiple topics wich lags will be sumed:

  • Configuring a list of topics
  • Configuring a topic regex
  • Taking into accound the lag of all topics of the configured consumer group

Use-Case

No response

Anything else?

No response

@loicmathieu loicmathieu added feature-request All issues for new features that have not been committed to needs-discussion labels Jan 6, 2022
@loicmathieu
Copy link
Author

Taking into accound the lag of all topics of the configured consumer group

Just seen this one is handled here : #2409, great ;)
But I still think it would be great to have the other capabilities.

@tomkerkhove
Copy link
Member

  • Configuring a list of topics
  • Configuring a topic regex

Our current approach for all scalers is to add multiple triggers in your ScaledObject/Job. This should work for your scenario as well given it starts scaling as soon as one of them meets the criteria.

@loicmathieu
Copy link
Author

@tomkerkhove some typical Kafka deployment involves multiple topic, for eg one topic by country. So you usually use a regex. And configuring hundreds of scaler is not very practical.

Moreover, it's different to have 100 scaler with a max lag of 100 and 1 scaler with a global lag of 10000, the scaler behaviour will not be the same.

@loicmathieu
Copy link
Author

I agree that a list of topic can be replaced by multiple scalers but not the usage of a regex (moreover, regex target topics can be un-known at build time).

@zroubalik
Copy link
Member

Regex is not a bad idea imho (btw this is implemented for RabbitMQ scaler).

@loicmathieu would you be interested to draft some POC?

@loicmathieu
Copy link
Author

@zroubalik well I would love to but I'm pretty new to Go and the Sarama client didn't allow pattern based consumption OOTB so it may not be a trivial implementation. If nobody else wanted to work on it I can give it a try but I'm pretty busy these days so it will not be soon.

@zroubalik
Copy link
Member

@loicmathieu ok, so let's keep this open for the community.

@stale
Copy link

stale bot commented Mar 8, 2022

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.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label Mar 8, 2022
@stale
Copy link

stale bot commented Mar 15, 2022

This issue has been automatically closed due to inactivity.

@stale stale bot closed this as completed Mar 15, 2022
Repository owner moved this from Proposed to Ready To Ship in Roadmap - KEDA Core Mar 15, 2022
@zroubalik zroubalik reopened this Mar 16, 2022
@stale stale bot removed the stale All issues that are marked as stale due to inactivity label Mar 16, 2022
Repository owner moved this from Ready To Ship to Proposed in Roadmap - KEDA Core Mar 16, 2022
@stale
Copy link

stale bot commented May 15, 2022

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.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label May 15, 2022
@stale
Copy link

stale bot commented May 22, 2022

This issue has been automatically closed due to inactivity.

@stale stale bot closed this as completed May 22, 2022
Repository owner moved this from Proposed to Ready To Ship in Roadmap - KEDA Core May 22, 2022
@zroubalik zroubalik reopened this May 23, 2022
@stale stale bot removed the stale All issues that are marked as stale due to inactivity label May 23, 2022
Repository owner moved this from Ready To Ship to Proposed in Roadmap - KEDA Core May 23, 2022
@stale
Copy link

stale bot commented Jul 22, 2022

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.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label Jul 22, 2022
@zroubalik zroubalik added stale-bot-ignore All issues that should not be automatically closed by our stale bot and removed stale All issues that are marked as stale due to inactivity labels Jul 25, 2022
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 stale-bot-ignore All issues that should not be automatically closed by our stale bot
Projects
Status: Proposed
Development

Successfully merging a pull request may close this issue.

3 participants