The interview problem
Send one useful daily digest per user from many events, respecting time zones and preferences without duplicating content after retries.
Original practice, not a reported company interview. Scenarios and numbers are illustrative. Interview date: not applicable. Sources retrieved October 1, 2026.
1. Scope and worked approach
Assume explicit user delivery preferences and a durable event log. Define a digest window using the user's calendar rule and snapshot eligible event IDs into a versioned digest record. Deduplicate logical events before ranking and grouping. At send time, recheck subscription and sensitive-content access, then use an idempotent delivery record. Late events follow a stated next-digest or correction policy; do not reopen already sent content silently.
2. Trace the design or derivation
Close user window → deduplicate events → rank and group → recheck preferences → record delivery
Separate digest identity from delivery-attempt identity. A provider timeout should trigger reconciliation or a retry using the same logical digest key, not create a new digest. For users changing zones, anchor the next scheduled window to the last completed business window under an explicitly documented migration rule.
3. Calculate the example
For 100,000 users averaging 20 eligible events, assembly examines about two million event-user candidates. If grouping reduces each digest to five items, that is 500,000 displayed items, not evidence that 1.5 million events were delivered individually. A daylight-saving transition can make a local calendar day differ from 24 elapsed hours.
4. Failure cases and trade-offs
Updating preferences after assembly but before send must still prevent unwanted delivery. Retried sends can duplicate messages if provider identity is lost. Waiting longer improves completeness but delays the digest. Storing a rendered snapshot improves auditability at extra retention and access-control cost.
5. Validation, follow-ups and self-review
Test duplicate/late events, preference revocation and local-day boundaries. Compare candidate and displayed counts. Follow-up: how does a user who changes time zones avoid two digests? Reward stable windows, send-time checks and explicit late-event semantics.
Sources and related practice
Technical reference: www.w3.org — Calendar windows and timezone distinctions; digest state machine is original.
Source publication/update: Not established. Retrieved October 1, 2026. The workflow, calculations and review exercises are original; this reference is not evidence that a company asked this question.
Continue with Design a notification delivery service; Agree on daylight-saving behavior for scheduled jobs.
Continue your preparation
Choose a connected learning path or browse more System design questions. Read our editorial method and attribution policy.