Assume 1B daily active users
Read QPS: 1B / 100k = 10k
Peak read QPS: 2 * 10k = 20k
Assume 10% user are editing files
Write QPS: 1B * 10% / 100k = 1k
Peak write QPS: 2 * 1k = 2k
Storage usage:
Assume each user will write average 100kb daily. So the daily storage usage is 1B * 100kb = 100TB. Yearly storage usage is 400 * 100TB = 40PB. Each data will need 3 replicas. The the total yearly storage needed is 3 * 40PB = 120 PB.
GET getUserFiles(userId, folderId)
GET getFileMetadata(userId, fileId)
POST uploadFile(fileId, fileChunks)
GET downloadFile(fileId, fileChunkId)
WebSocket API for cooperate editting:
From client to server:
editFile(fileId, editDetailInfo)
From server to client:
editFile(fileId, editDetailInfo)
See Diagram
See Diagram
See Diagram
See Diagram
See Diagram
Our non-functional requirements for the proposed system design are scalability, fault tolerance, availability, and low latency. Let’s discuss how the proposed system fulfills these requirements:
What are some future improvements you would make? How would you mitigate the failure scenario(s) you described above?