Estimate the scale of the system. Consider daily active users, read/write ratio, storage requirements, bandwidth, and any relevant QPS calculations...
Define the APIs expected from the system. This is your chance to analyze and define the read and write paths so that you can come up with the high-level design...
GET /weather
/weather?city={city_name}{ "city": "Tokyo", "temperature": 22, "humidity": 65, "wind_speed": 12, "uv_index": 5, "timestamp": "2024-01-15T14:30:00Z"}
GET /forecast
/forecast?city={city_name}&days={1-7}GET /search
/search?q={partial_name}POST /alerts/subscribe
/alerts/subscribe{ "city": "Tokyo", "channels": ["push", "email"], "alert_types": ["storm", "heavy_rain", "extreme_temp"], "device_token": "abc123"}
{ "subscription_id": "sub_456" }DELETE /alerts/unsubscribe
/alerts/unsubscribe?subscription_id=sub_456DNS → To route users.
DDoS → To stop attacks early.
WAF → To filter malicious requests.
CDN → To reduce latency.
API Gateway → To manage and route APIs.
Load Balancer → To distribute traffic.
Redis → To cache frequently accessed data.
Database → To persist data.
Queue → To process tasks asynchronously.
Notification Service → To send alerts.
Analytics Service → To collect metrics.
Weather Service → To execute the business logic.
IdP → To authenticate users securely.
Define the data model. Identify the main entities, their attributes, and relationships. Consider the choice of database type (SQL vs NoSQL) and justify your decision based on access patterns...
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.