Dropbox

the educative course seems to have been copied from here: https://chainertech.com/post/system-design-let-s-make-a-cloud-storage

1. Why (Brief)

2. requirements (given + clarified)

  1. users should be able to upload and download their files/photos from any device
  2. users should be able to share files or folders with other users
  3. our service should support automatic syncing between devices (updates on one device should be reflected on all other devices) - broadcasting
  4. the system should support storing large files up to 1 GB.
  5. ACID is required. Atomicity, Consistency, Isolation and Durability of all file operations should be guaranteed.
  6. our system should support offline editing. users should be able to add/delete/modify files while offline, and as soon as they come online, all their changes should be synced.

extended requirements

some design considerations (initial thoughts on the system)

the atomic unit for this system is a chunk.

high level design (how it will work)

  1. user specifies folder as a cloud workspace on their device.
  2. any file/photo/folder place in this folder will be uploaded to the cloud storage
  3. any modifications / deletions will be reflected on the cloud storage
  4. user can specify similar workspaces on all their devices
  5. any changes on one device will be synced to all other devices

what we need to store

what services we need to manager them

an example a high level diagram for dropbox.

![./images/dropbox-high-level.jpg](dropbox, copied from educative.io)

in this instance, a 'block server' is a server that is even more bare metal than an object/file server: it stores data as blocks. a file system / operating system is needed on top of it to manage the data in the block server. think of it as a hdd without a format (it is neither formatted for windows of ios. its just raw hdd.)

when compared to file storage or object storage, block storage has the highest performance and flexibility, at the cost of complexity and cost (block storage is more expensive)

3. capacity estimation and constraints

assumptions

file size references

ref 1 ref 2

ballpark numbers

typeunit
total users500 million
files per user200
avg file size2MB
total files100 billion
total storage200 petabytes

4. System APIs

5. Database Design

6. Basic System Design and Algorithm

7. Data Partitioning and Replication

8. Caching

9. Load Balancing

10. Telemetry (analytics)

11. Security and Permissions