You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Identify core features (e.g., "Users should be able to post tweets"). Prioritize 2-3 key features.
users can start/stop/pause their activity (runs/rides)
users should be able to check the activity data (route, distance, time etc) when running /riding
users should be able to check history records, including friends
Non-Functional Requirements
Focus on system qualities like scalability, latency, and availability, consistency, security, durability, fault tolerance. Quantify where possible (e.g., "render feeds in under 200ms").
the system should be highly available
the app should work offline when no Internet
the stats should be accurate
should support 10m concurrent users
Capacity Estimation
Skip unnecessary calculations unless they directly impact the design (e.g., sharding in a TopK system).
route GPS data estimation: 100m DAU, 10m concurrent users, collect interval 5 secs, 30 min activity per day will generate 30 x 60 / 5 = 360 records, so around 36,000m records per day, each record we have around 40 Byte.
Storage: 36,000m x 40 = 1440GB per day. 1500G x 360 = 180000x3G = 540000 GB = 540 TB
QPS 3600m / 100k = 36k
Core Entities (2 mins)
Identify key entities (e.g., User, Tweet, Follow) to define the system's foundation.
user
activity
route
friend
API/System Interface (5 mins)
Define the contract between the system and users. Prefer RESTful APIs unless GraphQL is necessary.
POST /activity -> Activity, create an activity, body {type}
Requirements (5 mins):
Functional Requirements
Non-Functional Requirements
Capacity Estimation
route GPS data estimation: 100m DAU, 10m concurrent users, collect interval 5 secs, 30 min activity per day will generate 30 x 60 / 5 = 360 records, so around 36,000m records per day, each record we have around 40 Byte.
Storage: 36,000m x 40 = 1440GB per day. 1500G x 360 = 180000x3G = 540000 GB = 540 TB
QPS 3600m / 100k = 36k
Core Entities (2 mins)
API/System Interface (5 mins)
[Optional] Data Flow (5 mins)
High-Level Design (10-15 mins)
Deep Dives (10 mins)
No internet connection
We can save data in local db and sync to server later
Support 100 DAU, 10m concurrent users
storage: 540TB/year
QPS: 40k
The text was updated successfully, but these errors were encountered: