SysAlchemy
foundations~6 min

Client vs server

A client asks. A server answers. Everything else in system design is about what happens between them when there are many clients.

Why this matters

People jump to 'microservices' before they can point at which machine is waiting and which machine is working. If you cannot name the client and the server, you cannot reason about latency, load, or failure.

Mental model

The client is anything that starts a request: a browser, a phone app, another service. The server is the process that receives that request, does work, and returns a response. One server can talk to another — then the first server is a client of the second. Roles are about the request, not about the company org chart.

One diagram

HTTP requestBrowserClientWeb serverApp server

Treating 'the backend' as one magic box

Beginners draw one cloud labeled backend and stop. That hides whether the delay is in the network, the app, or the disk. Always name who initiates the call.

In this lesson

Client
The side that starts a request and waits for a response.
Server
The side that listens, handles a request, and replies.

Checks

Your phone app loads a profile. Which is the client?
A web server calls a payment API. In that call, the web server is…

Name the initiator and the handler. That pair is the unit you will scale, cache, and protect.

All lessons