Computer Networks Basics·Lesson 5 of 10
Client-Server Model
What Is the Client-Server Model?
The client-server model is a way of organizing a network where one set of machines provides services and another set consumes them. A is a machine that waits for requests and responds to them; a is a machine that initiates requests. Your browser is a client; the machine hosting a website is a server. The relationship is centralized — many clients depend on relatively few servers.
A restaurant
You (the client) place an order with the waiter. The kitchen (the server) prepares it and sends it back. You don't cook, and the kitchen doesn't decide what you want — each side has a clear role. One kitchen serves many tables, just as one server handles many clients.
How a Request Works
Every interaction follows the same request-response cycle. When you open a web page, this exact sequence runs in a fraction of a second.
The request-response cycle
- The client sends a request to the server (e.g. "give me this page")
- The server receives the request and processes it
- The server prepares a response (the page, data, or an error)
- The server sends the response back to the client
- The client receives and displays the result
Defining Characteristics
- Centralized — servers are the single source of truth and control
- Asymmetric roles — clients request, servers respond; they're not interchangeable
- Servers are always on, waiting for requests; clients come and go
- Easy to secure and manage because control sits in one place
Where You See It
The client-server model is everywhere on the modern internet. Almost any time you open an app that fetches data from somewhere, you're the client and something else is the server.
- Web browsing — browser (client) ↔ web server
- Email — mail app (client) ↔ mail server
- Databases — application (client) ↔ database server
- Online games — game (client) ↔ game server
Strengths and Weaknesses
Advantages
- Centralized control makes data easy to manage and secure
- Simple to back up — everything important lives on the server
- Clients can be lightweight; the server does the heavy work
- Easy to update: change the server, every client benefits
Disadvantages
- The server is a single point of failure
- A popular server can be overwhelmed by too many requests
- Servers cost money to run and maintain
- Scaling means investing in more powerful or more servers
“"A server is always one physical computer."”
Q:What's the fundamental difference between a client and a server?
A: The client initiates the request and the server responds to it. The roles are asymmetric and fixed for a given interaction — the server provides a service, the client consumes it. The same physical machine can play either role in different interactions.
Quick Revision Cheat Sheet
Model: Centralized — servers provide, clients consume
Client: Initiates requests (browser, app)
Server: Waits for and answers requests; always on
Core pattern: Request → process → response
Main weakness: Server is a single point of failure