Day 37 10 min
Caching a news site
1 / 6 · ≈ 15 min left
The problem
9:02 p.m. A minister resigns. The newsroom publishes a short article at 9:03 and puts it at the top of the front page. Within a minute, 50 000 people per second load that front page.
The page is built by a CMS that takes 150 ms per page and runs on 6 servers. Without a cache, those 6 servers would have to build 50 000 pages per second.
With a cache that keeps pages for an hour, the servers stay idle, but readers see the old front page until 10 p.m. The editor-in-chief wants new stories on screen within 30 seconds.