21. Github
Medium
Design a file hosting and version control service like Github
- Functional Requirements
- Users should be able to push versions of their files to a central store that houses all of their organizations files
- Users should be able to pull the latest changes
- If you try to push a file that has already been changed, you receive an error that you have to pull first
- Users are able to access all files in their organization
- Nonfunctional Requirements
- Fault tolerance required
- P99 for uploading a file can be no worse than 4 seconds
- Only users in an organization can access the files
- Assumptions
- 2 new files are uploaded every push
- 3 files are changed every push
- 1 out of every 5 pushed is blocked by a merge conflict
- All files are text and on average 2kb
- Estimated Usage
- 85 million users
- 400,000 organizations
Seen this question in a real interview before?
Not all editor features are supported on mobile