Skip to main content

Time to First Byte (TTFB).

Performance Core Web Vitals & Page Load

Server response time — slow TTFB delays everything else

What does this check test?

Time to First Byte measures the time from when the browser sends a request to when it receives the first byte of the response from the server. TTFB includes DNS lookup time, TCP connection time, TLS negotiation time, the time the request spends traveling to the server, the server's processing time, and the time for the first byte of the response to travel back. Google considers TTFB 'good' at 800ms or less. TTFB is a foundational metric because every other load metric (FCP, LCP, TTI) is delayed by at least the TTFB duration.

Why does it matter?

TTFB is the foundation of all page load performance — no content can be painted, no JavaScript can execute, and no user interaction can be handled until the first byte arrives. A slow TTFB pushes every downstream metric later, making it impossible to achieve good Core Web Vitals scores. A 1-second TTFB means your LCP can never be better than 1 second plus the time to render content. TTFB issues often indicate server-side problems (slow database queries, unoptimized APIs, lack of caching) that affect all pages site-wide.

Who is affected?

Dynamic server-rendered applications with database-driven content are most affected — WordPress sites, Rails applications, Django sites, and any server that computes HTML on each request. Sites without CDN coverage serving global audiences will have high TTFB for geographically distant users. API-dependent pages that make server-to-server requests during rendering are particularly vulnerable to TTFB issues.

Where does this apply?

TTFB bottlenecks occur at multiple network and server layers: DNS resolution (especially with multiple CNAME chains), TCP/TLS handshake (especially without connection reuse), server processing (database queries, template rendering, API calls), and network latency between the server and the user. Use Chrome DevTools Network panel to see the Waiting (TTFB) time for the main document request, broken down into DNS, Connect, TLS, and Waiting phases.

How to fix it

Use a CDN to serve content from edge locations near your users — this dramatically reduces network latency. Implement server-side page caching with appropriate `Cache-Control` headers. Enable caching and HTTP/2 in Nginx:
nginx
server {
  listen 443 ssl http2;
  location / {
    add_header Cache-Control "public, max-age=3600, stale-while-revalidate=86400";
    proxy_pass http://backend;
  }
}
Use streaming SSR in Next.js with Suspense boundaries:
ts
// app/page.tsx
import { Suspense } from 'react';
import { SlowDataComponent } from './SlowDataComponent';

export default function Page() {
  return (
    <main>
      <h1>Instant header</h1>
      <Suspense fallback={<p>Loading...</p>}>
        <SlowDataComponent />
      </Suspense>
    </main>
  );
}
Optimize database queries by adding indexes, using query caching (Redis/Memcached), and avoiding N+1 query patterns. For static content, use static site generation (SSG) or Incremental Static Regeneration (ISR) to pre-build pages at deploy time.

References

AppVet checks Time to First Byte (TTFB) automatically

Run a free performance scan and get a full report with actionable fixes, including a Fix with AI prompt you can paste into any coding tool.

Run Audit