Weather service inspired by Weather.com and Apple Weather: stations and partners push observations, forecasts are cached and served from the CDN edge, and severe alerts go out through a background queue.
See why querying the database on every forecast request does not scale.
What was missing: A forecast should not be recomputed or re-read for every request.
Why that's risky: Millions of people ask for the same few thousand cities, so the database re-reads identical data thousands of times a second.
What gets added: One server that reads a city's forecast from the database on every request and stores new observations.
Trade-offs: Always the latest data, at the cost of throughput.
Separate reads from updates and serve forecasts from memory.
What was missing: Reads and observation updates share one path and every request hits the database.
Why that's risky: Cached forecasts go stale as new observations arrive, and an expiry of many cities at once stampedes the database.
What gets added: A forecast service reading from a cache keyed by city, a separate observation service for station updates, and a forecast database as source of truth.
Trade-offs: A forecast one minute old is fine, which is why caching is a good fit here and not for banking.
Serve popular cities from the edge so a storm never reaches our servers.
What was missing: Every check still reaches our servers, and storms make everyone check at once.
Why that's risky: At the edge a forecast cannot be fresher than its TTL, which matters during a fast-moving storm.
What gets added: A CDN serves each city's forecast from the edge for about a minute.
Trade-offs: Cache time trades freshness for load; a one-minute TTL is invisible to users but cuts origin traffic by about 95%.
Send severe weather alerts in the background and watch the system.
What was missing: Severe alerts are not sent and bad clients or partners can overload the service.
Why that's risky: If alerts were sent inside the observation request, a storm warning could block new observations.
What gets added: An alert queue with workers that notify people in the affected area, a rate limiter on clients and partner pushes, and monitoring.
Trade-offs: Alerts are asynchronous, so they arrive within a minute or two, not instantly.
You're in the middle of an interview session. Leaving now will end your current attempt.
Explore concept overviews, real-system examples, key tradeoffs, and interview talking points for each roadmap section.
You've conquered this phase. These are the skills you now own: