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 → Route users.
DDoS → Stop attacks.
WAF → Filter malicious requests.
CDN → Reduce latency.
IdP → Authenticate users.
API Gateway → Manage APIs.
Load Balancer → Balance traffic.
Weather Service → Run business logic.
Location Service → Manage locations.
Notification Service → Send alerts and sever weather notifications.
WebSocket → Push real-time updates.
Queue → Process asynchronously.
Worker → Execute background jobs.
Redis → Cache data.
NoSQL → Store application data.
S3 → Store historical files.
Analytics → Generate insights.
NAT Gateway → Provide outbound Internet access.
External Provider → Provide weather data
to handle duplicates idempotency
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.