Foundations / 1 / 3
The life of a request
A user opens a page. Before a single byte of it arrives, the request looks up an address, opens a connection, agrees on encryption, passes a load balancer and an app server, and asks the database. Where do the milliseconds go?
- 10 min
- Beginner
- 10 steps
- Time so far
- 38 ms
- Round trips
- 1
- Database time
- 0 ms
- request
- reply
- redelivery
- duplicate
- lost
Numbers are a model scenario, not measurements
The real request
Browser → DNS resolverRequest
QUERY shop.example.com IN A1
Response
ANSWER shop.example.com
A 203.0.113.102
TTL 3003
query time: 38 ms
IN A— The question: give me the IPv4 address (record typeA) for this name.203.0.113.10— The answer. This is the public address of the shop's load balancer, not of one server.TTL— 300 seconds. The browser and the OS may reuse this answer for five minutes without asking again.
Course: 42 lessons
01 Foundations
02 Scaling
03 Data & storage
04 Communication
05 Reliability
06 Architecture
07 Security
08 Shipping
09 Whole systems
10 Business processes