<b>The ticket site that crashed every time it sold out</b>
A concert-ticket site set a 30-second TTL on its event pages. Each time the cache expired during an on-sale, 8,000 concurrent users hit the origin in the same second waiting for a fresh fetch — and the origin, busy with real checkout traffic, stalled. Event pages threw 504s exactly when demand peaked.
We switched to <code>stale-while-revalidate</code>. The edge now serves the slightly-stale page instantly to all 8,000 users while one background request quietly refreshes it.
During the next on-sale, origin requests for the event page dropped from ~8,000 per expiry to 1. Page response stayed at 12ms throughout. Zero 504s, and the checkout origin kept its capacity for actual purchases.
The number that mattered: 8,000 concurrent origin hits cut to 1.
Edge of Glory
@EdgeOfGloryCDN
<b>The ticket site that crashed every time it sold out</b>
Этот пост опубликован в Telegram-канале Edge of Glory. Подписаться можно по ссылке: @EdgeOfGloryCDN.