Brookfield Drive asks you to design file storage that syncs across devices. The fictional scale is 2,000,000 users with 300 files of 2 MB each. Deliver the scope, a storage estimate, a chunk upload contract, a version table, the storage and change paths, a fix for versions committed too early and a conflict policy.
How interviewers level this design
- Junior: stores bytes in object storage and metadata in a database, and notifies other devices of changes.
- Mid-level: uses content-hashed chunks for resumable, deduplicated uploads and commits versions only after chunks exist.
- Senior: designs conflict detection from parent versions, chunk garbage collection and bandwidth limits for large initial syncs.
Brookfield Drive keeps files in step across a customer's laptop, phone and the web. Large files make naive uploads fragile: a dropped connection should not restart a 2 GB upload, and two copies of the same file should not be stored twice. Splitting files into chunks named by their content hash solves both.
The other half is sync. Metadata (which chunks make up version 7 of a file) lives in a database; the chunks live in object storage; a change event tells the user's other devices to fetch the new version. You will size storage, define the chunk upload contract and the version table, draw the paths, and decide what happens when two offline laptops edit the same file.
Store files as content-addressed chunks, commit versions after their chunks exist and keep conflicting offline edits.