[feat] PIP-468: Scalable Topic Controller - #25516
Conversation
Sub-PIP of PIP-460 describing the broker-side controller component for scalable topics. Covers segment lifecycle management, split/merge protocols, consumer assignment for stream and checkpoint consumers, leader election and failover, DAG watch sessions, and the segments admin API.
|
I have a question: if my ScalableTopic has a large number of sub-partitions — say, 1 million — would there be a situation where every broker needs to perform calculations across all 1 million sub-partitions of that ScalableTopic just to determine which sub-partitions belong to it? I'm a bit worried about scalability issues caused by this kind of metadata computation. |
The number of "segments" is dynamically adjusted based on several factors (eg: current/historic traffic, consumer parallelisms), though there would never be a reason to have such a large number of segments. Most likely scenario is for segments to be at most few 100s, and in some exceptional cases to touch 1000s. The reverse can be true though: eg. having millions of scalable topics (with most of the having few or just one segment) |
In scenarios where users require strict ordering and very slow consumption speeds, and considering that k-shared mode may cause out-of-order delivery upon consumer disconnection — or in cases where a proxy is inserted between the broker and client, making k-shared unusable — the only option is to increase the number of partitions to boost consumption concurrency. This could result in a single ScalableTopic having millions of sub-partitions. In such scenarios, can the new design avoid the scalability issues caused by metadata computation? |
Scaling up the number of segments (or partitions for what it matters) for this scenario is not an efficient way of solving the problem. Scalable topics are going to address these scenarios with the same mechanism used today for KeyShared subscriptions. |
Summary
Adds PIP-468, a sub-PIP of PIP-460: Scalable Topics, describing the broker-side Scalable Topic Controller — the component responsible for segment lifecycle management, split/merge coordination, consumer assignment, leader election, and DAG watch sessions for scalable topics.
The document covers:
ConsumerRegistration) vs. what is in-memory on the leader (the keep-alive state and grace-period timer), and how controller leader failover restarts grace-period timers from zero.SubscriptionMetadataandConsumerRegistrationpaths.CommandScalableTopicLookup/Update/Close), new Admin REST endpoints for scalable topics and segments, newScalableTopicsadmin client interface, and thescalableTopicEnabledbroker configuration.This PIP only changes documentation under
pip/. Implementation will land in subsequent PRs against the parent PIP-460 tracking issue.Test plan