Client vs Server: How the Web Really Works
You tap a button in an app. A moment later, the screen loads. But have you ever wondered who actually did the work behind that tap?
Every website and app you use rests on one quiet exchange between two computers. Once you see it, the web stops feeling like magic and starts making sense.
In the client vs server model, the client is the device that asks for something (your phone or laptop), and the server is the computer that answers it. One side requests, the other side replies.
What is a client and what is a server?
The web has two sides. One side asks for things. The other side answers. That is the whole idea behind client vs server.
The client is you, or your device. When you open Flipkart or send a WhatsApp message, your phone is the client. It makes a request and waits.
The server is a powerful computer sitting somewhere else. It receives your request, does the actual work, and sends the answer back. You never see it, but it is always there.
How does the client and server work together?
Think of ordering on Zomato. You place an order on the app. The kitchen cooks the food. Then it arrives at your door.
The web works the same way:
- The client (your phone) places the order, the request.
- The server (the kitchen) cooks the food, does the heavy work.
- The server sends the finished result straight back to you.
Your phone never cooks the food. It only places the order. The server does the real work, then ships the result back. That back-and-forth, you ask and they prepare, is happening every single time a page loads.
Why does client vs server matter?
Because the whole web is built on this one exchange: one asks, the other answers. Every page you scroll, every app you open, every video you stream is just a client requesting and a server replying.
Once you understand this, bigger ideas become easy. You will see why your phone can be small and cheap while the server stays heavy and powerful. You will understand why a slow app is often a slow server, not a slow phone. This single picture unlocks almost everything that comes next in the free Zero to AI Hero course.
How do I try client vs server myself?
You can watch this exchange happen with one command in your terminal. A HEAD request asks a server for its reply headers, without downloading the full page.
curl -I https://www.zomato.com
The server replies with a status line. If you see 200, that means OK, the server understood and answered. You just acted as a client and got a reply from a real server, no app needed.
If this builds on the earlier idea of what loads behind a site, you are now seeing the two computers actually talk.
Key takeaways
- Client: the device that asks, like your phone or laptop.
- Server: the computer that answers and does the heavy work.
- The pattern: the client requests, the server replies, every time.
- Real example: Zomato, your phone orders, the kitchen (server) cooks and delivers.
- Try it: run
curl -Ion any site and look for the200reply.
That is client and server in a nutshell. Next up: HTTP, the language these two computers use to talk to each other.
🚀 Take the full free course: Zero to AI Hero — learn to build with AI from scratch. New lessons daily, in Hindi & English.
Want to actually learn this?
151 free 2-minute lessons — from "what's a file?" to building with AI.
▶ Start the free course