Integration / Apache Pulsar Interview questions
Explain the lifecycle of a namespace bundle from creation to split?
When a namespace is created, its topic hash range is divided into an initial, configurable number of bundles - each owning an equal slice of the hash space that any topic in the namespace could fall into based on a hash of its name.
As topics are created and traffic flows, each bundle gets ownership assigned to exactly one broker at a time, tracked via the metadata store, and that broker handles all pub-sub traffic for every topic whose name hashes into that bundle's range.
The load manager continuously monitors per-bundle load signals - throughput, topic count, resource usage; when a bundle's load crosses a configured threshold, it's flagged as a split candidate rather than being split reflexively on any brief spike.
On split, the bundle's hash range divides into two new, smaller-range bundles, each initially owned by the same broker as before to avoid a disruptive double-move, and the load manager can subsequently reassign one of the two to a different, less-loaded broker as a separate rebalancing step.
This split only changes routing metadata, which broker is responsible for which hash range, and involves no movement of underlying message data in BookKeeper, since bundles are purely a load-management and ownership-assignment construct layered on top of storage that was already independent of any broker.
flowchart LR
A[Namespace created] --> B[Initial bundles: equal hash-range slices]
B --> C[Broker assigned ownership per bundle]
C --> D{Load manager: threshold crossed?}
D -- No --> C
D -- Yes --> E[Split bundle into two smaller ranges]
E --> F[Both initially owned by same broker]
F --> G[Optional: reassign one to a less-loaded broker]
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
