Weather API
A public forecast API where caching is the whole product.
Answer a hurricane-driven query storm from cache while the provider store fails and recovers slowly.
Weather data only changes every ~10 minutes, so caching is the whole product: millions of clients can share the same answer. The trap is the miss path — when a hurricane makes landfall, everyone asks about the same region at once, and if the cache is thin the forecast store takes the full storm.
Components in play
- API gateway — Auth, rate limits, and routing for every API key.
- Forecast cache — Serves identical answers to identical questions — the product.
- Forecast service — Assembles a forecast on a cache miss.
- Forecast store — Model output ingested from the weather provider.
Graded on these SLOs
- ≥ 99.00%Queries succeed
- ≤ 90 msQuery p99
- ≥ 6.0k rpsSustain the queries
- ≤ 85%Gateway headroom
- ≤ 7Lean footprint
The brief
Design a public weather API. Apps and partners query current conditions and forecasts by location; the underlying data refreshes only every ~10 minutes, so millions of queries can share the same answer. The test is the storm: when a hurricane makes landfall, everyone asks about the same region at once — and your provider store picks that moment to fail.
Functional
- Current conditions + forecast by location
- API keys with per-key rate limits
- Ingest fresh model data from the provider every ~10 minutes
Non-functional
- Low-latency reads — the API sits on other people's hot paths
- High availability, especially during severe weather
- Slightly stale data (minutes) is acceptable
Warm-up: design decisions
Optional theory to prime the calls a senior engineer would make before you build.
Solving is a Pro feature
Unlock the on-canvas AI design coach, per-run design reviews, the chaos simulator and all 12 problems for $15/month.
- AI design coach on your canvas — pins failure points & over-engineering
- Honest AI design review on every run
- All 12 problems + unlimited chaos simulator
- Points, levels & leaderboard