Skip to content
SD-36 · WEATHER APP · INTERACTIVE

Break it.
Then fix it.

Turn up the traffic until a storm hits, and watch what gives way first: your servers, or the weather provider’s cap. Every switch is a decision you would defend in an interview.

CHALLENGEServe 200K forecast requests/s with p99 under 200 ms, no errors, and the provider under its cap.
StatusDOWNAt 50K requests per second
p99 latency500+ msTarget under 200 ms
Provider calls45K/sCap 2,000 a second
Errors95.6%Requests being dropped
Monthly cost$11,702,870Provider billed per call
PhonesLIVE
50K forecast requests/s
exact lat/lon, all unique
Load balancerOK
Autoscales API servers
spreading 50K/s
API servers × 15OK
Stateless
50K / 75K req/s
Forecast cacheOK
10% hits
50K / 1M ops/s
Weather providerDOWN
Called on every miss
45K / 2K calls/s
The cache keys never repeat. Every phone sends a slightly different latitude and longitude, so only 10% of requests hit the cache. Snap positions to 5 km grid cells, as precise as the forecast data.
5 kmGrid cellAs precise as the forecast data, and it makes every phone in a cell share a key.
2,000/sProvider capCalling it per miss passes the cap at the morning peak.
80%CDN hit rateCell URLs cached until the next update absorb storm spikes.
32 GBAll forecastsEvery cell, two versions. The data is small; the keys are the hard part.
Want the reasoning behind every switch?Visual walkthroughFull write-up
Was this lab useful?Your vote tells us what to improve next.