What is TTFB?

TTFB measures how long it takes for a browser to receive the first byte of data from your server. CloudSonic's stack is tuned to minimise TTFB through Nginx, Redis caching, and edge delivery.

CloudSonic
CloudSonic
Last Updated September 10, 2026

TL;DR TTFB

TTFB stands for Time to First Byte and it measures the time that elapses between a browser sending a request for a web page and receiving the very first byte of the response from the server. It is one of the earliest and most fundamental indicators of web server performance. A high TTFB means something is slow before the browser has even started downloading the page, whether that is a slow server, an overloaded database, unoptimised PHP, or long network travel times. A low TTFB means the server responded quickly and the browser can start rendering the page sooner. Google measures TTFB as part of its Core Web Vitals assessment through the Largest Contentful Paint metric, so it has a direct impact on your search rankings. CloudSonic's stack is tuned specifically to minimise TTFB through Nginx, Redis object caching, NVMe storage, and edge caching working together.

How TTFB Is Measured

TTFB is measured from the moment a browser sends an HTTP request to the moment it receives the first byte of the HTTP response. This time period encompasses several distinct phases. First is the DNS lookup time, the time taken to resolve the domain name to an IP address. Second is the connection time, the time taken to establish a TCP connection and complete the TLS handshake for HTTPS connections. Third is the server processing time, the time the server spends actually generating the response, which for a WordPress page includes bootstrapping PHP, querying the database, and rendering the template. The first byte arrives when the server has finished processing and begins streaming the response. Of these three phases, server processing time is typically the largest and the most directly influenced by hosting infrastructure quality. DNS lookup time is improved by using a fast DNS provider like Cloudflare, and connection time is improved by HTTP/3 and TLS 1.3 which reduce handshake round trips.


# Measure TTFB and all connection phases with curl
curl -o /dev/null -s -w "\
DNS lookup:        %{time_namelookup}s\n\
TCP connect:       %{time_connect}s\n\
TLS handshake:     %{time_appconnect}s\n\
Time to first byte:%{time_starttransfer}s\n\
Total time:        %{time_total}s\n" \
https://cloudsonic.com.au

# Output example:
# DNS lookup:         0.012s
# TCP connect:        0.031s
# TLS handshake:      0.078s
# Time to first byte: 0.091s
# Total time:         0.143s

Why TTFB Matters for Your Website

TTFB is the starting gun for everything else that happens in a page load. No rendering, no asset loading, no interactivity can begin until the browser receives that first byte. A high TTFB delays everything downstream regardless of how optimised the rest of the page is. You can have perfectly compressed images, efficient JavaScript, and a lean stylesheet, but if the server takes two seconds to respond, the visitor stares at a blank page for two seconds before any of those optimisations can take effect. Google measures TTFB as a component of Largest Contentful Paint, the primary Core Web Vitals metric, which means a high TTFB directly penalises your search rankings. A good TTFB is under 200 milliseconds at the server level before network transit is added. Achieving this requires fast server hardware, efficient application code, effective caching with Redis, and delivery through a CDN with edge caching to minimise the distance between the server and the visitor.

Frequently Asked Questions on TTFB

What is a good TTFB for a WordPress site?

Google considers a TTFB under 800 milliseconds as acceptable for Largest Contentful Paint purposes, but a well-configured WordPress site should be achieving server-level TTFB well under 200 milliseconds before network transit is added. With edge caching serving cached pages from nearby edge nodes, effective TTFB for cached pages can be under 50 milliseconds for many visitors.

Why is my TTFB slow even though my server is fast?

A slow TTFB despite fast hardware almost always points to application-level inefficiency rather than infrastructure. Common causes include a large number of database queries per page load from too many plugins, unoptimised database queries from missing indexes, external HTTP requests made during page generation to third party APIs, and PHP code that does expensive processing on every request. Redis object caching eliminates the database query problem. Profiling tools like Query Monitor can identify the others.

Does TTFB affect all visitors equally?

Server processing time, the largest component of TTFB, affects all visitors equally because it happens before the response leaves the server. Network transit time varies by visitor location, which is why CDN delivery and edge caching improve effective TTFB for international visitors so significantly. The DNS lookup component also varies by visitor depending on their DNS resolver's cache state.