Time to First Byte (TTFB) is the time between a browser requesting a page and receiving the first byte of the response. It is the single clearest signal of how quickly your server, network path and origin infrastructure respond — everything a user sees is gated behind it. If TTFB is slow, no amount of front-end optimization will make the page feel fast, because the browser is simply waiting.
What TTFB actually measures
TTFB is not one thing — it is the sum of several phases that happen before the first byte arrives. Understanding the breakdown tells you where to look:
- DNS lookup — resolving the hostname to an IP address (cached after the first request).
- TCP connection — the three-way handshake to open the socket.
- TLS negotiation — the HTTPS handshake (skipped on repeat connections with session resumption).
- Request-to-response wait — the time the server spends generating the response (application logic, database queries, template rendering) before sending the first byte.
- The last phase is where most slow-TTFB problems live, and it is the part you control most directly.
What is a good TTFB?
TTFB depends on distance, caching and server work. As a practical rule of thumb for a server-side measurement:
- Under 200 ms — excellent, typical of a well-cached page served from a nearby edge.
- 200–600 ms — good for a dynamic page doing real work.
- 600–1200 ms — worth investigating; something is adding avoidable latency.
- Over 1200 ms — a clear problem; users feel the delay and Core Web Vitals suffer.
- Note: a real user's experience also depends on their network and device, so treat any single number as directional, not absolute.
Need help implementing this?
Our certified engineers can assess your environment and build the right solution — free initial assessment, fixed-quote pricing.
Common causes of slow TTFB
Before optimizing, identify the actual bottleneck rather than guessing:
- Uncached dynamic pages regenerated on every request instead of being cached.
- Slow database queries — missing indexes, N+1 query patterns, or an undersized database instance.
- Cold serverless functions or under-provisioned application servers.
- No CDN, so every request travels to a distant origin.
- Chatty upstream calls — the page waits on several sequential third-party or internal API calls.
- TLS handshakes without session resumption or HTTP keep-alive.
An ordered checklist to reduce TTFB
Work top-down — the earlier items usually give the biggest wins for the least effort:
- 1. Put a CDN in front of your origin so cacheable responses are served from an edge close to the user.
- 2. Cache full pages or fragments — a page served from cache skips application and database work entirely.
- 3. Add a Cache-Control policy to static assets and cacheable documents so browsers and the CDN can revalidate efficiently.
- 4. Profile and fix the slowest database queries; add the missing indexes; avoid N+1 patterns.
- 5. Right-size the origin — an under-provisioned server queues requests under load. Validate capacity against real traffic.
- 6. Enable HTTP keep-alive and TLS session resumption to avoid repeat handshakes.
- 7. Move blocking upstream calls off the critical path (async, cache, or precompute them).
- 8. Enable text compression (Brotli or gzip) so the response transfers faster once it starts.
TTFB vs Core Web Vitals
TTFB is a component of the Core Web Vitals story but not the whole picture. Largest Contentful Paint (LCP) includes TTFB plus resource load and render time; a fast TTFB gives LCP a head start but does not guarantee it. Measure TTFB server-side to isolate origin/network latency, and measure LCP/CLS/INP with real-browser field data (RUM) or a lab tool — a server-side check cannot observe what a browser renders.
Measure before and after
Optimization without measurement is guesswork. Establish a baseline, change one thing, and re-measure. Our free Website Performance Analyzer measures the server-side response time for a single fetch and flags compression, caching, HTML efficiency and CDN signals — a fast way to see whether your origin delivery is the bottleneck. For the browser-experienced metrics it cannot measure (Core Web Vitals), it says so honestly rather than inventing a number.
Free tools for this topic
Check your own setup in under a minute
Need Help Implementing This?
Our certified engineers can assess your environment and implement the right solution for your business.
Related Services