Client-Server Architecture
Learn how the request-response cycle works — the fundamental pattern behind every web interaction.
What are clients and servers?
The web runs on a simple idea: one computer asks for something, and another computer provides it.
Client: The program asking for data — usually your web browser (Chrome, Firefox, Safari). Your phone's browser, a mobile app, even a smart TV's Netflix app are all clients.
Server: A computer that stores website files (HTML, CSS, JS, images) and sends them to clients when asked. Servers run 24/7, waiting for requests. Companies like Google, Amazon, and Netflix run thousands of servers in huge buildings called data centers.
This arrangement is called client-server architecture, and it is the foundation of the web. Every time you visit a website, watch a video, or check your email, the same pattern plays out: your client sends a request, a server sends a response.
Why not just have everything on your own computer? Because the web needs shared, centralized data. When you post a photo on Instagram, it goes to Instagram's servers so that your friends' clients can fetch it. If it only lived on your phone, nobody else could see it.