Our p99 latency is under 50ms globally. Here’s how we got there.
The KV Strategy
Every deployed page is stored as a pre-rendered template in Cloudflare KV. Workers fetch the template, inject dynamic content (if any), and stream the response. No origin roundtrip for static pages.
Component Bundling
At deploy time, we bundle all component CSS into a single stylesheet per page and store it alongside the HTML in KV. This eliminates render-blocking requests for component styles.
Edge-Side Includes
For pages with dynamic elements (booking availability, form state), we use edge-side composition. The worker fetches the static shell from KV and the dynamic fragment from the origin in parallel, then stitches them together before responding.
Results
Across 50+ global Cloudflare PoPs, our median TTFB is 12ms and p99 is 47ms. The main variable is KV propagation delay after a fresh deploy, which settles within 60 seconds.