What is Time to First Byte?
Also known as: TTFB
Time to First Byte (TTFB) measures the duration between an HTTP request and the receipt of the first byte of the response, reflecting server processing and network latency.
TTFB is a performance metric that records the interval from when a client sends an HTTP request to when it receives the first byte of the response. It includes all delays between client and server: DNS resolution, TCP connection setup, TLS handshake, server processing time, and network round-trip time. The measurement stops at the moment the client begins receiving data, not when the full response has loaded.
TTFB is calculated as the sum of three components: (1) network latency, (2) server processing time (queue, application logic, database queries), and (3) any intermediate proxy or CDN latency. In a standard web page load, the browser's Navigation Timing API exposes this as the responseStart minus the requestStart timestamp. A low TTFB (under 200 ms) indicates a responsive server with minimal network delay; higher values (above 500 ms) often point to backend bottlenecks, slow geographic routes, or misconfigured infrastructure.
In the CDN and performance monitoring stack, TTFB serves as an early indicator of back-end health. A CDN can reduce TTFB by caching responses at edge nodes, terminating TLS geographically close to the user, and reducing origin server round trips. However, TTFB alone does not measure page render time or user-perceived load, and it must be interpreted alongside other metrics like First Contentful Paint. Many performance tools track TTFB across percentiles to isolate outlier requests or regions.
Key facts
- TTFB includes DNS, TCP/TLS, and server processing time, not just network round trip.
- The Web Vitals initiative does not officially define TTFB as a Core Web Vital, but it is a recommended field metric.
- Google recommends a TTFB under 200 ms for good server responsiveness.
- Navigation Timing API exposes TTFB as performance.timing.responseStart minus navigationStart.
- High TTFB after a CDN suggests the origin server or network path is the bottleneck, not the edge.
How it works in practice
Related terms
References
More in CDN & Performance
Apdex Score
The Apdex Score is a standardised metric that measures user satisfaction with application performance by comparing response times against predefined target and tolerable thresholds.
Bandwidth Throttling
Bandwidth throttling is the intentional reduction of data transfer speed by a network operator or service provider to manage congestion, enforce usage policies, or control costs.
Brotli Compression
Brotli is a lossless compression algorithm developed by Google, offering higher text compression ratios than gzip, used by CDNs to reduce page load times.
Cache Hit
A cache hit occurs when a requested resource is found in a CDN edge cache and served directly to the client, bypassing the origin server entirely.
Cache Invalidation
Cache invalidation is the explicit removal of stored web objects from a cache so that new requests must revalidate or refetch them from the origin server.
Cache Miss
A cache miss occurs when a requested resource is not found in a CDN or proxy cache, forcing the request to be forwarded to the origin server and then storing the response for future requests.
CDN
A CDN (Content Delivery Network) is a geographically distributed network of proxy servers and data centers that deliver web content to users from the nearest edge location, reducing latency and offloading origin servers.
Core Web Vitals
Core Web Vitals are a set of three real-world user experience metrics (LCP, INP, CLS) defined by Google to quantify loading, interactivity, and visual stability on web pages.
Cumulative Layout Shift
Cumulative Layout Shift (CLS) is a Core Web Vital metric that measures the sum of all unexpected layout shift scores during a page's lifespan, quantifying visual stability.
Edge Computing
Edge computing is a distributed computing model that processes data and runs application logic at Points of Presence (PoPs) close to end users, minimizing round-trip latency and bandwidth usage compared to centralized cloud regions.