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

Add documentation for ensureEvenDistributionOfPartitions parameter on the kafka scaler #1539

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

patelvp
Copy link

@patelvp patelvp commented Feb 20, 2025

Scaling kafka consumers should be done in factors of partition count on the topic. This is to ensure that the partitions are evenly spread across all consumers. If the paritions are not evenly spread we run the risk of some partitions being consumed faster than other. This PR adds a new property on the kafka scaler ensureEvenDistributionOfPartitions. When this property is set to true the scaler ensure that the number of pods are always evenly spread across the number of topics on the partition.

Checklist

  • Commits are signed with Developer Certificate of Origin (DCO)

Fixes kedacore/keda#2581

@patelvp patelvp requested a review from a team as a code owner February 20, 2025 17:36
Copy link

netlify bot commented Feb 20, 2025

Deploy Preview for keda ready!

Name Link
🔨 Latest commit 890179c
🔍 Latest deploy log https://app.netlify.com/sites/keda/deploys/67ca151ad2e042000841fb85
😎 Deploy Preview https://deploy-preview-1539--keda.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

Thank you for your contribution! 🙏 We will review your PR as soon as possible.

While you are waiting, make sure to:

  • Add your contribution to all applicable KEDA versions
  • GitHub checks are passing
  • Is the DCO check failing? Here is how you can fix DCO issues

Learn more about:

Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add a detailed explanation of this feature and the algorithm used here. Ideally with some examples of how the value changes with the number of partitions/consumers.

Maybe a new section below this:
https://deploy-preview-1539--keda.netlify.app/docs/2.17/scalers/apache-kafka/#new-consumers-and-offset-reset-policy

@patelvp patelvp force-pushed the ensureEvenDistributionOfPartitionsParamDocumentation branch 3 times, most recently from 6ff205a to d380fd9 Compare March 6, 2025 21:30
@patelvp patelvp force-pushed the ensureEvenDistributionOfPartitionsParamDocumentation branch from d380fd9 to 890179c Compare March 6, 2025 21:35
@patelvp
Copy link
Author

patelvp commented Mar 7, 2025

@zroubalik Force pushed a rebase and added a detailed explanation of how it behaves

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.

Kafka Partitions Per Pod Scaling
2 participants