Edge of Glory
Edge of Glory
@EdgeOfGloryCDN

A Lagos news site where every breaking story crashed the origin

When a big story dropped, traffic spiked 30x in minutes. The article page cached for 60 seconds — but at expiry, thousands of simultaneous requests all missed at once and stampeded the origin. The PHP backend tipped over, and readers got 502s exactly when the story mattered most.

The TTL wasn't wrong. The thundering herd was.

What we changed: enabled stale-while-revalidate with a 30s fresh window and a 24h stale window, plus origin request coalescing so only one request per object revalidated while everyone else got the cached copy instantly.

During the next major story, origin requests-per-second peaked at 9 instead of an estimated 4,000. Readers saw content in 40ms with zero 502s. The backend never crossed 20% CPU.

The number that mattered: origin RPS capped at 9 during a 30x spike.
This post was published in the Telegram channel Edge of Glory (@EdgeOfGloryCDN). All its posts are on the channel page.
Open on Telegram

Latest posts in “Tools and infrastructure”

All channels in this category →

реклама в сети

Готовы запустить рекламу через сеть public.tg?

Новый оффер, продукт, GEO, кейс, событие или партнёрский запуск — соберём маршрут под задачу и отдадим медиаплан.

Telegram для медиаплана: @AFFtop_connect. Быстрый тест: $20 за канал, $1000 за пакет по сети.