What is Time to First Byte?

Time to First Byte (TTFB) is the elapsed time from starting a request or navigation until the first byte of the response arrives. Depending on where the timer starts, it can include redirect, DNS, connection, and TLS setup in addition to server processing.

Media origin
Viewer or application
Delivery systems move a prepared asset from its origin through an edge to the requesting client. This diagram shows delivery broadly, not specifically Time to First Byte.

How Time to First Byte works

TTFB is observed at the boundary between request setup and response arrival, so its value depends on where the timer begins and whether an existing connection is reused. Name resolution, TCP and TLS setup, proxy traversal, origin computation, and propagation can all contribute. In a media delivery pipeline, it helps localize startup delay before a manifest, segment, image, or API response begins transferring, but says nothing about the remaining payload.

Key facts

  1. Browser page-load instrumentation measures TTFB from navigation start, or from activation start for prerendered pages, to the response-start timestamp. This includes redirect, DNS, connection, and TLS time. A timer anchored at request start excludes that setup, so tool definitions must match before values are compared.
  2. An edge-cache hit can shorten TTFB by avoiding an origin round trip, while a miss may include shield, origin, database, or transformation work even when the response body is identical.
  3. Server-Timing data can expose selected backend phases alongside TTFB, but it cannot account for every client-side DNS, connection, proxy, and last-mile delay on the delivery path.

When Time to First Byte matters

Compare TTFB across cached and uncached requests to distinguish origin work from delivery-path latency. A low TTFB does not guarantee a fast complete response because download and rendering time remain separate.

Common use cases for delivery

These examples cover delivery broadly, not specifically Time to First Byte.

  • Serving image, audio, video, and document derivatives to a geographically distributed audience.
  • Protecting private assets worldwide with expiring or signed requests.
  • Reducing repeated processing and origin traffic by caching deterministic results.

Working with delivery

This guidance covers delivery broadly, not just Time to First Byte.

A client requests an asset using a URL or playback manifest. A delivery layer evaluates authorization and cache state, serves a cached response when possible, or retrieves the asset from its origin before forwarding and optionally caching it.

Delivery choices determine more than download speed. Cache keys, origin behavior, authorization, geographic routing, invalidation, and egress cost decide whether an asset is fast, current, and available to the right audience.

What you gain

  • Edge caching places frequently requested assets closer to viewers.
  • Explicit cache and authorization rules reduce avoidable origin work.
  • Multiple delivery variants let clients request an asset suited to their context.

What it costs

  • Long cache lifetimes improve hit ratio but make replacement and invalidation more difficult.
  • Signed access protects private media but adds key management, clock, and cache-partitioning concerns.
  • More variants improve client fit while increasing storage, cache fragmentation, and operational complexity.

Before production

  1. Define cache keys, cache lifetime, invalidation, and authorization behavior explicitly.
  2. Measure time to first byte, cache-hit ratio, egress, and behavior after an origin failure.
  3. Test signed and unsigned requests at the CDN edge, not only against the origin.

Turn media knowledge into a working pipeline

Connect uploads, processing, AI, storage, and delivery through one declarative API — with the encoding stack, scaling, and format churn handled for you.

Try Transloadit for free