Design a Cloud File Storage Service
Company: Harvey
Role: Software Engineer
Category: System Design
Difficulty: medium
Interview Round: Technical Screen
Design a cloud file storage and collaboration service similar to Google Drive.
The system should support:
- Uploading, downloading, deleting, moving, and renaming files and folders.
- A hierarchical folder structure per user or organization.
- Sharing files and folders with users or groups using permissions such as owner, editor, commenter, and viewer.
- Large file uploads with resumability.
- File version history and restore.
- Synchronization across web, desktop, and mobile clients.
- Search by file name and basic metadata.
- High availability, durability, and security.
Assume the service has tens of millions of users, stores petabytes of data, and must handle high read and write traffic. Describe the high-level architecture, APIs, storage model, metadata model, synchronization strategy, consistency model, scaling approach, and major trade-offs.
Quick Answer: This question evaluates competency in designing large-scale distributed file storage and collaboration systems, covering storage and metadata modeling, API design, synchronization and consistency models, resumable large-file handling, versioning, access control, scalability, availability, durability, and security.