Try
↑ ↓ move↵ openesc close

Interview prep / Delivery guarantees

Mid · Delivery guarantees · System design interview question

A vendor says its broker offers "exactly once". How would you evaluate that claim?

Sketch your own answer first, then compare it with the one below.

A strong answer

Ask what is counted once. A broker can avoid duplicate writes inside its own storage. It cannot control what your consumer does with a message, such as a call to a payment API.

A realistic guarantee is effectively-once: at-least-once delivery plus either idempotent processing or a transaction that commits the result and the read position together. That works where the effect and the position live in the same system, and it stops at the boundary with outside systems.

Probe the boundary: what happens on producer retries, and on a failure during a commit? The end-to-end argument is the reason. Only the application knows what "the same effect" means, so the final guarantee is completed there.

Sources

Learn it by running it

The delivery guarantees lesson explains the mechanism behind this question, and its lab lets you change the parameters and watch the effect.

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms