New54 new lessons added since Sep 10!
Explore What's New →
Software Development Atlas
Web Platform

HTTP Request Lifecycle: From URL to Response

Trace how an HTTP request can use caches, reused connections, intermediaries, and origins without confusing HTTP semantics with network setup.

EvolvingVerified Sep 9, 2026Review target: 180 days

Personal learning atlas by Tran Trong Thuc · About this Atlas · Atlas last updated Sep 22, 2026

HTTP Request Lifecycle: From URL to Response

TL;DR

On a major launch day, an e-commerce checkout page experiences inexplicable 1.2-second latency spikes for first-time shoppers, while recurring users finish checkout in under 80ms. The team suspects slow database queries, but distributed APM traces reveal database time is under 15ms. The real bottleneck? An unpooled cold-request cascade: full recursive DNS lookup, TCP 3-way handshake, TLS 1.3 negotiation, and edge cache misses occurring on every unpooled API fetch.

💡 Rule of thumb: An HTTP request is a semantic exchange, not an automatic network connection. A single request may complete in 0ms inside local memory (cache hit), traverse an existing persistent socket in 1-RTT, or incur multiple round trips across DNS, TCP, and TLS if connections are unpooled.

  • Semantic contract vs. transport pipe: HTTP standardizes request/response semantics (RFC 9110); transport layers (TCP, TLS, QUIC/UDP) provide the underlying byte stream.
  • Four request path archetypes: Paths branch early: fresh client cache hit (zero network), warm connection reuse (zero handshake), intermediary CDN hit (zero origin compute), or full cold setup.
  • Protocol multiplexing: HTTP/1.1 introduced keep-alive reuse; HTTP/2 added binary multiplexing over single TCP streams; HTTP/3 eliminated TCP head-of-line blocking using QUIC over UDP.
  • Cache revalidation: Intermediary CDNs and local caches evaluate Cache-Control, ETag, and 304 Not Modified headers before request traffic ever touches origin application code.
  • Fatal pitfall: Treating every fetch() call as a self-contained operation without connection reuse or keep-alive agents—forcing the client or server runtime to tear down and recreate TCP/TLS handshakes on every outgoing network hop.

Start with four common request paths

Four common HTTP request paths

Client cache hit

Fresh stored response
No network exchange

Warm connection

Reuse existing connection
Skip new connection setup

Cold network path

Address → connection → security → HTTP

Intermediary cache hit

CDN / proxy responds
Origin may not run
Not every request repeats DNS, connection setup, TLS, and origin processing.

Before memorizing protocol layers, ask which of these shapes resembles the request you are debugging.

1. Fresh client-cache hit

construct request
      ↓
client cache finds a fresh response
      ↓
return stored response

No network request needs to leave the client.

2. Cache miss, existing connection

construct request
      ↓
cache miss
      ↓
reuse suitable connection
      ↓
send HTTP request
      ↓
response

The HTTP request is new even though the connection is not.

3. No suitable connection

The client may need address resolution, transport/connection establishment, and security setup before it can carry the HTTP exchange.

4. Intermediary cache hit

client cache miss
      ↓
network request
      ↓
shared/intermediary cache hit
      ↓
response

origin application processing: skipped

These paths are why there is no single mandatory “DNS → TCP → TLS → app” sequence for every HTTP request.

Keep HTTP semantics separate from network setup

HTTP semantics
request method + target + fields + optional body
                      ↓
response status + fields + optional body

Around that semantic exchange, a client may need caches, connection reuse or setup, intermediaries, and origin processing. DNS, transport, and TLS can affect latency, but they are not the semantics of GET, 404, or Cache-Control.

Cache before network

HTTP cache reuse and revalidation
  1. Look up stored response
  2. Fresh?
    Yes → reuse locally
  3. Stale?
    Send validator such as ETag
  4. 304 Not Modified
    Network happened; representation can come from cache
  5. 200 with new representation
    Replace stored entry
Fresh entries can be reused directly; stale entries may be validated conditionally before the stored representation is reused.

For the Fetch Standard's default cache mode, Fetch broadly does this on the way to a network fetch:

  • a matching fresh stored response can be returned without network validation;
  • a stale stored response may lead to a conditional network request;
  • a cache miss proceeds toward a normal network fetch.

