Performance
Give Yourself a TTFB Budget, Not a Lighthouse Score
A score tells you how the page felt on one run from one place. A budget tells you whether the next commit broke something.
Lighthouse scores are useful for catching obvious regressions, but teams treat a 100/100 Lighthouse audit like proof of production excellence. It is not.
A Lighthouse run executes in a sterile, local Chrome environment against an unthrottled loopback connection. It tells you almost nothing about how your real users experience the site in Mumbai, Berlin, or Chicago on real mobile networks.
TTFB is the ceiling for everything else
Time to First Byte is load-bearing because nothing else can start until the first byte arrives. The browser cannot parse HTML, discover CSS, initiate font preloads, or start script downloads until the server answers.
Budget: TTFB < 150ms globally
If TTFB = 80ms: First Contentful Paint can hit 400ms.
If TTFB = 900ms: Even an empty page cannot paint under 900ms.Set a hard budget in CI
Do not wait for quarterly audits. Enforce a Time to First Byte budget on every build:
- Static prerendered pages: maximum 50ms TTFB via edge caching.
- Dynamic API routes: maximum 200ms TTFB at the 95th percentile.
- Fail PR checks if a commit introduces synchronous database calls or unbounded loops before headers flush.