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

Default partitions count for __consumer_offsets topic increased #5412

Merged

Conversation

dlex
Copy link
Contributor

@dlex dlex commented Jul 8, 2022

Cover letter

When a consumer tries to locate a consumer group coordinator of a cluster for the first time, the __consumer_offsets topic is created with the number of partitions as per the group_topic_partitions property. The default value for that property was 1 which means that unless a different value was explicitly specified by the customer at a very early stage of cluster's life, all OffsetCommit requests from all consumers will be going to a single broker. This change increases the default value to 16 as a reasonable trade-off between OffsetCommit parallelism for the clusters that will use consumer groups later in their life, and the overhead for the clusters that won't use consumer groups.

Fixes #5222

Release notes

Improvements

  • The default number of partitions in the internal consumer groups topic has been changed to 16, making it more scaleable. The default change will only take effect on new clusters -- existing clusters will abide by the value effective at the moment the first consumer group was created in the cluster. It is still recommended to explicitly specify a suitable value in the configuration while setting up large scale clusters.

When a consumer tries to locate a consumer group coordinator of a cluster
for the first time, the __consumer_offsets topic is created with the
number of partitions as per the group_topic_partitions property.
The default value for that property was 1 which means that unless
a different value was explicitly specified by the customer at a very
early stage of cluster's life, all OffsetCommit requests from all
consumers will be going to a single broker. This change increases
the default value to 16 as a reasonable trade-off between OffsetCommit
parallelism for the clusters that will use consumer groups
later in their life, and the overhead for the clusters that
won't use consumer groups.

redpanda-data#5222
@emaxerrno
Copy link
Contributor

@dlex are there any breaking changes from a user perspective here.

@mmaslankaprv
Copy link
Member

this lgtm, although it seems that some of the tests are based on assumption that there is only one partition in __consumer_offsets topic

@mmedenjak mmedenjak added the kind/enhance New feature or request label Jul 11, 2022
@dlex
Copy link
Contributor Author

dlex commented Jul 13, 2022

@emaxerrno no user breaking changes. This change only affects new cluster and (rare?) cases of existing clusters where consumer groups have not been used yet.

test_leadership_transfer relies on kafka_group_offset metric source as an
indication of the node being a group coordinator. However in admin API
there is no way to know which __consumer_groups partition a specific
consumer group uses, and the testcase always works with partition 0.
To make that work, number of __consumer_groups partition is set to 1
explicitly.
@dlex dlex force-pushed the 5222_consumer-offsets-topic-default-partitioning branch from 16128a4 to 20c701a Compare July 13, 2022 04:38
@dlex dlex merged commit 96e2b6b into redpanda-data:dev Jul 14, 2022
@dlex dlex deleted the 5222_consumer-offsets-topic-default-partitioning branch July 14, 2022 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/enhance New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consumer Offsets Topic defaults to 1 partition
5 participants