TTFB 540ms -> 70ms with a 30s cache layer
A pricing widget hit an upstream currency API on every request: 420ms median, 1,100ms p95.
— Added Redis cache, 30-second TTL, on the currency response.
— Cache hit ratio: 99.4%. Upstream calls per minute: 4,200 -> 24.
Before | After
p75 TTFB: 540 | 70
p95 TTFB: 1,180 | 95
Upstream cost: -99%
Takeaway: a 30-second cache cut p95 TTFB by 1,085ms — the price barely moves in 30s anyway.
Millisecond Mafia
@MillisecondMafia
TTFB 540ms -> 70ms with a 30s cache layer
Этот пост опубликован в Telegram-канале Millisecond Mafia. Подписаться можно по ссылке: @MillisecondMafia.