SD-54 · ADS MANAGEMENT AND DELIVERY · INTERACTIVEBreak it.
Break it.
Then fix it.
Turn up the feed traffic, watch what melts, and add the parts a real ads system needs. Every switch is a decision you would defend in an interview.
CHALLENGEServe 300K ad requests/s with p99 under 80 ms, no dropped requests or events, and every impression billed exactly once.
StatusDOWNAt 50K ad requests per second
Ad decision p99500+ msTarget under 80 ms
Dropped58%About 2% of impressions billed twice
Monthly cost$86,000Mostly the 50-GPU ranking fleet
Feed serviceLIVE
50K ad requests/s · 70K impressions/straffic source
Event collectorOK
Impression and click beacons71K events/s
Ad servers × 15OK
Targeting index in memory50K / 75K req/s
Campaign DBOK
Read by the index buildera snapshot every 5 s
Ranking modelDOWN
2,000 ads scored per request100M / 100M scores/s
Budget serviceDOWN
Counter per impression70K / 50K ops/s
Billing ledgerDOWN
A row per event71K / 30K writes/s
The ranking model is scoring too much. Scoring 2,000 candidates with the heavy model for every request needs 100M scores a second. Let a cheap model keep the best 200, and run the heavy one only on those.
80 msAd decision budgetThe feed waits for the ads, so the whole auction must be fast.
5MActive adsMatched in memory, then cut to 200 before the heavy model.
420KImpressions/s at peakEach one spends money, so each must count exactly once.
< 1%Allowed overspendLeased slices keep spend close without a hot counter.
Want the reasoning behind every switch?Visual walkthroughFull write-up
Was this lab useful?Your vote tells us what to improve next.