Design iCloud Backup With Chunk-Level Deduplication and Client-Side Encryption
Last updated: November 29, 2026
Quick Overview
Design the system that backs up hundreds of millions of iPhones nightly to iCloud, uploading only changed data, encrypting on device, and supporting fast restore to a new phone.
Apple
November 29, 20260
0
0 solved
Design the system that backs up hundreds of millions of iPhones nightly to iCloud, uploading only changed data, encrypting on device, and supporting fast restore to a new phone.
iCloud Backup runs when phones are charging on Wi-Fi, so load is diurnal and enormous. The interviewer looks for content-defined chunking, manifests, encryption that still allows dedup within an account, and a restore path that gets the user using the phone quickly.
What the Interviewer Expects
- Uses content-defined chunking so small edits do not shift every chunk
- Builds a per-snapshot manifest that references content-addressed chunks
- Explains encryption choices and why cross-user dedup conflicts with privacy
- Separates metadata service from blob storage and handles garbage collection with reference counts
- Designs a prioritized restore so the phone is usable before all media is down
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
- How would Advanced Data Protection (keys only on device) change the design?
- How do you garbage-collect chunks safely when snapshots expire?
- How would you smooth the 2 a.m. upload peak across time zones?
- How do you resume a backup interrupted by the phone leaving Wi-Fi?
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
Functional: nightly incremental backup of app data, settings, and messages; keep last few snapshots; restore onto a new device. Non-functional: 500M+ devices, average 5 to 50 GB each; upload only delt...
High-Level Design
- Client agent: walks changed files (using file system change tracking), splits them with content-defined chunking (rolling hash, average 1 MB chunks), hashes each chunk, encrypts with a key deriv...