LAB / 02
HTTP Lifecycle
Press SEND REQUEST and follow one packet through the layers that stand between Enter and 200 OK. Click any layer to learn what it actually does.
- Compose the request
- DNS lookup
- TCP handshake
- TLS handshake
- Send the request
- Server accepts
- Application logic
- Database query
- Result back to app
- Response prepared
- Response received
- Compose the requestGET https://api.example.com/projects — method, path, headers, body.
- DNS lookupapi.example.com → 192.0.2.10 (simulated). The name is resolved to an address.
- TCP handshakeSYN → SYN-ACK → ACK. A reliable connection opens before traffic flows.
- TLS handshakeCipher agreement + certificate check. The channel is now encrypted.
- Send the requestGET /api/projects travels over the encrypted tunnel.
- Server acceptsConnection accepted, request parsed, route matched.
- Application logicThe handler validates input and asks the database for data.
- Database querySQL executed — matching rows are returned to the application.
- Result back to appRows are shaped into the response inside the application.
- Response prepared200 OK — headers and body are assembled at the server.
- Response received200 OK — round trip complete (educational simulation).
Client
Composes and sends the request — here, a browser. It holds cookies, keeps the TLS session and parses the response.
DNS
Maps a domain name to an IP address so the requests can be routed. Done once per name, rarely per request.
TCP
Provides a reliable, ordered byte stream. A connection is opened with a three-way handshake (SYN → SYN-ACK → ACK).
TLS
Encrypts the connection for HTTPS. Certificates are verified and keys exchanged before any HTTP bytes travel.
HTTP
The application protocol: method, path, headers, body. Here it carries GET /api/projects over the TLS tunnel.
Server
Accepts the connection, terminates the request, parses headers and routes the work to the application layer.
Application
Runs your code: routing, validation, authentication and business logic. It decides what to ask the database.
Database
Stores persistent data. It executes the query the application asks for and returns matching rows.
Compose the requestGET https://api.example.com/projects — method, path, headers, body.
This is an educational simulation of one HTTPS round trip. The addresses and timings are simulated — 192.0.2.10 is a documentation range, deliberately not a real host. Real requests re-use the TCP and TLS connection, keep DNS answers cached, and reach the application in reverse order server-side; none of that nuance is shown here, only the layers in play.