System-Design
What is System Design?
System design is the process of how we build large-scale applications.
Basic Terminology
| Term | Simple Meaning | Example (WhatsApp) |
|---|---|---|
| Client | The device that makes requests | Your phone sending a chat message |
| Server | The computer that handles requests | WhatsApp’s backend that delivers the message |
| Database (DB) | Where data is stored | Stores your chat history and contacts |
| API | Rules for communication between systems | WhatsApp API that sends/receives messages |
| Latency | Delay between request and response | Time it takes for your message to be delivered |
| Throughput | Number of requests handled per second | WhatsApp handling millions of messages per sec |
| Load Balancer | Distributes requests across multiple servers | Ensures no single WhatsApp server crashes |
| Cache | Temporary fast storage | Stores recently sent messages for quick access |
| Scalability | Ability to grow with more users/data | WhatsApp working for millions of users at once |
| Redundancy | Backup systems to prevent failure | Duplicate servers in case one goes down |
| Fault Tolerance | Keeps working even if part fails | Message still sends even if one server fails |
| Microservices | Small independent services instead of one big app | WhatsApp splitting chat, call, and media services |
| Monolith | Single big application with all features inside | One large WhatsApp codebase (not split) |
| Horizontal Scaling | Adding more servers to handle growth | WhatsApp adding more servers worldwide |
| Vertical Scaling | Making one server more powerful (RAM/CPU) | Upgrading a WhatsApp server’s hardware |