Design Conflict Handling in the OneDrive Sync Client Across Devices
Last updated: November 29, 2026
Quick Overview
Design how the OneDrive sync engine keeps a folder consistent across a user's laptop, desktop and the cloud, detecting changes efficiently and resolving conflicts when the same file is edited offline on two machines.
Microsoft
November 29, 20260
0
0 solved
Design how the OneDrive sync engine keeps a folder consistent across a user's laptop, desktop and the cloud, detecting changes efficiently and resolving conflicts when the same file is edited offline on two machines.
OneDrive interviewers want depth on sync protocols, which are subtle. They check change detection on the client, a cloud delta feed with cursors, version tracking (eTags), and conflict policy that never loses user data.
What the Interviewer Expects
- Detects local changes using file system notifications plus periodic reconciliation
- Uses a server delta API with a cursor to fetch remote changes
- Tracks a per-file version (eTag) to detect concurrent edits
- Never silently overwrites: keeps both versions on conflict
- Handles renames and moves as metadata operations
- Uploads large files in resumable chunks with dedup
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- The user renames a folder on one machine while editing a file inside it on another. What happens?
- How do you know whether a local file changed while the sync client was not running?
- When can you auto-merge instead of creating a conflict copy?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Users sync up to hundreds of thousands of files. Devices go offline for days. Changes on any device should appear elsewhere within a minute when online. A conflict must never lose data. Office files c...
High-Level Design
Cloud: a metadata service holds the namespace (item id, parent id, name, eTag, content hash) and provides delta(cursor) returning changed items since the cursor. Content goes to blob storage. **...