Design a Cross-Device Video Resume Service
Design progress synchronization that lets viewers resume a title across devices without losing acknowledged progress.
Problem statement
For this exercise, assume a streaming product needs a cross-device “continue watching” experience on phones, browsers, and televisions. A signed-in viewer can record playback progress, resume a title on another device, mark it completed, and intentionally restart it.
Online and reconnecting devices may send duplicate or out-of-order updates, and device clocks are not trusted for conflict ordering.
The service must keep acknowledged progress durable, prevent an older update from causing a surprising backward jump during the same viewing epoch, and make the continue-watching list agree with canonical progress. A deliberate restart begins a new viewing epoch in which a low position is valid.
Exclude video delivery, recommendations, search, subscriptions, and billing.
What to build
- Accept idempotent progress updates from online and reconnecting devices.
- Return the current resume position and completion state for a viewer and title.
- Resolve duplicate, out-of-order, completion, and deliberate-restart updates predictably.
- Maintain a recent continue-watching list consistent with canonical progress state.
At scale
- For this exercise, assume 100 million daily viewers and 10 million concurrent playback sessions.
- Active sessions send progress about every 30 seconds, yielding roughly 333,000 steady writes per second; design for 500,000 writes per second at peak including retries.
- Serve resume reads under 100 milliseconds at p95 in a viewer's home region and retain 30 days of progress events for reconciliation.
- During a regional failure, resume state may be up to one minute stale, but a failover must not overwrite a newer acknowledged update with an older event. If a viewer presents evidence of a newer acknowledged update, the service must wait for that state or return an explicit stale or unavailable outcome instead of silently regressing.