Scrivio Interview library
DesignAdvanced7 min read · updated 13 November 2026

A new integration platform must host 30,000 customer-specific streams, give some consumers queue-style per-message acknowledgement, replicate selected streams between two regions, and keep 5 years of history cheaply. A team proposes Apache Pulsar instead of the company's Kafka 4.x platform.

How do you evaluate the choice, and what would you test before deciding?

I would map each requirement to what each system offers natively, then weigh the parts that are not features: the cost of running a second platform, the skills the company has, and the ecosystem of connectors and clients. Pulsar is strong on very many topics, per-message acknowledgement, built-in geo-replication and offload to object storage; Kafka 4.x covers most of the same ground with tiered storage, share groups (check their maturity in your version) and MirrorMaker 2, and 30,000 streams can often be modelled as fewer topics keyed by customer. Before deciding, I would run a proof of concept at production numbers and compare measured results plus the total cost of two platforms.

Why this question is asked

Choosing a second streaming platform is a decision a company lives with for a decade. Pulsar is a serious system with real advantages for some workloads, and a team that proposes it usually has good reasons. Interviewers ask this at senior level to see whether we can compare two systems honestly, requirement by requirement, without treating either as the default, and whether we know which claims must be tested rather than believed. In this answer, we will recap how the two systems are built, map the four requirements to each, look at operations and ecosystem, and design the proof of concept that settles it.

1A Quick Recap of the Two Architectures

Kafka stores data on its brokers. Each partition is a log of segment files on a broker's disk, replicated to other brokers. In Kafka 4, the KRaft controllers hold the metadata (ZooKeeper is gone), and tiered storage can move older segments to object storage such as S3 while keeping recent ones local.

Pulsar separates serving from storage. Its brokers are mostly stateless: they handle producers and consumers but do not own the data. The data lives in Apache BookKeeper, a separate cluster of storage nodes called bookies, which store small ledger segments spread across many bookies. A metadata store (ZooKeeper, etcd or Oxia, depending on version) tracks topics, ledgers and ownership. Pulsar organises topics into tenants and namespaces, and policies such as retention, quotas and replication are set per namespace.

This split explains most of the differences that matter here: Pulsar can move a topic between brokers without copying data, and a topic costs less on the broker side, but there are three kinds of components to run instead of one.

2Mapping the Requirements

The table below sets the four requirements side by side. The useful exercise is not to count checkmarks but to ask, for each row, whether the Kafka answer is good enough for this workload and what the Pulsar answer costs.

Topic count is the sharpest difference. In Kafka every partition is a log on a broker with files, memory and replication work, so 30,000 topics with several partitions each, replicated three times, is a heavy cluster. But do the streams need to be separate topics? If they are customer-specific views of the same kind of data, a few topics keyed by customer id keep each customer's records in order, and consumers that care about one customer can filter. If each customer really needs its own retention, schema and access rules, separate topics become more compelling, and that is where Pulsar's namespaces and cheap topics shine.

Queue-style per-message acknowledgement is native in Pulsar through shared and key-shared subscriptions. Kafka's answer is share groups, introduced by KIP-932 as early access in Kafka 4.0 and maturing in later releases; check their status and client support in the version you would run. Geo-replication is built into Pulsar per namespace, while Kafka uses MirrorMaker 2 or a vendor's cluster linking. Five years of cheap history is covered by tiered storage in both.

Requirements against each system
RequirementPulsarKafka 4.x
30,000 customer streamsMany cheap topics, namespacesFewer topics keyed by customer
Per-message acknowledgementShared, key-shared subscriptionsShare groups; check maturity
Two-region replicationBuilt-in geo-replicationMirrorMaker 2 or vendor linking
5 years of cheap historyOffload to object storageTiered storage
Existing skills and toolingNew platformAlready in place

3Operations, Skills and Ecosystem

Features are only half of the decision. Pulsar runs brokers, bookies and a metadata store, each with its own failure modes, tuning and upgrade path. The company already has a Kafka platform with on-call engineers who know it, runbooks for its failures, monitoring, a security model with ACLs and certificates, and capacity planning experience. A second platform means doubling much of that, and for the first year or two, incidents on Pulsar will take longer to resolve because nobody has seen them before.

The ecosystem matters as much. Kafka Connect, Kafka Streams, Flink's Kafka connectors, change data capture tools such as Debezium, and client libraries in every language the company uses are mature and widely used on Kafka. Pulsar has its own IO connectors, Functions and clients, and options for Kafka-protocol compatibility, but we should check, for each client and connector the integration platform needs, whether the Pulsar version is as mature, and whether the compatibility layer supports the features we use, such as transactions and compaction.

