The Request
Journey
What happens when you type a URL into your browser? An end-to-end walkthrough of the 500ms that define the web.
1. DNS Resolution
"Where is example.com?"
Before any data moves, the browser must convert a domain name into an IP address.
- • Check Browser Cache
- • Check OS Cache / Hosts File
- • Recursion: Root → TLD → Authoritative
2. Connection (TCP/TLS)
"Can we talk?"
Total round trips: 2-3 before the first byte of actual data is sent.
3. The HTTP Request
"GET /api/user/1"
Host: example.com
Cookie: session=123...
Headers tell the server who you are (Auth), what you want, and what format you accept.
Latency Limit: The speed of light across continents.
4. Gateway & Load Balancer
"Where should I put this?"
- securityTermination: Finish the TLS connection here to save app server CPU.
- balanceAlgorithms: Round Robin, Least Conn, or IP Hash to pick a server.
5. The App Server
Business Logic
1. Authenticate JWT/Session
2. Validate input parameters
3. Fetch/Update necessary data
4. Construct JSON Response
6. The Database
SELECT * FROM users WHERE id=1;
The final destination. Memory cache hit? (1ms) Disk seek? (10ms) Table scan? (Seconds!)
Often the single biggest bottleneck in the entire journey.
Interview Guidance
The "Big Picture" Question
"Your service is experiencing high latency. Where do you look first?"
Don't guess. Use the **Journey Framework**. Check external network, then gateway limits, then app logic, finally database queries.
Mentioning the Edge
To impress an interviewer, talk about CDN/Edge termination. Every millisecond saved by finishing the TLS handshake closer to the user is a massive win.