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

Allow to configure the default number of bundles for new namespaces #854

Merged
merged 3 commits into from
Oct 26, 2017

Conversation

merlimat
Copy link
Contributor

Motivation

By default namespaces are currently created with a single bundle.

In many examples, we need then to explain how to specify a number of bundles (and explaining what bundles are and what they mean).

Bundles are meant to be a very internal concept that in the overweeningly number of cases user shouldn't need to be aware of.
Apart from auto-splitting, which is currently disabled, we need to ensure to start with a reasonable default of bundles that will allow to spread traffic across multiple broker immediately.

Modifications

  • Added a configuration setting in broker to set the default number of bundles
  • When a namespace is created, it will use that value unless something different is specified by the user

Result

A small step towards hiding the bundles from user sight.

@merlimat merlimat added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Oct 24, 2017
@merlimat merlimat added this to the 1.21.0-incubating milestone Oct 24, 2017
@merlimat merlimat self-assigned this Oct 24, 2017
Copy link
Contributor

@massakam massakam left a comment

Choose a reason for hiding this comment

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

👍

@rdhabalia
Copy link
Contributor

creating more bundles will increase shutdowntime of broker because broker unloads topic in parallel but unloading bundle happens sequentially. Using load-balancer we can always split eligible bundle but we can't merge bundle once we split. So, should we keep this number lower than 16.??

@merlimat
Copy link
Contributor Author

creating more bundles will increase shutdowntime of broker because broker unloads topic in parallel but unloading bundle happens sequentially. Using load-balancer we can always split eligible bundle but we can't merge bundle once we split. So, should we keep this number lower than 16.??

That's a good point, though I suspect it won't make any difference outside Yahoo 😄

We could lower the default to something like 4, if 16 poses concerns. The goal here is to have the traffic on partitioned topics to be immediately distributed to at least few machines.

In any case, for the shutdown time, probably a better option could be to throttle based on number of topics per bundle.

Instead of shutting down bundles 1 by 1, we could keep shutting down bundles in parallel until a certain threshold of topics is reached. (eg: a semaphore with max 1K topics)

That would remove any disadvantage in having more bundles with fewer topics.

@rdhabalia
Copy link
Contributor

We could lower the default to something like 4, if 16 poses concerns.

Sure, initially we can start with 4 bundles so, topics can be distributed in multiple brokers and then let load-balancer take care further splitting.

Copy link
Contributor

@rdhabalia rdhabalia left a comment

Choose a reason for hiding this comment

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

👍

@merlimat merlimat merged commit 8448198 into apache:master Oct 26, 2017
@merlimat merlimat deleted the default-number-of-bundles branch October 26, 2017 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants