Technical

Time to First Byte (TTFB)

Also known as: TTFB, time to first byte, server response time

TTFB measures the time from the browser sending a request to receiving the first byte of the response from the server. It's a server-side performance metric that gates everything downstream — TTFB sets the earliest possible time at which FCP, LCP, or any other rendering metric can fire. Good TTFB is < 800ms; 'Needs Improvement' is 800ms–1800ms; 'Poor' is > 1800ms.

What TTFB measures

The complete timeline from request to first byte includes:

  1. DNS lookup — resolving the domain to an IP
  2. TCP connection — establishing the network socket
  3. TLS handshake — for HTTPS, negotiating the encrypted channel
  4. HTTP request — sending the request
  5. Server processing — generating the response (server-side work)
  6. First byte delivered — the moment the response begins arriving

TTFB is the sum of all six. Most optimization targets server processing time (step 5) but the network steps matter too.

Why TTFB matters

TTFB is the foundation of every other speed metric. A site with TTFB of 2 seconds CANNOT have FCP under 2 seconds — the math is impossible. Long TTFB caps all downstream performance.

For SEO, TTFB doesn’t directly factor into Core Web Vitals, but it’s the root cause of poor LCP and FCP on many sites.

Common causes of high TTFB

  • Slow database queries — N+1 queries, missing indexes, unoptimized JOIN logic
  • Origin server far from user — single-region deployment without CDN
  • Heavy server-side rendering without caching
  • Synchronous third-party API calls in the request path
  • Inefficient ORM or framework overhead
  • Cold starts on serverless platforms

Optimization tactics

In rough order of impact:

  • CDN with edge caching — Cloudflare, Fastly, Vercel cache static HTML at edge nodes globally. TTFB drops from 800ms+ to 50-150ms.
  • Static site generation — pre-build HTML at deploy time; serve as static files. The pattern Resocial.us itself uses (Astro static output).
  • Database query optimization — indexes, query caching, denormalization where appropriate
  • HTTP/2 or HTTP/3 — multiplexed connections reduce handshake overhead
  • Avoid heavy server-side rendering on every request — use ISR (Incremental Static Regeneration) or ISG patterns

TTFB vs latency

TTFB includes both server work AND network round-trip time. A user in Sydney requesting a server in Virginia has ~200ms of pure network latency before the server does any work. CDN edge caching solves this by serving from a node closer to the user.

Measurement

  • PageSpeed Insights — surfaces TTFB for lab and field
  • WebPageTest — detailed waterfall showing each step of TTFB
  • Chrome DevTools Network tab — Timing column shows TTFB per request
  • Real User Monitoring (RUM) — Datadog, New Relic, Sentry capture TTFB per real user

Resocial perspective

TTFB is often the underlying cause when sites struggle with Core Web Vitals. Our Technical SEO service audits TTFB explicitly because optimizing LCP without first fixing TTFB hits a ceiling. For most static-content sites, deploying behind a CDN (Cloudflare, Vercel, etc.) drops TTFB by 5-10× immediately.

Looking for hands-on help with this?

Free SEO audit

60+ dimensions, 48-hour turnaround.

Get a Free SEO Audit

Enterprise RFP

Tailored proposal in 5 business days.

Submit an Enterprise RFP