Millisecond Mafia
Millisecond Mafia
@MillisecondMafia

stale-while-revalidate cut p75 TTFB from 410ms to 60ms

Most cache strategies force a slow user to wait for revalidation. SWR serves stale instantly, refreshes in background.
— API responses used max-age=0, must-revalidate: every request did a 350ms origin round trip.
— Switched to max-age=60, stale-while-revalidate=600: within the window, edge serves cached copy in ~30ms and revalidates async.
— User-facing TTFB on those routes: 410ms -> 60ms p75. Staleness ceiling: 60s.
— Origin request volume also dropped 70% — fewer revalidations hitting the backend.
The user should rarely pay for freshness. Serve stale, revalidate behind their back.
Takeaway: 60ms p75 TTFB with a 60-second staleness budget.
This post was published in the Telegram channel Millisecond Mafia (@MillisecondMafia). 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 за пакет по сети.