Request Flow: Browser to Origin and Back

Lifecycle of an HTTPS request, with the CDN edge broken out. Running example: a shopper in Madrid on amazon.com going through the checkout page, served through Cloudflare as the CDN in this illustration.

Browser DNS Connection CDN edge Origin Response / render
1 · In the browserbefore any bytes leave the machine
1
URL parse. Split scheme, host, path, query.
2
HSTS check. Known HSTS domains upgrade http to https locally.
3
Local caches. Browser HTTP cache, service worker, DNS cache, and open connections checked first.
4
Assemble request. Cookies and client hints attached.
User feels: taps lag and the button spins before anything loads; sometimes a stale price or blank frame. Where most rage-quits happen.
SRE checks & does: RUM LCP / INP / CLS by page, device, geo; chase long JS tasks or the slow resource, then route the worst sessions to the front-end or CDN owner.
2 · DNS resolutionwhere traffic is handed to the CDN
5
Recursive lookup. browser → OS → resolver → authoritative.
6
CNAME to the CDN. The origin IP stays hidden.
7
CDN DNS picks an edge. Anycast routes to the nearest POP; DNS-based returns a nearby cluster.
8
Result: the browser holds a CDN edge IP, not the origin.
User feels: a blank screen hanging on "resolving host" with no spinner. Rare but brutal, it just looks like the site is down.
SRE checks & does: DNS resolution time in RUM and Synthetics; verify the CNAME chain and TTLs, run a Synthetic DNS test from the affected region, escalate to the DNS / CDN provider if resolver-side.
3 · Connection setupto the CDN edge
9
Route to the POP. Anycast + BGP to the closest POP.
10
Transport handshake. TCP (1 RTT) or QUIC/HTTP3 (0-1 RTT).
11
TLS terminates at the edge. The CDN now sees plaintext and can cache, inspect, log.
User feels: the first page load is slow, then everything speeds up. Worst on mobile and high-latency networks.
SRE checks & does: TLS handshake time and HTTP/2 vs HTTP/3 mix by region; confirm session resumption + 0-RTT are on, enable HTTP/3, check the cert chain length.
4 · Inside the CDN edgethe part the integration instruments
12
Routing rules. Fastly VCL, Cloudflare Rules, Akamai property.
13
Security layer. WAF, bot management, DDoS / rate limiting. Feeds Cloud SIEM.
14
Edge compute. Workers / Compute@Edge / EdgeWorkers.
15
Cache key. URL + selected headers / cookies / query params.
16
Cache lookup at the POP.

HIT served from edge

Fresh object in the POP. Origin never touched.

MISS go deeper

Falls through to the tiered cache before the origin.

17
Tiered cache / origin shield. A hit at the parent POP still spares the origin.
Steps 12–17 emit per-request logs and aggregate into metrics.
User feels: the whole site drags at once (every page and image), or a real shopper gets wrongly hit with a CAPTCHA / bot challenge and bails.
SRE checks & does: CDN dashboard, cache-hit ratio, edge latency by POP, error rate, WAF / bot logs; triage edge vs origin, then fix the cache key, tune the rule, or roll back an edge function.
on a true miss through all tiers
5 · Origin fetchonly when nothing is cached
18
Origin selection. IP, host, bucket, or load balancer, often a pre-warmed pool.
19
Second TLS session. Separate CDN-to-origin handshake.
20
Origin infrastructure. LB → app server → databases, caches, downstream services.
User feels: the worst kind, checkout spins for seconds or errors out, carts and orders fail. Direct lost revenue; they blame "the site."
SRE checks & does: the CDN only says "origin took Xs," so pivot to APM traces and infra metrics; find the slow span (DB query, payment API), then scale / roll back the service or fix the query.
↑ response travels back up
6 · Response back & renderorigin → edge → browser
21
Store on the way back. Each tier decides whether to cache.
22
Edge post-processing. Compression, image optimization, HTML rewrite, ESI.
23
Edge → browser. With cf-cache-status, x-cache, age, server-timing.
24
Browser caches per directives.
25
Parse + render. Subresources repeat steps 1–23, mostly edge cache hits.
26
Execute + paint. LCP, INP, CLS captured by RUM.
User feels: content pops in late and the layout jumps around; the page feels janky even after it "loads."
SRE checks & does: edge compression / image optimization and server-timing, plus RUM paint metrics; fix oversized assets and cache the compressed variants at the edge.

Who sees what along the request

No single product sees the whole path. Correlating all four is the Datadog play.

