What time to first byte measures
TTFB is the time from starting the request to receiving the first byte of the response. It includes four phases, which this test shows separately:
- DNS lookup: turning the name into an IP address. Usually 5-50 ms; slow DNS providers or long CNAME chains add more.
- TCP connect: one round trip to the server. Distance matters: 1 ms across a city, 150 ms across an ocean.
- TLS handshake: one more round trip with TLS 1.3, two with TLS 1.2.
- Server wait: the server building the page: application code, database queries, calls to other services.
Google rates TTFB under 0.8 seconds as good and over 1.8 seconds as poor.
Which part to fix
If server wait dominates, the backend is slow: profile the request, find the slow queries and cache what you can. How to reduce TTFB and finding slow database queries walk through it, and APM shows which call in a request takes the time.
If connect and TLS dominate, the server is far from the visitor: put a CDN in front, or serve from a region closer to your users. If DNS is slow, use a faster DNS provider and avoid chains of CNAMEs.
Lab numbers and real users
This test runs from one server, so it measures one network path. Real visitors come from many places on many networks. Real user monitoring measures TTFB and the Core Web Vitals in your visitors' browsers, and the free LCP test loads the full page in a real Chrome browser.