Microcaching a logged-out homepage for 10 seconds
A media site in Chicago insisted its homepage couldn't be cached, it changed too often, so every one of 90,000 logged-out visitors per hour hit a PHP origin that rendered the same page 90,000 times. Origin lived at 95% CPU during traffic peaks.
We microcached the logged-out HTML for just 10 seconds at the edge. The page still felt live, content was at most 10 seconds stale, but origin now rendered it 6 times a minute instead of 25 times a second.
Origin requests for the homepage fell 99.3%. Origin CPU dropped from 95% to 30% at peak. Edge-served homepage TTFB went from 240 ms to 18 ms. Logged-in users still bypassed cache entirely, untouched.
The number that mattered: 360 renders an hour, down from 90,000.
Edge of Glory
@EdgeOfGloryCDN
Microcaching a logged-out homepage for 10 seconds
Этот пост опубликован в Telegram-канале Edge of Glory. Подписаться можно по ссылке: @EdgeOfGloryCDN.