What It Costs When It Fails
TTFB is the time between a browser sending a request and receiving the first byte of the response. It measures server processing time, network latency, and infrastructure efficiency in a single number. A high TTFB cannot be fixed with CDNs, image compression, or JavaScript optimisation. It requires fixing the server. Most hosting providers do not discuss TTFB because their numbers are not good.
Time to First Byte (TTFB) is the duration between a client making an HTTP request and receiving the first byte of the server response. It is a composite measurement that includes DNS resolution time, TCP connection establishment, TLS handshake time, server processing time, and network transit time. Of these, server processing time is the one that hosting infrastructure directly controls.
TTFB is the most honest measure of hosting quality because it cannot be gamed by frontend optimisation. A CDN can reduce the time assets take to reach users. Image compression can reduce the amount of data transferred. JavaScript optimisation can reduce the time the browser spends executing code. None of these affect TTFB. TTFB is a direct measurement of how quickly the server processes a request and begins sending a response.
What Drives TTFB
Server processing time is the primary driver of TTFB for dynamic applications. It includes PHP execution time, database query time, cache lookup time, and any external API calls made during request processing. Reducing TTFB requires reducing each of these components: faster PHP execution through opcode caching and efficient code, faster database queries through indexing and query optimisation, higher cache hit rates through proper caching architecture, and elimination or caching of external API calls in the critical path.
"What is our current TTFB measured from our primary user geography, and what is your target TTFB for our infrastructure?"
HostRoman targets TTFB under 200 milliseconds for all managed environments, measured from the primary user geography. We track TTFB continuously using synthetic monitoring and alert on any degradation above 300 milliseconds. TTFB is the first metric we review when investigating performance complaints. We publish our methodology for measuring it.