Catalogue / airbnb-2023-http-streaming

Airbnb streams server-rendered pages in chunks and reports Early Flush cut First Contentful Paint by around 100ms on every page tested

Airbnb. Airbnb.com server-side page rendering.

Organisation
Airbnb
Evidence
Reported from production
Source
Improving Performance with HTTP Streaming

Airbnb Engineering (Medium), published 2023-05-17

Records

Decision#d1

Flush the early part of the HTML head before page data is ready, so the browser starts fetching CSS and JavaScript sooner

Decision#d2

Stream page data in a trailing Deferred Data chunk of the HTML instead of fetching it from the client after render

Decision#d3

Turn off response buffering in nginx so chunks reach the browser as they are written

Failure#f1

Early-flushed responses were delayed about 200ms by Nagle's algorithm and Delayed ACK once gzip shrank the writes

Sign in to read what was chosen, what was rejected and what it cost, each with its place in the source. An account is free. The job-queue cards are open without one.