Topic 6.1
Internet Basics
In one line
Client, server, DNS, IP, port — the five components behind every request you've ever made.
Think of it like this
Sending a letter. The IP address is like the street address of a building; the port number is like the flat number inside that building; DNS is the phone book that looks up 'Ramesh's house' and gives you the street address.
Key ideas
- 01
Client: the one requesting (browser, app, another service). Server: the one responding (could be another service).
- 02
IP: addresses the machine (IPv4 12.7.0.1 / IPv6). Port: addresses the process ON the machine (443 = HTTPS).
- 03
DNS: the global phonebook translating human names → IP (and load-balanced VIPs).
- 04
A socket = IP + port + protocol — the concrete endpoint of a connection.
- 05
The full journey a user request takes in one line: Browser → DNS → Load Balancer → Server → Database.
- 06
Interview: always trace the first request of the day end-to-end; it surfaces DNS/flush, TLS, and connection pooling.
Java / Spring map
- →
RestTemplate/WebClient use the OS socket; connection pools (Apache HttpClient) reuse sockets to dodge three-way-handshake cost.
Code & diagrams
The one diagram every HLD answer secretly starts from.
Explain without notes
What does the browser do the very first time you type sysdesign.google and hit Enter? Step by step.
Practice
Trace the flow for 'user opens the food-delivery app in a new datacenter' — where does DNS lag show up?
Trade-offs
- ↔
DNS caching speeds things up but stale entries cause outages — TTL is the dial between freshness and load.
Run it in production
You've designed it. Now build, operate, and break the same idea hands-on in the DevOps courses:
Completion checklist
I can narrate Browser → DNS → LB → Server → DB in under a minute.