TechCoder.io / System Design

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.

By TechCoder TeamLast updated: 2026-10-17
In a Nutshell

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.

Client-Server Request-Response Flow

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.

PYTHON PLAYGROUND
⏳ Loading editor…

Stateless vs Stateful Servers

This is one of the most important architectural decisions in system design.

Key Insight: Store State Externally

PatternState StorageScalability
StatefulIn 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:

PYTHON PLAYGROUND
⏳ Loading editor…

TCP vs UDP at a Glance

FeatureTCPUDP
ConnectionConnection-oriented (3-way handshake)Connectionless
ReliabilityGuaranteed delivery, orderingNo guarantee
SpeedSlower (overhead)Faster
Use CasesHTTP, HTTPS, SMTP, SSHDNS, video streaming, gaming
Error HandlingRetransmission on lossApplication 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 2

Why is a stateless server architecture preferred for horizontal scaling?

Stateless servers are faster than stateful servers
Any server can handle any request since state is stored externally — no sticky sessions needed
Stateless servers use less memory

Official Resources

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.