HTTP caching has more rules than this summary, including authorization interactions, Vary, freshness calculation, and directives. The practical debugging rule is: verify whether the request reached the network before blaming DNS, TLS, a CDN, or backend code.

Connection reuse and setup

When a request must use the network, first ask whether a suitable connection already exists. If one can be reused, that exchange does not need a brand-new transport connection or brand-new secure session.

If no suitable connection exists, setup can include obtaining a usable network address, establishing the required transport, establishing security state for HTTPS, and then carrying the HTTP request. Address caches, connection pools, protocol negotiation, and network environment can skip or alter parts of that work.

HTTP/1.1, HTTP/2, and HTTP/3

HTTP/1.1, HTTP/2, and HTTP/3 transport shape

HTTP/1.1

Requests share or use multiple TCP connections
Limited multiplexing model

HTTP/2

Many HTTP streams on one TCP connection
TCP loss can stall connection progress

HTTP/3

HTTP over QUIC
Independent QUIC streams reduce cross-stream loss blocking
HTTP semantics remain HTTP; the versions differ in framing, multiplexing, and transport behavior.

RFC 9110 defines semantics shared by the major HTTP versions. The versions differ in message carriage and connection behavior.

HTTP/1.1

HTTP/1.1 expresses HTTP messages using its message syntax over a connection. Connections can be persistent and reused for multiple requests.

HTTP/2

HTTP/2 preserves HTTP semantics while introducing binary framing, field compression, and multiple concurrent exchanges on one connection.

HTTP/3

The practical debugging rule is:

Identify the HTTP version and connection state before inferring which setup work belongs to this request.

Constructing the request

Before an HTTP exchange can happen, the caller needs request semantics: a method, target, fields, and optionally a body.

For a browser Fetch operation, the browser also applies Fetch-specific policy such as request mode, credentials mode, redirect mode, and cache mode. Those policies are part of the browser's fetching model; they are not themselves generic HTTP semantics.

A browser can therefore prevent, redirect, or satisfy a fetch before application code on the origin sees the request.

Intermediaries and origin processing

Request path and boundary ownership
  1. Browser / app
    Client cache and fetch policy
  2. CDN / edge
    Cache, WAF, rate limit
  3. Gateway / reverse proxy
    TLS, auth, routing, timeout
  4. Load balancer
    Backend selection / health
  5. Origin service
    Application logic
Trace which boundary actually produced the response before debugging the origin application.

A request that leaves the client can still encounter several participants before business logic runs:

  • forward proxy;
  • CDN or shared cache;
  • reverse proxy;
  • API gateway;
  • load balancer;
  • service ingress;
  • origin application.

This is illustrative, not a required topology. When diagnosing a response, ask which participant generated it. Response fields, trace context, server timing, logs, CDN headers, gateway logs, or application correlation IDs can help establish the boundary.

A fast 404 from an edge cache and a 404 generated by application routing have the same HTTP status semantics but very different debugging paths.

Response processing

Receiving bytes successfully over the network does not mean the application operation succeeded. Separate:

  1. network/connection failure — no usable HTTP response was obtained;
  2. HTTP error response — for example 404, 429, or 503;
  3. application-level failure represented inside a nominally successful HTTP response — for example a domain error encoded in a 200 response body.

Once a response exists, a client may stream or buffer its body, update caches, decode content, apply redirect behavior, or expose the result to application code.

A redirect response is still an HTTP response. Following it creates another request whose cache and connection path must be evaluated for the new target.

Try it: Request Path Explorer

The explorer compares predefined request paths. It does not perform live network requests and does not invent representative millisecond timings.

Request Path Explorer

Compare deterministic HTTP request paths without inventing network timings. Each stage states whether it occurs in the selected scenario, is skipped, or depends on deployment/runtime conditions.
The client has no fresh HTTP-cache response and no suitable existing connection. This HTTPS scenario needs new connection and secure-session setup before the HTTP exchange.
Selected request path: Cold HTTPS request: The client has no fresh HTTP-cache response and no suitable existing connection. This HTTPS scenario needs new connection and secure-session setup before the HTTP exchange.

