Request Timing Fields, Client RTT Telemetry, and Server-Timing Breakdown
How edge timing fields, TCP and QUIC RTT, delivery rate, and Server-Timing metrics help you find slow Workers, origins, and client connections.
This page summarizes Cloudflare documentation on request timing: Ruleset Engine fields such as cf.timings.client_tcp_rtt_msec and cf.timings.origin_ttfb_msec, Layer 4 (L4) connection telemetry (round-trip time and delivery rate), Worker runtime properties on request.cf, and the Server-Timing response header—including the cfWorker metric. Together they answer “where is latency coming from?” without client-side instrumentation for many transport-aware policies.
cf.timings fields: edge, origin, Worker, and client RTT
Section titled “cf.timings fields: edge, origin, Worker, and client RTT”Cloudflare exposes millisecond timings on each HTTP request so you can match, transform, or log based on where time was spent and how good the client path is.
| Field | What it measures | Zero or empty when |
|---|---|---|
cf.timings.edge_msec |
Processing on the Cloudflare network from accepted request headers until response headers are ready | N/A (always defined for the request) |
cf.timings.origin_ttfb_msec |
Round trip to the origin including origin handling (edge-view TTFB) | Request served from CDN cache without origin fetch |
cf.timings.worker_msec |
Wall-clock Worker execution for the request | No Worker ran |
cf.timings.client_tcp_rtt_msec |
Smoothed TCP RTT between client and Cloudflare | Connection is QUIC (HTTP/3), not TCP |
cf.timings.client_quic_rtt_msec |
Smoothed QUIC RTT between client and Cloudflare | Connection is TCP (HTTP/1 or HTTP/2) |
The time spent processing a request within the Cloudflare global network in milliseconds.
The value corresponds to the time interval between when the Cloudflare edge server accepted the HTTP request headers for processing and just before the HTTP response headers were available to be sent to the client.
— Cloudflare, cf.timings.edge msec
That value does not include origin round trip (use cf.timings.origin_ttfb_msec) or transfer time to the client.
For origins:
This field provides insight into origin server latency. It represents the Time to First Byte (TTFB) from the perspective of the Cloudflare edge server.
This metric includes both the network RTT and the time the origin server spent handling the request.
— Cloudflare, cf.timings.origin ttfb msec
Worker time in rules is separate from edge total:
The time spent executing a Cloudflare Worker in milliseconds.
This field provides the wall-clock time that a Cloudflare Worker spent handling the request, measured in milliseconds.
— Cloudflare, cf.timings.worker msec
Use cf.timings.worker_msec > 500 (or your threshold) in Transform Rules, WAF Custom Rules, or other phases that support dynamic fields—see the Worker execution timing field changelog.
TCP vs QUIC: which client RTT field to read
Section titled “TCP vs QUIC: which client RTT field to read”Client RTT is protocol-specific. Only one of the client RTT fields is meaningful per request:
- TCP (HTTP/1, HTTP/2):
cf.timings.client_tcp_rtt_msec— QUIC field is0. - QUIC (HTTP/3):
cf.timings.client_quic_rtt_msec— TCP field is0.
Changelog material also documents cf.edge.client_tcp (boolean: true when the client used TCP instead of QUIC), which helps you branch policies by protocol—for example cf.edge.client_tcp && cf.timings.client_tcp_rtt_msec < 100.
L4 delivery rate and connection-quality rules
Section titled “L4 delivery rate and connection-quality rules”Beyond application-layer timings, Cloudflare surfaces transport signals for the client connection.
cf.edge.l4.delivery_rate is an integer: the latest estimated successful delivery rate in bytes per second. It returns 0 when L4 statistics are not available.
Two new fields are now available in rule expressions that surface Layer 4 transport telemetry from the client connection. Together with the existing cf.timings.client_tcp_rtt_msec field, these fields give you a complete picture of connection quality for both TCP and QUIC traffic — enabling transport-aware rules without requiring any client-side changes.
— Cloudflare, New QUIC RTT and delivery rate fields
Previously, QUIC RTT and delivery rate appeared in the Server-Timing: cfL4 response header; the same data is now usable directly in expressions (for example cf.edge.l4.delivery_rate < 100000 for under 100 KB/s).
Route slow connections: transform rule pattern
Section titled “Route slow connections: transform rule pattern”A common pattern tags high-latency clients so the origin can return a lighter page:
Expression (from changelog example):
cf.timings.client_tcp_rtt_msec > 200 or cf.timings.client_quic_rtt_msec > 200Header modification: set X-High-Latency to true.
Cover both TCP and QUIC RTT in the expression; checking only one misses HTTP/3 visitors.
Workers: request.cf RTT and deliveryRate
Section titled “Workers: request.cf RTT and deliveryRate”In Cloudflare Workers, three properties on request.cf mirror L4 telemetry:
| Property | Type | When present |
|---|---|---|
clientTcpRtt |
number | undefined |
TCP connections |
clientQuicRtt |
number | undefined |
QUIC connections |
edgeL4.deliveryRate |
number (inside edgeL4) |
When L4 stats exist |
These properties let your Worker make decisions based on real-time connection quality signals — such as round-trip time and data delivery rate — without requiring any client-side changes.
— Cloudflare, New L4 transport telemetry fields in Workers
Typical Worker logic picks clientTcpRtt ?? clientQuicRtt, reads edgeL4?.deliveryRate, and forwards values as request headers for logging or origin routing—the changelog example shows setting X-Client-RTT and X-Delivery-Rate.
For Worker-caused slowness at the edge, prefer platform-reported cf.timings.worker_msec in rules rather than performance.now() around CPU-heavy loops: in production, timers only advance after I/O for Spectre mitigations, so non-I/O work can measure as 0 ms. Worker traces note the same limitation for some spans.
Server-Timing: split edge, origin, and cfWorker
Section titled “Server-Timing: split edge, origin, and cfWorker”The Server-Timing header gives a browser-visible breakdown. The cfWorker metric isolates Worker time that was previously folded into edge:
| Metric | Meaning |
|---|---|
edge |
Total edge time, including Worker execution |
origin |
Time fetching from the origin |
cfWorker |
Worker execution including subrequests, excluding origin fetch |
Example from Cloudflare:
Server-Timing: cdn-cache; desc=DYNAMIC, edge; dur=20, origin; dur=100, cfWorker; dur=7In this example, the edge took 20ms, the origin took 100ms, and the Worker added just 7ms of processing time.
— Cloudflare, New cfWorker metric in Server-Timing header
This helps developers accurately identify whether high Time to First Byte (TTFB) is caused by Worker processing or slow upstream dependencies.
— Cloudflare, New cfWorker metric in Server-Timing header
cfWorker is on by default when Real User Monitoring (RUM) is enabled; otherwise enable via Rules. Web Analytics changelog notes enhanced reporting of Server-Timing headers for analytics pipelines.
Aggregated analysis: Log Explorer and dashboard limits
Section titled “Aggregated analysis: Log Explorer and dashboard limits”For fleet-wide RTT and TTFB, example Log Explorer queries aggregate ClientTCPRttMs by country or rank paths by EdgeTimeToFirstByteMs.
When interpreting origin latency in API Shield endpoint metrics, read Endpoint Management limitations: if a Worker (or Worker-based products such as Waiting Room) handles the path, origin response time may not populate in the dashboard because the request never reaches the origin in a measurable way.
cf.worker.upstream_zone vs CF-Worker header
Section titled “cf.worker.upstream_zone vs CF-Worker header”To recognize traffic spawned by a Worker zone in WAF or rules, use cf.worker.upstream_zone (zone name when the request comes from a Worker; empty otherwise)—not the CF-Worker HTTP header in custom WAF rules, because HTTP headers documentation states WAF rules run before Cloudflare adds CF-Worker. Example block expression: cf.worker.upstream_zone eq "example.com".
Troubleshooting slow TTFB: Workers and command-line timing
Section titled “Troubleshooting slow TTFB: Workers and command-line timing”Cloudflare’s slow-website guide treats a slow Worker as a frequent cause of high TTFB: review deployed Workers, Worker analytics execution times, and temporarily disable Workers to isolate the issue. It lists typical code problems: slow fetch() to external APIs, heavy loops, missing await (sequential instead of parallel work).
For per-request phases (DNS, TCP, TLS, TTFB, total), gathering troubleshooting information documents curl -w write-out fields; high Time to First Byte in that output points at slow origin or edge processing, which you can correlate with Server-Timing or cf.timings.* fields.
Common mistakes
Section titled “Common mistakes”- Using only
cf.timings.client_tcp_rtt_msecand ignoring QUIC, or vice versa. - Treating
cf.timings.origin_ttfb_msec == 0as a fast origin when the response was cache hits. - Assuming
cf.edge.l4.delivery_rate == 0means a slow link—it may mean L4 stats were unavailable. - Matching on the
CF-Workerheader in WAF instead ofcf.worker.upstream_zone. - Using
performance.now()in production Workers to profile CPU-bound code without I/O.
How to check this on your site
Section titled “How to check this on your site”- Trigger a request through your zone (browser or
curl) and inspect the responseServer-Timingheader foredge,origin, andcfWorkerper New cfWorker metric in Server-Timing header. - In the Cloudflare dashboard, open Workers & Pages, review Workers on your routes, and check analytics execution times as described in Troubleshooting a slow website.
- Add a Transform Rule that logs or sets a header when
cf.timings.client_tcp_rtt_msec > 200 or cf.timings.client_quic_rtt_msec > 200, using the pattern from New QUIC RTT and delivery rate fields. - If you use Log Explorer, run the client TCP RTT by country or slowest paths by TTFB queries against your HTTP request logs.
- You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact sentence you are asking about.