How we cut global TTFB by 61% with HTTP/3 and edge HTML caching
An 18-month project to rebuild our request path from the edge to the database — and the surprising bottlenecks we found along the way.
In early 2025, our median time to first byte was respectable: 466 ms across all customer sites, measured from 24 cities. Respectable, but not remarkable — and remarkable is the bar our customers pay for. So we set ourselves an audacious goal: halve it within 18 months, for every plan, at no extra cost.
The problem
A request to a typical BeHost site used to travel through four hops: DNS resolution, a TLS handshake with our nearest edge, a cache lookup and — for anything dynamic — a full round trip to the origin server. For visitors far from the origin region, that last hop dominated everything.
- 62% of HTML requests were cacheable but weren't being cached.
- TLS 1.2 handshakes added 1–2 round trips on mobile networks.
- Cache purges took up to 30 seconds to propagate globally.
Measuring what matters
Before changing anything, we rebuilt our observability. Synthetic tests from data centers lie: they sit on perfect networks. We deployed real-user monitoring across 50,000 consenting sites and started tracking p50, p75 and p95 TTFB per country, per device class.
“The single most useful chart we built showed TTFB by visitor distance from origin. It made the problem impossible to ignore.”
— Mateo Kovač, VP Infrastructure
Moving to HTTP/3
HTTP/3 runs over QUIC, which combines the transport and TLS handshakes and eliminates head-of-line blocking. On lossy mobile networks the improvement was dramatic. Enabling it was a single configuration line; making it reliable at our scale took nine months.
listen 443 quic reuseport; listen 443 ssl; http3 on; ssl_protocols TLSv1.3; add_header Alt-Svc 'h3=":443"; ma=86400' always; # 0-RTT only for idempotent requests ssl_early_data on;
HTTP/3 is now enabled by default on every BeHost plan. No configuration is required — browsers negotiate it automatically.
Caching HTML at the edge
Static assets were already cached at our 310 edge locations. HTML was the hard part: it changes, it's personalised and getting it wrong breaks shopping carts. We built a cache key that understands logged-in cookies, WooCommerce sessions and A/B test variants, then added instant purge-by-tag so updates propagate worldwide in under 150 ms.
The results
Eighteen months later, the numbers speak for themselves. Every customer got these improvements automatically.
| Metric | Before | After | Change |
|---|---|---|---|
| Median TTFB (global) | 466 ms | 182 ms | −61% |
| p95 TTFB (mobile) | 1,840 ms | 610 ms | −67% |
| HTML cache hit ratio | 38% | 94% | +147% |
| Global purge time | 30 s | 150 ms | −99.5% |
What's next
We're now experimenting with running server-side rendering directly at the edge for frameworks like Next.js and Astro, and with predictive prefetching based on aggregate navigation patterns. Expect another deep dive in early 2027.
If problems like these excite you, we're hiring.