Request path stages

  1. Stage 1Construct requestPerformed

    The caller creates the request semantics: method, target URL, headers, body, and relevant browser policy context.

  2. Stage 2Check HTTP cachePerformed

    The client checks whether a reusable stored response can satisfy this request. In this scenario the cache lookup misses.

  3. Stage 3Resolve an address if neededConditional

    Name resolution is needed only when the client does not already have a usable address result. A cold HTTP connection does not prove that every DNS layer is also cold.

  4. Stage 4Establish transport connectionPerformed

    Because no suitable connection exists, the client establishes the transport used by the selected HTTP version, such as TCP for typical HTTP/1.1 or HTTP/2 use, or QUIC for HTTP/3.

  5. Stage 5Establish secure sessionPerformed

    This scenario uses HTTPS, so secure-session setup is required for the new connection. TLS is surrounding transport/security work, not the semantics of the HTTP request itself.

  6. Stage 6Send HTTP requestPerformed

    The request semantics are carried using the selected HTTP version once a suitable connection is available.

  7. Stage 7Traverse intermediaries if presentConditional

    A proxy, CDN, gateway, or load balancer can participate, but HTTP does not require every request to pass through the same intermediary topology.

  8. Stage 8Origin handles requestPerformed

    In this scenario no earlier cache satisfies the request, so the origin-side application path produces the response.

  9. Stage 9Receive and process responsePerformed

    The client receives the HTTP response status, fields, and body, then applies browser or application response handling such as streaming, caching, or decoding.

  10. Stage 10Construct redirect follow-upSkipped

    This response is not a redirect, so no follow-up request is created.

Performed/skipped describes this predefined scenario. Conditional means the stage depends on connection state, cache state, deployment topology, protocol choice, or another condition rather than being guaranteed for every HTTP request.

Use it to answer:

Which stages occurred for this request, which stages were skipped, and which stages depend on runtime or deployment state?

How to debug a slow or surprising request

Production scenario: The "phantom 200" and missing server logs

An engineering team receives customer bug reports: after updating user profile details, the web page continues displaying stale information. In DevTools Network panel, the engineer observes:

  • Status: 200 OK
  • Response Payload: Stale user profile data
  • Timing: 3ms

The engineer suspects backend caching or database bugs, spending over two hours searching application access logs, only to discover zero incoming requests recorded for that user.

  • Impact: Significant engineering time wasted across frontend and backend teams due to misdiagnosing the failure boundary.
  • Root cause: The engineer missed the DevTools Size column: it read (from disk cache)! The request never left the local machine. A preceding response included Cache-Control: public, max-age=3600, instructing the browser to fulfill subsequent fetches entirely from local storage.
  • Correct pattern:
    1. Inspect the Size/Transferred column first: (from disk cache) or (from memory cache) confirms client-side cache fulfillment.
    2. Emit Cache-Control: no-cache or private, no-store on sensitive, user-specific API endpoints to ensure the browser performs a network exchange.

1. Did a network request occur?

First determine whether a client cache or other local mechanism satisfied the request. If the request never reached the network, DNS, connection establishment, CDN routing, and origin latency are not the cause of this exchange.

2. Was there a redirect or revalidation?

A single user action can cause more than one HTTP exchange. Redirects and conditional validation requests add exchanges that can look like duplicated work unless you inspect statuses and request fields.

3. Was a connection reused?

Check the negotiated protocol and connection information available in your tooling. If the request reused an HTTP/2 or HTTP/3 connection, do not automatically attribute connection-establishment cost to every request carried on that connection.

4. Which participant returned the response?

Distinguish client cache, shared cache/CDN, gateway, reverse proxy, and origin application where your deployment provides evidence for those layers.

5. Where did time accumulate?

Separate, where tooling allows:

  • waiting for a connection path;
  • connection/security setup;
  • request upload;
  • intermediary/origin processing before response headers;
  • response body transfer;
  • client-side processing after bytes arrive.

Tool timing names and precision vary. Treat them as observations from that tool, not universal HTTP fields.

6. What kind of failure occurred?

A DNS failure, TLS/QUIC connection failure, HTTP 503, and domain validation error are different failure boundaries with different owners and retry decisions.

Failure boundaries

BoundaryExample symptomNext evidence to inspect
Name/address resolutionhost cannot be resolvedresolver/network diagnostics
Connection/security setupconnection or certificate/security failureconnection details, TLS/QUIC diagnostics
HTTP intermediarygateway/CDN/proxy-generated statusintermediary logs and response fields
Origin applicationapplication status/errorapplication logs, traces, correlation ID
Response body transfertruncated/aborted streamnetwork logs, server/client cancellation evidence
Client processingparse/policy/application failure after responsebrowser/app logs and Fetch policy context

