Trace an HTTP request through the network layers and distinguish delay from throughput.
Lesson goal
Follow a request from a browser to a server and identify which layer is responsible at each step.
Before you begin — Application foundations.
A browser asks a server for a page. The browser knows which page it wants. The router in your home only needs enough information to send the packet one step closer to its destination. Dividing the work this way allows the same browser request to travel over Wi-Fi or Ethernet.
Suppose the browser uses HTTP/1.1 over TCP. Each layer adds the information its peer will need to interpret the data. This process is called encapsulation.
| Layer | What it contributes to this request |
|---|---|
| Application | HTTP expresses an operation such as GET /users/42. |
| Transport | TCP identifies the connection and tracks the order of its bytes. |
| Internet | IP adds addresses that routers use to forward packets toward the destination. |
| Link | Wi-Fi or Ethernet delivers a frame across the current local link. |
A switch can forward the frame within a local network. A router receives the packet and forwards it on another link, using a new frame for that hop. At the destination, IP delivers the payload to TCP. TCP makes the ordered bytes available to the server, which can then read the HTTP request.
This four-layer grouping describes the Internet protocol suite. You may also encounter the seven-layer OSI model. Its session, presentation, and application layers fit roughly into the application row above. Its data-link and physical layers fit into the link row.
Round-trip time (RTT) measures how long a signal takes to reach a peer and receive a reply. Throughput measures work completed per unit of time, such as bytes delivered per second. If a client needs two sequential exchanges on a path with a 40 ms RTT, it spends about 80 ms on round trips alone, before adding processing or transfer time. More bandwidth can help with a large response, while the client still has to wait for each dependent reply.
A request crosses three routers. Which part changes with each local link, and which information keeps the packet headed toward the server?
The link-layer frame carries the packet to the next hop. In ordinary routing, each router uses the packet’s destination IP address to select where to forward it. The HTTP operation matters when the packet’s contents reach the application.