Level 1 - Foundations #1. Client-Server Model
Source: Dev.to
š Short Intro (Why Iām Writing This)
Iām currently learning System Design and decided to learn in public by documenting my journey.
This blog is part of my System Design 101 series, where Iām learning System Design stepābyāstep from scratch.
Note: This series is not written by an expert ā itās a beginner learning out loud, sharing:
- what I understand,
- what confuses me,
- and what I learn along the way.
The goal is to build consistency, clarity, and invite discussion.
š What This Blog Covers
In this post, Iāll cover:
- What the ClientāServer model is
- Who acts as a client and who acts as a server
- How requestāresponse communication works
- What is inside an HTTP request and response
- Stateless vs. stateful servers (with intuition)
- Singleāserver vs. multiāserver architectures
š GitHub Repository
All my notes, examples, and practice code live here:
[GitHub repo link]
The repo is updated as I continue learning.
š Learning Notes
1. What is the ClientāServer Model?
The simplest definition: we have two machinesāone acts as a client, the other as a server.
- Client: requests something
- Server: responds with something
Thatās the core of the ClientāServer model.
2. A Slightly Better Definition
The ClientāServer model is an architectural pattern where:
- The client initiates requests
- The server processes requests and returns responses
- They communicate over a network
Now letās dive deeper into each component.
3. Who Is the Client?
A client is any entity that initiates a request.
Examples:
- Web browsers (Chrome, Firefox)
- Mobile apps (Android / iOS)
- CLI tools (
curl,wget) - Other backend services (microāservices)
ā ļø Gotcha:
- A client is not always a browser.
- A backend can be a client to another backend.
4. Who Is the Server?
A server is a component that listens for client requests, processes them, and sends back responses.
Examples:
- Web servers (Node.js, Django, Spring)
- Database servers (PostgreSQL, MongoDB)
- File servers
- Authentication servers
Gotcha:
- āServerā is a role, not a specific machine.
- One machine can act as both client and server simultaneously.
5. The RequestāResponse Flow
- Client prepares a request
- Client sends the request over the network
- Server receives the request
- Server processes the request
- Server sends a response
- Client receives the response

6. What Exactly Is Inside a Request?
A typical HTTP request contains:
- Method ā what you want to do (
GET,POST,PUT,PATCH,DELETE) - Endpoint ā e.g.,
/users - Headers ā authentication token,
Content-Type, etc. - Body (optional) ā data youāre sending
Example
GET /users/123 HTTP/1.1
Authorization: Bearer xyz
7. What Exactly Is Inside a Response?
A typical HTTP response contains:
- Status code ā e.g.,
200 OK,404 Not Found,500 Server Error - Headers ā
Content-Type, caching directives, etc. - Body ā JSON, HTML, binary data, etc.
Example
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": 123,
"name": "Alice"
}
8. Stateless vs. Stateful Servers
| Aspect | Stateless Server | Stateful Server |
|---|---|---|
| Memory of past requests | None ā each request is independent | Remembers client data (e.g., sessions) |
| Scaling | Easy to scale horizontally | Harder to scale because state must be shared |
| Typical use | Modern microāservices, REST APIs | Applications needing sessions (e.g., shopping carts) |
Illustration
- Stateless:
Client ā Request A ā ServerandClient ā Request B ā Server(no shared state) - Stateful: Server keeps session data between requests.
9. SingleāServer vs. MultiāServer
-
Single Server (early stage)
- Suitable for MVPs or prototypes
- Single point of failure
- Limited scaling
-
MultiāServer (real world)
- Multiple servers behind a load balancer that distributes traffic
- Improves availability and scalability

10. A RealāWorld Example (Putting It All Together)
When you open Instagram and refresh your feed:
- Your mobile app (client) sends a request to Instagramās servers.
- The request passes through a load balancer.
- One backend server processes the request.
- The server fetches data from the database.
- The server sends the response back.
- Your app renders the feed on screen.
11. Why the ClientāServer Model Matters in System Design
Almost every systemādesign discussion starts with:
- Who is the client?
- Who is the server?
- How do they communicate?
- Where does state live?
Understanding this model is the foundation for:
- APIs
- Load balancing
- Scalability
- Microservices
- Caching
ā Key Learnings & Takeaways
- Foundations of the ClientāServer model.
- How communication happens via a requestāresponse cycle.
- How load balancers and multiple backend servers work together.
- Basics of stateless vs. stateful servers.
If you faced any issues or have questions, let me know in the comments! š
š¬ Feedback & Discussion
Iād love your feedback!
If you notice:
- Something incorrect
- A better explanation
- Suggestions to improve my understanding
please comment below. Iām happy to learn and iterate.
ā **Support the Learning Journey**
If you find these notes useful:
- ā Consider giving the GitHub repo a āāÆstar ā it really motivates me to keep learning and sharing publicly.
š¦ **Stay Updated (Twitter / X)**
I share learning updates, notes, and progress regularly.
š **Whatās Next**
In the next post, Iāll be covering:
- š **OSI model / TCPāIP fundamentals**
Iāll also continue updating the GitHub repo as I progress.
š **Final Thoughts**
Thanks for reading!
If youāre also learning System Design, feel free to:
- follow along,
- share your experience,
- or drop questions in the comments š
What was fixed
| Issue | Original | Fixed |
|---|---|---|
| Inconsistent heading style | Plain text with emojis | Added bold headings and kept emojis |
| List formatting | Mixed bullet points and plain text | Unified bullet lists with proper indentation |
| Punctuation & spacing | Missing commas, extra spaces, inconsistent dash usage | Added commas, standardized emādash, removed stray spaces |
| Markdown syntax | No code block for clean copyāpaste | Wrapped the whole segment in a fenced code block for easy copying |
| Minor typos | āOSI model/TCP/IP fundamentalsā | Added space around the slash and used a nonābreaking hyphen for consistency |
| Line breaks | Random blank lines | Consolidated spacing for readability |
| Emoji placement | Scattered throughout lines | Kept emojis but placed them consistently at the start of headings |