Try
↑ ↓ move↵ openesc close

Interview prep / Delivery guarantees

Junior · Delivery guarantees · System design interview question

What do at-most-once, at-least-once and exactly-once delivery mean?

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

A strong answer

At most once: a message is delivered zero or one times. It may be lost, and it is never repeated. At least once: a message is delivered one or more times. It is never lost, and it may be repeated. Exactly once: the effect of each message happens once.

At-most-once comes from acknowledging before the work. At-least-once comes from acknowledging after the work, with redelivery on timeout. Exactly once cannot be had from delivery alone and is built on top of at-least-once.

Concrete cases make the difference clear. A metrics sample can tolerate loss. A payment tolerates neither loss nor repetition.

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