0 day streak
Anonymous · shared experience20 Mar 2026 · 5 views

MongoDB: Alert when migrated records miss a lag deadline

Interview question #MongoDB SDE 3 / Senior Other

Problem. Records are being migrated from a primary database to a second datastore. An event fires when a record leaves the primary and another when it arrives in the target. The maximum acceptable lag is k seconds. Build a verifier that raises an alert for any record that has left the primary but has not shown up in the target within k seconds.

Format. A one-hour practical round, described from memory by the candidate, aimed at a real problem rather than a puzzle.

What to think about. Tracking in-flight records keyed by id, ordering them by deadline (for example a queue or min-heap on departure time), clearing entries when the arrival event comes in, and checking expired deadlines on a timer. Arrival events that come before departure events, or never come at all, are worth raising.

The candidate felt this round went less well than the others and rated it a lean hire.

0 comments

Comments 0

No comments yet. Ask the author something, or add what happened in your own round.