Try
↑ ↓ move↵ openesc close

Interview prep / Partitioned logs

Senior · Partitioned logs · System design interview question

Your team wants to rebuild a derived table by replaying a topic from the start. What do you check before doing it?

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

A strong answer

First, retention. The log holds only what its retention window keeps. If the history you need was deleted, replay cannot recover it, and a compacted or archived copy is needed.

Second, side effects. Consumers that act on messages, such as sending email, must not repeat effects during a replay. Use a separate group for the rebuild, with output going to a new table, and switch over when it has caught up.

Third, capacity and ordering. A replay competes with live traffic, so throttle it. Keys must stay in order, and the code has to handle old message formats. All of this works because a log does not delete messages on read.

Sources

Learn it by running it

The partitioned logs 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