Client-Server Architecture
Master the client-server model, the request-response lifecycle, DNS resolution, stateless vs stateful servers, and how a URL becomes a webpage in your browser.
Master the client-server model, the request-response lifecycle, DNS resolution, stateless vs stateful servers, and how a URL becomes a webpage in your browser. This hands-on tutorial focuses on practical implementation of client-server architecture concepts.
Client-Server Architecture
Every application you use — from Google Search to WhatsApp — is built on the client-server model. Understanding this architecture is the bedrock of system design.

The Client-Server Model
The client-server model divides responsibilities between two entities:
- Client: Initiates requests. Can be a browser, mobile app, desktop app, or another service.
- Server: Listens for requests, processes them, and returns responses.
How DNS Works
DNS (Domain Name System) is the phone book of the internet — it translates human-readable domain names into IP addresses.
Stateless vs Stateful Servers
This is one of the most important architectural decisions in system design.
Key Insight: Store State Externally
| Pattern | State Storage | Scalability |
|---|---|---|
| Stateful | In server memory | ❌ Hard — sticky sessions required |
| Stateless (Session Store) | Redis / Memcached | ✅ Easy — any server can handle any request |
| Stateless (JWT) | In the token itself | ✅ Very easy — no server-side storage needed |
How a URL Becomes a Webpage
Let's trace what happens when you type https://techcoder.io/courses and press Enter:
TCP vs UDP at a Glance
| Feature | TCP | UDP |
|---|---|---|
| Connection | Connection-oriented (3-way handshake) | Connectionless |
| Reliability | Guaranteed delivery, ordering | No guarantee |
| Speed | Slower (overhead) | Faster |
| Use Cases | HTTP, HTTPS, SMTP, SSH | DNS, video streaming, gaming |
| Error Handling | Retransmission on loss | Application handles (or ignores) |
[!TIP] Remember the rule: If data loss is unacceptable (banking, APIs, web pages) → TCP. If speed matters more than perfect delivery (live video, games, DNS lookups) → UDP.
Quiz
Quiz
Question 1 of 2Why is a stateless server architecture preferred for horizontal scaling?
Official Resources
- How DNS Works — Cloudflare Learning
- HTTP Overview — MDN Web Docs
- TCP/IP Illustrated — Stevens (Book)
- High Performance Browser Networking — Ilya Grigorik (Free)
Key Takeaways
✅ The client-server model is the foundation of virtually all networked applications.
✅ DNS is a hierarchical caching system — caches at every level make it fast.
✅ Stateless servers + external session store (Redis) = the key to horizontal scalability.
✅ A single browser request involves DNS lookup + TCP handshake + TLS handshake + HTTP request + server processing + rendering — understanding this helps you optimize each layer.
What's Next?
Next: Networking Basics for Engineers — HTTP/1.1 vs HTTP/2 vs HTTP/3, TCP deep dive, and the network protocols every system designer must know.