Case Study
Cutting ad-serving CPU from 97% to under 10%
- AdTech & Media
- High-Load Systems
- Performance Engineering
Context
An ad-tech marketplace matched traffic from thousands of sites with advertiser demand, deciding which ad to serve on every request in real time. At a billion requests a day, the selection algorithm was pinning CPU at 97 to 99% and pointing straight at an ever-growing cloud bill.
We rebuilt the decision path instead of renting our way out of it. The same scale had to run on three dedicated servers, so the algorithm itself had to get cheap.
Impact
CPU cut from 97% to under 10%65,000 requests a second sustained~1 billion requests a day heldWhole platform ran on three servers
Engineering Decisions
- 01Rewrite the ad-selection algorithm for constant-time scoring
- 02Precompute targeting indexes in memory
- 03Embed a custom video player across ~10,000 sites
- 04Hold a billion requests a day on dedicated hardware
1 / 23