All posts
Performance3 min readWatchFor Team

What is TTFB (Time to First Byte) and how to improve it

TTFB is the first number that tells you whether your backend is fast or slow. Here's what Time to First Byte measures, what's 'good', what makes it bad, and how to bring it down.

What is TTFB (Time to First Byte) and how to improve it

A page can have beautifully optimised images and lean JavaScript and still feel slow to start — because the very first step, getting any response at all from the server, is sluggish. That first step has a name: TTFB, and it's often the most overlooked number in web performance.

If your site "takes a moment before anything happens," TTFB is where to look. Here's what it is and how to fix it.

What TTFB measures

Time to First Byte (TTFB) is the time from when a browser makes a request to when it receives the first byte of the response. It captures everything that has to happen before your content can even start arriving.

A request's early life looks like this:

DNS lookup → Connect → TLS handshake → [server thinks] → first byte → download
└──────────────────  TTFB  ──────────────────────────┘

TTFB covers the network setup and — crucially — how long your server took to start responding. That last part is why TTFB is such a good proxy for backend health: a high TTFB usually means a slow server, not a slow network.

What's a good TTFB?

As a rough guide:

TTFBVerdict
Under 200msExcellent
200–500msGood
500ms–1sNeeds work
Over 1sSlow — users feel it

Google considers around 800ms a reasonable upper target for good experiences, with under 200ms being the goal for the server-think portion.

What makes TTFB bad

CauseWhat's slow
Slow server / app codeThe backend takes too long to generate the response
Slow database queriesThe page waits on the DB before it can reply
No cachingEvery request is rebuilt from scratch
Distance to the serverFar-away users pay extra network time
Cold startsServerless/containers spinning up on demand
OverloadRequests queueing under heavy traffic

How to improve it

The fixes fall into two buckets — make the server faster, and put it closer:

  1. Cache aggressively. Serving a cached page skips the expensive "server thinks" step entirely. This is usually the biggest single win.
  2. Use a CDN. It both shortens the network distance and serves cached content from the edge — slashing TTFB for far-away users.
  3. Speed up the backend. Optimise slow database queries (the usual culprit), reduce work done per request, profile the hot paths.
  4. Keep things warm. Avoid cold starts where they hurt; keep connections and instances ready.
  5. Move closer to users. Edge rendering or regional deployments cut the distance.

TTFB vs LCP — don't confuse them

TTFB is part of the bigger picture, not the whole thing:

  • TTFB = when the first byte arrives (server responsiveness).
  • LCP = when the largest content is visible (the whole load experience).

A bad TTFB drags down LCP and everything after it — you can't render fast if the server hasn't even started replying. So TTFB is the foundation: fix it first, and the rest of your performance work has something solid to build on.

The bottom line

In one line
WhatTime until the first byte of the response arrives.
Why it mattersA great proxy for backend speed; the base of LCP.
GoodUnder ~200ms for the server portion; under 800ms overall.
ImproveCache, use a CDN, speed up the backend, stay warm.

TTFB is the unglamorous number that quietly gates everything else. Get it low — mostly through caching and a CDN — and your whole site feels faster to start, which is the moment users decide whether to stay.

Measure it as part of Core Web Vitals, check any page with the free Core Web Vitals checker, and track it over time with performance monitoring.

Share this article