Do not infer a later boundary when an earlier one already failed. An HTTP 500, for example, proves an HTTP response existed; it is not a DNS failure.

Retries and request semantics

Retry decisions belong to the operation's semantics, not just to whether a transport attempt failed.

HTTP defines method properties such as safety and idempotency, but an application's real side effects still depend on endpoint design. Before retrying a state-changing operation, determine whether it is safe to repeat, whether an idempotency contract exists, whether the previous attempt might have succeeded despite response loss, and which failure classes the retry policy covers.

Exercise

A browser shows an API request with these observations:

  • the browser reports HTTP/2;
  • an existing connection identifier is reused;
  • the request receives 304 Not Modified;
  • the application service has no normal request-processing log for the resource body;
  • the browser displays the previously stored representation.

Answer:

  1. Which facts prove that a network HTTP exchange occurred?
  2. Which connection-setup stages can you avoid attributing to this request?
  3. Why does 304 Not Modified not mean “the browser received a second full copy of the body”?
  4. What evidence would you need before claiming the request reached the application service rather than being handled by an intermediary validator?
Show the reasoning
  1. Proof of network HTTP exchange:
    The 304 Not Modified status code is only produced when a conditional request (e.g., carrying If-None-Match or If-Modified-Since) traverses the network and receives a server/intermediary response. If the request was satisfied entirely by the local browser cache without network involvement, DevTools would show 200 OK (from disk cache).
  2. Avoided connection-setup stages:
    Because the browser reports that an existing HTTP/2 connection identifier was reused, this exchange incurred zero latency for DNS resolution, TCP three-way handshake, and TLS session negotiation.
  3. Why 304 does not transfer the full body:
    A 304 Not Modified response conveys that the client's cached representation remains fresh. Its response body is empty (zero payload bytes). The browser satisfies rendering by reading the full body from its local cache storage.
  4. Distinguishing application service from intermediary:
    You would need end-to-end evidence such as an application trace ID or matching timestamped access log from the application service container. If an edge CDN or reverse proxy stored the ETag validation mapping, that intermediary can return 304 directly without forwarding the request to the application origin.

Agent rule

When debugging or changing code around an HTTP request, do not assume a universal DNS -> connect -> TLS -> origin sequence. Determine whether a cache satisfied the request, whether a suitable connection was reused, which HTTP version carried the exchange, which intermediary or origin generated the response, and whether the observed failure is network-level, HTTP-level, or application-level. Treat DNS, transport, and secure-session setup as adjacent conditional stages, not HTTP semantics themselves.

When debugging or changing code around an HTTP request, verify against this checklist:

  • Client cache verification: Did the request reach the physical network, or was it answered by disk cache / memory cache?
  • Connection reuse check: Did this request reuse an existing socket/TLS session or require fresh DNS, TCP, and TLS handshakes?
  • Protocol version awareness: Is the exchange running over HTTP/1.1 (sequential pipeline), HTTP/2 (multiplexed TCP streams), or HTTP/3 (QUIC UDP streams)?
  • Intermediary vs Origin boundary: Does the response status and headers come from an Edge CDN, API Gateway, WAF, or the origin backend?
  • Revalidation and freshness: Are ETag, Last-Modified, and Cache-Control configured so stale entries can be verified with lightweight 304 Not Modified?
  • Failure tier isolation: Is an observed issue a network/connection disconnect, an HTTP protocol error (e.g., 502/504), or a domain business logic error in a 200 body?
  • Safe retry semantics: Are automated retries restricted strictly to idempotent requests or protected by idempotency keys?
  • DNS Resolution — how names become usable network addresses.
  • TLS and HTTPS — authentication, confidentiality, and secure-session establishment.
  • HTTP Caching — freshness, validation, cache keys, directives, and shared/private caches.
  • CDN Behavior — edge routing, shared caching, revalidation, and origin shielding.
  • Backend Request Lifecycle — what happens after a request reaches service-side application boundaries.
  • Idempotency — how to make repeated operations safe when retries or ambiguous outcomes are possible.

Sources

Primary references verified on 2026-09-09:

On this page