What is TTFB (Time to First Byte)?
Answer
TTFB (Time to First Byte) measures the time from when a user initiates a request to when the first byte of the response arrives at the browser. It reflects the combined time for: DNS lookup, TCP connection, TLS negotiation, and server processing time. Good: <800ms. Needs improvement: 800ms–1800ms. Poor: >1800ms. TTFB directly affects all other metrics — a slow server means LCP, FCP, and everything else is delayed. Causes of slow TTFB: slow server-side processing (database queries, API calls), absence of CDN, no response caching, slow hosting region far from users. Fixes: implement server-side caching (Redis, Varnish), deploy to CDN edge nodes, optimize database queries, use edge computing (Cloudflare Workers), use HTTP/2 or HTTP/3 for multiplexing, enable GZIP/Brotli compression, and implement connection reuse. For dynamic pages, even a 200ms TTFB makes a difference at scale.