Myth: A CDN fixes slow TTFB
Added CDN: TTFB 620ms -> 600ms. Expected sub-100ms. Why?
TTFB (time to first byte) = network RTT + server think-time. A CDN cuts network distance, not your origin's database/render time.
— If 540ms of that 620ms is uncached PHP rendering, the CDN only trims the ~80ms transport leg.
— Cache the HTML at the edge and TTFB 620ms -> 90ms. The win is edge-caching the response, not merely fronting it with a CDN.
Uncacheable dynamic HTML behind a CDN stays slow.
Takeaway: only edge-cached HTML drops TTFB; a CDN alone trimmed 20ms.
Millisecond Mafia
@MillisecondMafia
Myth: A CDN fixes slow TTFB
Этот пост опубликован в Telegram-канале Millisecond Mafia. Подписаться можно по ссылке: @MillisecondMafia.