Free preview

Second Design: Broker, Cluster Manager, Consumer Manager

Why this matters: four components, and the split between them is the design. Notice that the broker does data and nothing else — everything about who may read what, and which broker is alive, lives outside it.

Key takeaway

Four components: the broker (storage and read/write requests), the cluster manager (broker health), storage (consumer and subscription metadata), and the consumer manager (authorization and access).

The architecture

ComponentResponsibility
BrokerHandles message storage and read/write requests
Cluster managerMonitors broker health and manages the cluster, notifying the system of any failures
StorageA relational database storing consumer metadata, subscription info, and retention policies
Consumer managerManages consumer authorization and access

Two design considerations

ConsiderationDetail
AcknowledgmentConfirms successful message storage (producer side) or consumption (consumer side)
Retention timeA configurable message lifespan. The default is seven days, but requirements vary — banking applications may need weeks, while analytical applications may discard data immediately after use

Key takeaway

The broker is intentionally dumb — storage and serving only. Cluster manager handles broker health, consumer manager handles who may read and where they are, storage holds subscriptions and policies. Retention is a capacity, compliance, and recovery-window decision all at once.

Interview signal by level

LevelWhat a strong answer sounds like
L4"Brokers store the messages and consumers read from them."
L5Separates the tiers: "the broker just stores and serves; a cluster manager watches broker health and a consumer manager handles authorization and offsets."
Staff+Names the plane split and the retention consequence: "keeping the broker dumb is a data-plane/control-plane separation — the data path carries no coordination, so control components can restart without touching message flow. And retention isn't just a storage knob: it's the replay window, so it bounds worst-case recovery. A bug found after the retention period can't be fixed by replaying."

Next: how the broker actually stores anything.

Enjoying the preview?

Create a free account to unlock the rest of this course, the in-browser judge, and live AI mock interviews.

Sign up free to continue