4Designing the Proof of Concept

A comparison on paper is a hypothesis; a proof of concept turns it into evidence. It should use production-like numbers, not a demo. Create 30,000 streams in Pulsar, and in Kafka model them both ways, as 30,000 topics and as a few keyed topics, then run the expected peak throughput with realistic record sizes. Measure produce and end-to-end latency at p99, and the time to create a new customer stream.

Then test failures, because that is where platforms differ most: kill a broker and a bookie or Kafka broker under load and measure recovery time and any data loss. Measure region replication lag at peak and during a network partition between regions. Load five years of storage in miniature and calculate the cost from the measured bytes on object storage. Finally, test the per-message acknowledgement path with a slow consumer to see how redelivery behaves.

Step throughFrom proposal to decision
  1. Map requirements to each system
  2. Model Kafka both ways30,000 topics or keyed topics
  3. Load test at peak numbers
  4. Failure testsbroker, storage node, region link
  5. Cost five-year storage from measurements
  6. Add cost of running a second platform
  7. Decide on measured results

7 steps in order. Play them, or step through them one at a time.

5Making the Decision

If Kafka with keyed topics meets the latency and isolation needs, share groups are mature enough for the queue-style consumers, and MirrorMaker 2 meets the replication lag target, the existing platform wins, because the cost of a second platform is large and permanent. If the proof shows that the customer streams genuinely need per-stream policies at a scale Kafka handles poorly, or that per-message acknowledgement is central and Kafka's support is not ready, Pulsar may be worth it, but then it should be adopted as a supported platform with a team, not as one project's private cluster.

Either way, the decision should be written down with the measured numbers and the assumptions behind them, so that it can be revisited when Kafka's share groups mature or when the workload changes.

6Follow-up questions

Could the company run Pulsar only for this platform and keep Kafka elsewhere?

Yes, but only with eyes open. Two platforms mean two sets of on-call skills, upgrades, security reviews and monitoring. If the integration platform is large and long-lived, that can be justified; if it is one team's project, the platform will likely end up under-supported.

Why not just create 30,000 topics in Kafka and see?

We should measure it, but also ask whether we need it. KRaft raises the practical partition limit, yet every partition still costs memory, files and recovery time. If the streams share a format and access pattern, keyed topics give the same ordering per customer with far fewer partitions.

What about Pulsar's Kafka protocol support?

It can let existing Kafka clients talk to Pulsar, which eases migration, but compatibility is rarely complete. Test the exact clients and features in use, especially transactions, compaction and consumer group behaviour.

7Conclusion

In this answer, we compared Pulsar and Kafka 4.x requirement by requirement: Pulsar's separate storage layer makes many topics, per-message acknowledgement and geo-replication native, while Kafka covers the same needs with keyed topics, share groups, MirrorMaker 2 and tiered storage. We then weighed operational cost, skills and ecosystem, which favour the existing platform, and designed a proof of concept with production numbers and failure tests. The decision rests on measured results plus the full cost of running a second platform.

What to say in the interviewAbout 80 seconds aloud

Open with

I would evaluate it requirement by requirement rather than system against system. Pulsar has real strengths here: tenants and namespaces with policies, very many cheap topics because brokers are separate from BookKeeper storage, shared and key-shared subscriptions for per-message acknowledgement, built-in geo-replication and offload to object storage.

Then, if they want more

Kafka 4.x covers most of the same ground: tiered storage for the five-year history, share groups for queue-style consumption, though I would check their maturity in our version, and MirrorMaker 2 or vendor linking between regions. The sharpest difference is topic count.

In Kafka each partition is a log on a broker, so I would ask whether 30,000 streams really need to be topics or can be fewer topics keyed by customer.

Then I would weigh operations and ecosystem: Pulsar adds brokers, bookies and a metadata store that our team has never run, while our Kafka platform, tooling, on-call and security model already exist, and Kafka Connect, Streams and clients in all our languages are mature.

Finally I would run a proof of concept with production numbers: 30,000 streams, peak throughput, broker and storage failures, region replication lag and the five-year storage cost, and decide on those results plus the cost of running a second platform.

About this answer

Last updated
13 November 2026
Versions it names
Kafka 4.0
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Official documentation
Apache Kafka documentation
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "How do you evaluate the choice, and what would you test before deciding?": https://scrivio-interview-library.netlify.app/spring-boot/kafka-design/5b23cb29f7/