Beginner bootcamp · Module 1
How a request travels the internet
8 min reading · Sources
Outcome: Trace name resolution, transport security, an HTTP request and its response; distinguish a connection from an application operation.
More
Page details
Published date · Last edited:
Prerequisites: None. Start here if you have not drawn a system before.
Hypothetical scenario: Northwind’s first product page opens in one browser but not another. The team needs to locate the failing boundary before adding servers. A URL is an instruction to find and contact a service; it is not a direct reference to a particular database row.
Words to recognize
Client
Definition: A program acting as the requester in an interaction. Related topic
Server
Definition: A program that receives requests and provides a service. Related topic
DNS
Definition: Domain Name System: a distributed system for resolving names into records such as IP addresses. Related topic
TLS
Definition: Transport Layer Security: a protocol for authenticating peers and protecting data in transit. Related topic
HTTP
Definition: Hypertext Transfer Protocol: application semantics for requests and responses over the web. Related topic
RTT
Definition: Round-trip time: elapsed time for a signal or exchange to travel out and back. Related topic
Start with a name, not a machine
Imagine mailing a question to a department whose street address can change. The department name is useful because you do not want every correspondent to remember its current building. A domain name serves a similar purpose. DNS resolves names into records; cached answers have lifetimes, so a change is not an instant broadcast to every client.
The client is the program making a request. A server is the program answering it. These are roles: the same application can answer a browser and act as a client to another service. An IP address identifies a network destination; a port helps identify the receiving transport endpoint. Neither tells you which business operation is intended.
Separate transport from meaning
With HTTPS, the connection must also establish an authenticated encrypted channel. TLS provides this protection; it does not decide whether the signed-in person may read an order. HTTP describes the application exchange: a method, target, headers and possibly a body, followed by a response with a status and content. A successful transport connection therefore does not prove a successful purchase.
HTTP/1.1 and HTTP/2 commonly use TCP. HTTP/3 uses QUIC over UDP. QUIC supplies reliable streams and integrates security; saying “UDP” alone does not imply that the application accepts arbitrary loss. WebSocket provides a persistent bidirectional channel, while server-sent events provide server-to-client updates over an HTTP response. Choose the interaction pattern from the direction and lifetime of messages.
Work a small latency budget
Assume a cold connection requires three sequential setup round trips in a deliberately simplified model, plus one request/response round trip. Let each round trip take 40 milliseconds, application processing take 15 milliseconds, and name resolution take 10 milliseconds. Setup and exchange take 4 × 40 = 160 milliseconds. Adding processing and resolution gives 160 + 15 + 10 = 185 milliseconds. These are illustrative assumptions; protocol negotiation, connection reuse and packet loss change the real path.
If the next request reuses the connection and cached name result, this model removes 3 × 40 + 10 = 130 milliseconds. Its estimate becomes 55 milliseconds. This explains why a warm request can improve even if application code is identical. It does not establish a universal latency benchmark.
When the page still fails
Hypothetical scenario: DNS resolves an obsolete address, so the request never reaches the new application. Adding database replicas cannot fix this boundary. Check the resolved destination and cache lifetime, then connection establishment, certificate validation and finally the HTTP response.
A 5xx response indicates a server-side failure category, but may have been produced by an intermediary. A timeout is less precise: the server might have committed the operation before its response was lost. For writes, record a stable operation identity before retrying. Use this request trace whenever you need to distinguish unreachable, unauthorized, slow and unsuccessful; do not treat every problem as a need for more servers.
Choose an interaction, then an encoding
An API is an agreement about the messages accepted and the results returned. REST, GraphQL and gRPC are not three network cables. REST names architectural constraints, GraphQL supplies a query language and execution model, and gRPC supplies an RPC framework commonly used with Protocol Buffers. JSON is a representation format, while Protocol Buffers uses schemas and a binary representation. Choose the operation and compatibility rules before choosing the encoding. A compact representation can reduce transferred bytes without solving a slow database query.
For a product lookup, the request needs an identifier, an authorization context if required, and a rule for missing products. For a state change, also define validation, repeated-attempt identity and what acceptance means. Do not infer safety from a method name alone. HTTP describes safe and idempotent method semantics, but an incorrectly implemented endpoint can violate them. A GET request should not charge a card simply because it is convenient to trigger from a browser link.
Inspect connection reuse and independent streams
HTTP/2 multiplexes several HTTP streams over a connection, but TCP delivers one ordered byte stream. Loss of transport data can delay delivery of bytes belonging to more than one HTTP stream. QUIC separates delivery across streams, although streams still share congestion control and a network path. It does not make congestion or retransmission disappear. For live media, application deadlines can make late data useless even when eventual delivery is technically possible.
Polling is a reasonable baseline for infrequent updates. Long polling holds a request until an event or timeout. Server-sent events let the server send a sequence of textual events; the client can still issue separate requests. A WebSocket supports messages in both directions, but requires connection ownership and reconnect behavior. A disconnected client needs a way to discover what it missed. The useful question is whether events are hints to refresh an authoritative resource or the only record of state. The latter needs durable positions and recovery rules, not merely a continuously open socket.
Check your decisions
The TCP connection succeeds. Does that prove the order was accepted?
No. Transport reachability says nothing about authorization, validation or durable acceptance. Inspect the application result and operation identity.
Why can the second page request be faster with unchanged server code?
It may reuse name resolution and an established connection. The worked model removes 130 milliseconds of setup, not application work.
A payment request times out. Should the client issue a new payment immediately?
No. The response may have been lost after acceptance. Reuse the operation identity and query or retry under an idempotency contract.
Go deeper
- RFC 9110: HTTP Semantics — Fielding, Nottingham & Reschke · Primary document. Defines methods, status codes and request semantics. Verified 2026-10-26.
- RFC 9000: QUIC — Iyengar & Thomson · Primary document. Explains reliable streams over UDP and connection establishment. Verified 2026-10-26.
Decision log
Decision: trace one request across named boundaries before changing the topology.
Limit: a transport trace cannot establish the durable outcome of a business operation.
Next decision: identify which component runs out of capacity under the expected workload.