Practice: Design Google Drive
Cloud file storage and sharing platform supporting upload, download, sync, and collaboration for billions of files across devices.
Build this system yourself on the canvas below. Add components, connect them, and run traffic simulations to see where your design holds up and where it breaks.
Functional requirements
- Users can upload files of any size from web, mobile, and desktop clients.
- Large files are split into chunks and uploaded in parallel via a resumable protocol.
- Users can download files from any device; downloads are accelerated by a CDN.
- Files are organised into nested folder hierarchies with inherited permissions.
- Users can share files or folders with others using role-based access (owner, editor, commenter, viewer) or via expiring shared links.
- File changes are synchronised across all connected devices in near real time.
- Every file version is retained; users can browse history and restore any prior version.
- Users can search for files by name, type, and full-text content.
- Post-upload processing — thumbnail generation, virus scanning, search indexing — runs asynchronously without blocking the upload response.
- Deleted files are moved to Trash and can be recovered within a configurable retention window before permanent deletion.
Non-functional requirements
- Durability: file bytes must be stored with 99.999999999% (11-nines) durability using multi-AZ replication in object storage.
- Availability: the service must achieve 99.99% uptime; no single component failure should make files inaccessible.
- Scalability: the upload and download paths must independently scale to serve 1 billion+ files and millions of concurrent users.
- Performance: file listing and metadata reads must complete in under 100 ms (p99) for cache-warm requests; CDN-served downloads must complete in under 200 ms (p99) globally.
- Latency: ACL permission checks must add no more than 5 ms to any file operation, served from an in-memory cache.
- Resumability: interrupted uploads must be resumable from the last successful chunk for up to 24 hours without restarting.
- Consistency: metadata operations (rename, share, delete) must be strongly consistent; search index and thumbnail delivery may be eventually consistent within 30 seconds.
- Security: all data must be encrypted in transit (TLS 1.2+) and at rest (AES-256); access tokens must be short-lived and rotated; all file accesses must be authorised against ACLs.
- Isolation: virus-scanning workers must execute in isolated sandboxes; a compromised file must not affect other users' data.
- Geo-distribution: files must be downloadable from edge nodes closest to the user; cross-region replication must tolerate a full regional failure with no data loss.
- Observability: all upload, download, share, and delete events must be logged with user ID, timestamp, and outcome for audit and compliance.