Browser
DNS / connect
CDN edge
Origin app
Infra / deps
RUM
CDN logs + metrics
APM
Infra
CDN sees: request, cache outcome, edge + origin-fetch latency, status, bot / WAF actions. Cannot see: inside the origin app (APM), the infra (infra metrics), or the user's rendering (RUM).

Click any box (and the four stages inside the CDN edge) for details. Each includes two lenses: what the user feels when that step slows down, and what an SRE / DevOps engineer checks and does.

1. resolve host 2. TLS + request 3. cache MISS 4. origin fetch 5. content served back HIT: origin skipped 6. rendered Browser / Clientshopper on amazon.com DNS resolutionCNAME to CDN → nearest edge IP Cloudflare Edge POP (Madrid) TLS termination WAF + Bot + DDoS Edge compute Cache lookup (HIT / MISS) logs + metrics per request: status, cache, POP, latency, bot score Shield / Parent POPtiered cache · origin offload Origin (Amazon infra) Load balancer App server + checkout / cart Catalog DB · inventory · payments only on a full miss / dynamic request

Select a box in the diagram to see what happens there, in depth, with the amazon.com checkout example. Start with the CDN Edge POP and its four inner stages for the most detail.

Request (forward) Response (content back) Cache HIT shortcut

CDN concepts, from the observability angle

The terms that show up in CDN logs, metrics, and dashboards, and why each one matters when you are debugging.

CDN (Content Delivery Network)

A global network of caching servers that sits between users and the origin, serving content from close to the user. Cloudflare, Fastly, Akamai.

Watch: cache-hit ratio, edge latency, offload %.

Edge / POP (Point of Presence)

A CDN data center near the user. The first (often only) server the browser talks to; TLS terminates and caching happens here.

Watch: latency + error rate per POP and region.

Anycast

One IP announced from many POPs; the network routes each user to the nearest one. How most modern CDNs steer traffic.

Watch: which POP a region is landing on (mis-routing = latency).

Origin

The customer's own servers, the source of truth. Reached only on a cache miss or for dynamic/uncacheable requests.

Watch: origin-fetch time and origin request volume.

Origin shield / tiered cache

A middle cache tier that consolidates edge misses into one origin fetch, protecting the origin from stampedes.

Watch: mid-tier hit ratio; a spike in origin RPS = shield miss.

Cache HIT / MISS / STALE / BYPASS

The outcome of a cache lookup: served from edge (HIT), fetched from deeper (MISS), served expired (STALE), or never cached (BYPASS, e.g. checkout).

Watch: cache-status distribution by path.

Cache-hit ratio

Share of requests served from cache. The single most important CDN health + cost metric; a drop means slower pages and a hotter origin.

Watch: hit ratio trend; alert on sudden drops.

TTL & Cache-Control

How long an object stays fresh, set by origin headers (Cache-Control, s-maxage). Controls freshness vs load.

Watch: object age; a shortened TTL can tank hit ratio.

Cache key & Vary

What makes a cached object unique (URL + selected headers/cookies/query). A bad key fragments the cache.

Watch: low hit ratio on a path often = a cookie or Vary in the key.

Purge / invalidation

Evicting cached objects on demand (by URL or tag), e.g. after a price change, so users do not see stale content.

Watch: purge events correlated with a temporary hit-ratio dip.

TLS termination

The edge completes HTTPS and decrypts, so it can cache/inspect/log, then re-encrypts to the origin.

Watch: handshake time, HTTP/2 vs HTTP/3, resumption rate.

WAF (Web Application Firewall)

Edge rules that block malicious requests (SQLi, XSS) before they reach the origin.

Watch: blocked vs allowed by rule; false positives hurt conversion.

Bot management

Scoring + acting on automated traffic (often ~40% of requests): allow, challenge, or block. Big for scraping, scalping, card-testing.

Watch: bot score distribution, challenge rate on real users.

Rate limiting / DDoS protection

Capping abusive request volume per IP/token and absorbing floods at the edge.

Watch: rate-limit actions, L3/L7 attack traffic vs baseline.

Edge compute

Serverless code at the POP (Workers, Compute@Edge, EdgeWorkers): rewrites, auth, personalization, waiting rooms.

Watch: function latency, CPU time, error rate, subrequests.

Log push / streaming

The CDN shipping per-request edge logs to a destination (like Datadog) in near real time. High volume, mostly unindexed.

Watch: ingest volume + cost vs how much is actually indexed.

Offload

Share of bytes/requests the CDN served without touching the origin. High offload = fast + cheap + resilient.

Watch: bytes from edge vs origin.

