Production streaming
What you need to know
Production streaming lets the server begin a response before all independent content is ready. Suspense is a rendering boundary that supplies a fallback while descendants wait for compatible asynchronous work. Whether users see progressive updates depends on the whole delivery path.
By the end, you can: specify chunk and fallback observations; compare buffering behavior.
Place a fallback around a slow section
// app/reports/page.tsx — staged Next.js routeimport {Suspense} from 'react';import {connection} from 'next/server';async function Report(){ await new Promise(resolve=>setTimeout(resolve,300)); return <p>Report ready: 3 articles</p>;}export default async function Page(){ await connection(); return <main><h1>Reports</h1><Suspense fallback={<p role="status">Loading report</p>}> <Report/></Suspense></main>;}Expected behavior: The heading and loading UI can be delivered before the report in a suitable production runtime. Exact observed delivery and timing are not promised.
How it works
An async component that awaits its data inside a Suspense boundary can let surrounding content render first. If you await the slow data in the parent before returning the boundary, the parent cannot show that boundary's fallback during the wait. The sample route uses a request-time marker from Next.js and bounded synthetic delays so it is not merely measuring a prerendered static file. Real streaming can be affected by HTTP compression, proxy buffering, network packetization and browser thresholds; one server write does not necessarily correspond to one observed chunk. For a self-hosted application, verify the upstream and proxy settings and test the actual production path. A small Node HTTP fixture in this batch writes a shell, waits for an explicit local gate, then sends a final marker. It establishes streaming transport behavior only, not React Suspense semantics. Use direct and proxied results, record milestones rather than assuming exact chunks, and keep loading UI understandable without requiring color or animation.
Trace buffering using a local transport model
Origin sends SHELL -> direct client can read SHELLOrigin waits for a controlled gateOrigin sends DONE -> direct client completesBuffering relay collects full body -> downstream receives SHELL and DONE after completionExpected behavior: The model distinguishes response progression at the origin from what the downstream client receives. See the executable bounded HTTP test.
Common mistake
An origin write count alone cannot show what a browser displays. A reverse proxy or compression layer can buffer the bytes. Do not promise that every fallback will be visible or that every packet matches a React boundary.
Practice and verification
Run the local HTTP test. In the later reviewed Next.js production build, record the first visible fallback, final report, headers and browser console through direct and proxied paths. Keep the delay and test request count bounded.
Scope: App Router, proposed Next.js 16.x and React 19, Cache Components disabled. Framework snippets are staged, not executed; local policy, SQLite and HTTP transport evidence is separate. Exact patched dependencies and platform contracts are pending.
Further reading: Fetch · Loading · Self Host · Production