QUIC RTT is now visible in rules! Route by connection quality
Hi everyone, it's Shiichan! Today I found a small but genuinely useful update that lets you peek a bit deeper into your network connections.
Cloudflare ChangelogWhat was announced?
On the Cloudflare Changelog, two new fields were added to rule expressions. They surface Layer 4 (transport layer) telemetry from the client connection, right inside your rules.
cf.timings.client_quic_rtt_msec(Integer): the smoothed QUIC round-trip time (RTT) between Cloudflare and the client, in milliseconds. Only populated for QUIC (HTTP/3) connections; returns 0 for TCP connectionscf.edge.l4.delivery_rate(Integer): the most recent data delivery rate estimate for the client connection, in bytes per second. Returns 0 when L4 statistics aren't available for the request
Combined with the existing cf.timings.client_tcp_rtt_msec field, you get a complete picture of connection quality for both TCP and QUIC traffic.
The story so far
This QUIC RTT and delivery rate data already existed, but it was only available via the Server-Timing: cfL4 response header. You couldn't use it directly as a condition inside a rule expression.
What changes
The same data is now available as rule fields, so you can build transport-aware rules in Transform Rules, WAF Custom Rules, and any other phase that supports dynamic fields, all without requiring any client-side changes.
Dive Deep
The changelog post shares two practical examples right away.
Route high-latency connections to a lighter origin
Use a request header transform rule to tag requests coming from high-latency connections, so your origin can serve a lighter page variant.
Rule expression:
cf.timings.client_tcp_rtt_msec > 200 or cf.timings.client_quic_rtt_msec > 200
Header modification: set X-High-Latency to true
Match low-bandwidth connections
cf.edge.l4.delivery_rate > 0 and cf.edge.l4.delivery_rate < 100000
You can use a delivery-rate threshold like this to identify low-bandwidth connections too.
Wrap-up
- New rule fields
cf.timings.client_quic_rtt_msec(QUIC RTT) andcf.edge.l4.delivery_rate(delivery rate) are now available - Data that used to require the
Server-Timing: cfL4header can now be used directly in Transform Rules, WAF Custom Rules, and more - You can tag high-latency requests or detect low-bandwidth connections and route by connection quality, with no client-side changes needed
This one's for anyone who wants to fine-tune edge routing based on real connection quality!