Telemetry sources

Three complementary views: edge logs/metrics (the CDN), synthetics (scripted probes), and RUM (real users). Each sees a different slice.

Watch: reconcile all three when they disagree.

Who works with CDNs

The roles that touch CDN telemetry, what they care about, and the action they typically take.

SRE (Site Reliability Engineer)

Owns reliability & latency SLOs
Cares about: availability, p95/p99 latency, error budgets across edge and origin.
Watches: edge latency by POP, hit ratio, origin error rate + fetch time, incident alerts.
Action: triage edge vs origin during an incident, then mitigate (reroute, roll back, scale) and run the postmortem.

DevOps / Platform Engineer

Owns CDN config & edge CI/CD
Cares about: safe config + edge-code deploys, cache correctness, origin protection.
Watches: impact of each deploy on hit ratio, cache config, origin load, function errors.
Action: tune cache rules and TTLs, roll back bad edge deploys, manage purges and shields.

Web Performance Engineer

Owns page speed & Core Web Vitals
Cares about: LCP / INP / CLS, time to first byte, conversion impact of speed.
Watches: RUM by page/geo/device tied back to edge timing and cache status.
Action: improve caching of assets, cut payload, push more to the edge, fix slow resources.

Security Engineer / SecOps

Owns WAF, bot, DDoS
Cares about: blocking attacks without blocking real users; attack visibility.
Watches: WAF/bot event logs in Cloud SIEM, challenge rates, attack patterns by IP/ASN.
Action: tune rules, rate-limit abusive sources, confirm mitigation during attacks.

Network Engineer

Owns routing, peering, POP selection
Cares about: users hitting the right POP, healthy peering, regional latency.
Watches: latency + traffic distribution by POP and region, routing anomalies.
Action: fix mis-routing, work peering/interconnect issues with the CDN, validate Anycast behavior.

Frontend / App Engineer

Owns the app served through the CDN
Cares about: correct caching of their assets/APIs, low error rates, fast pages.
Watches: asset cache behavior, 4xx/5xx by route, RUM errors, edge vs origin timing.
Action: set correct cache headers, fix cacheability bugs, coordinate purges on release.

Most of these roles overlap in a CDN incident: the value is one shared view that ties edge logs/metrics to RUM, APM, and infra so each persona is looking at the same request.

"Checkout is slow" during a Prime Day spike

Shoppers report the checkout button spinning for 4-5 seconds and some orders failing. Conversion on /checkout drops and a latency alert fires. Here is how an SRE narrows it down across the layers, using the same request path from the diagram.

1
RUM

Confirm it is real, and scope it

Open RUM for /checkout: INP and load time are spiking for many users across devices, browsers, and regions, not one bad phone. Sessions show the wait is on the server response, not client rendering.

→ Real and widespread. Rule out a client-side issue.
2
CDN dashboard

Edge or origin?

Static assets (images, CSS, JS) still HIT with normal edge latency and hit ratio, so the edge is healthy. But /checkout is uncacheable (BYPASS), and its origin-fetch time jumped from ~200ms to ~4s.

→ The edge is fine. The slowness is coming from the origin.
3
WAF / bot logs

Attack, or a false block?

Challenge and block rates are at baseline, no DDoS signature, and real users are not being throttled or CAPTCHA'd. The spike is legitimate Prime Day traffic.

→ Not security. Rule out edge mitigation as the cause.
4
APM

Which part of the origin?

Trace the /checkout POST. Most spans are fast and the order-DB write is fine, but the payment-authorization call to the downstream payment service is p99 ~4s. That one span is the whole delay.

→ The payment service is the bottleneck.
5
Infra

Why is payment slow?

The payment service pods are pegged on CPU with connection-pool saturation. A config deploy ~30 minutes before the alert changed the payment client's timeout and retry settings.

→ A bad retry config is amplifying load under peak.

Root cause

The deploy tightened a timeout and added aggressive retries on the payment client. Under Prime Day load, those retries multiplied requests to the payment service, saturating its connection pool so every authorization call slowed to ~4s, which surfaced to shoppers as a spinning checkout.

Fix & verify

Roll back the deploy (or fix the backoff and raise the pool). Payment auth latency drops back to ~200ms and checkout recovers. Confirm in RUM that INP on /checkout is back to baseline and error rate is clear.

The point: the CDN only said "origin took 4s." It took the CDN → APM → infra correlation, on the same request, to land on the payment span and the deploy that caused it. One shared view turns this from an hours-long cross-team hunt into a minutes-long trace.