🖥️ System Design · System Building Blocks
Client-Server
Clients request services or data from a server.
Your browser is usually a client; backend software processes requests.
A browser sends /orders/123 to a server and receives order data.
💡 Like ordering at a counter: you ask for what you want, the kitchen does the work and hands it back.
💡 Why it matters
Almost every app you use follows this pattern, so understanding it is the foundation for everything else. Splitting work between a client and a server lets many users share one powerful backend and keeps data in one trusted place. Knowing where work happens helps you decide what to do on the device and what to keep on the server.
🛠️ How to achieve it
⚠️ Signs of trouble
- •Important rules run only on the client and can be bypassed.
- •The server returns far more data than the client needs.
- •Request meanings are unclear or inconsistent.
- •The client assumes the server is always fast and always up.
🎯 Quick check
Score: 0/3Three questions to test the idea.
1. In the client-server model, what does the server do?
Answer: Processes requests and returns results
The server does the trusted processing and sends results back to the client that asked.
2. Why should you never trust the client to enforce rules?
Answer: Anything on the device can be tampered with
Code and data on the device can be changed, so rules and permissions must be checked on the server.
3. What makes a good request design?
Answer: A clear address and meaning for what is asked
Clear, predictable requests let the server understand exactly what the client needs.
