Design Requirements
Client and Server
A client is something (a computer, phone, or app) that asks for data or service.
Example: When you open Google in your browser, your browser is the client. It asks Google's servers for search results.
What is a Server
A server is a computer that listens to client requests and gives responses.
Example: Google's computers (servers) store all web data and send you the results you ask for.
Database
A database is where data is stored and managed.
Example: When you log into Instagram, your username and password are checked in a database.
API (Application Programming Interface)
An API is a set of rules that allows different software to talk to each other.
Latency
Latency means how much time it takes for a request to travel from client to server and back.
Example: If you click a button and it takes 2 seconds to show results, the latency is 2 seconds.
Lower latency = faster response.
Throughput
Throughput means how many requests a system can handle in one second.
Example: If your system can handle 1000 requests per second, that is the throughput.
High throughput = more users can use the system at the same time.
Scalability
Scalability means how easily your system can grow to handle more users or data.
Example: If your app works well for 100 users, but also works well for 10,000 users after some setup, it is scalable.
Vertical Scaling and Horizontal Scaling
These are two ways to scale a system.
Vertical Scaling (Scaling Up)
You upgrade the same machine — make it more powerful.
Example: Add more CPU or memory to the server.
Good for simple systems, but there is a limit to how big one machine can be.
Horizontal Scaling (Scaling Out)
You add more servers to share the work.
Example: Instead of one server handling all traffic, use 3 servers together.
This is more powerful and flexible for large systems.
Load Balancer
A load balancer is like a traffic manager that sends user requests to different servers to balance the work.
Example: If 1000 users visit your website at once, the load balancer spreads them across multiple servers.
Redundancy
Redundancy means having extra copies of systems or data, in case one fails.
Example: If one server goes down, another one can take over.
If Server 1 fails, Server 2 takes its place. This keeps the system running.
Fault Tolerance
Fault tolerance means your system keeps working even when something fails.
It uses redundancy and other methods to make sure users don't notice a failure.
Example: If one database or server fails, the system automatically switches to another one —> no downtime for users.
Summary
| Term | Meaning | Example |
|---|---|---|
| Client | The user or app sending request | Browser sending request |
| Server | The computer answering requests | Google server sending results |
| Database | Stores and manages data | User info in Instagram |
| API | Bridge between client and server | Mobile app talking to backend |
| Latency | Delay time for one request | 2 seconds to load page |
| Throughput | Requests per second | 1000 req/sec |
| Scalability | Ability to handle more users | From 100 to 10,000 users |
| Vertical Scaling | Bigger single server | Add more RAM |
| Horizontal Scaling | Add more servers | 3 servers share work |
| Load Balancer | Distributes traffic | Spreads requests evenly |
| Redundancy | Backup components | Backup server ready |
| Fault Tolerance | Keeps system running on failure | Switch to backup server |