What Is System Design?
Overview
System design is the skill of deciding which pieces a software product needs and how they fit together so it keeps working as more people use it. This lesson starts from zero: what a client, a server, a request and a database are, and how they combine into a system.
Detailed Notes
What is a system
A system is a group of programs and machines working together to do a job. When you open a food-delivery app, order a pizza and see it arrive on a map, you are using a system with many parts, not a single program.
System design is the work of choosing those parts and deciding how they talk to each other. It answers questions like "where do we store the orders?" and "what happens when a million people open the app at once?"
The basic building pieces
Every system is built from a few simple ideas:
- Client: the program that asks for something. Your phone app or your web browser is a client.
- Server: a computer (or program running on one) that waits for clients to ask for things and answers them. It is called a server because it serves clients.
- Request: the message a client sends, such as "show me my orders".
- Response: the message the server sends back, such as the list of orders.
- Database: a program that stores data permanently, so that it is not lost when a server restarts. Orders, users and messages live here.
- Network / the internet: the wires and wireless links that carry requests and responses between clients and servers.
Think of a restaurant. You (the client) tell the waiter what you want (the request). The kitchen (the server) prepares it, looks up ingredients in the pantry (the database), and the waiter brings back your meal (the response).
The problem it solves
A tiny app with ten users runs fine on one server. But success creates problems:
- Too much traffic: one server can only handle so many requests per second (this is its capacity).
- Failures: a single server can crash, and then everyone is locked out.
- Slowness: a user far from the server, or a server doing too much work, makes pages slow.
- Growth in data: the database gets too big for one machine.
System design is how we plan for these problems before they hurt users.
How it works
Most web systems follow the same loop:
- The client sends a request over the network.
- A server receives it and runs the application logic (checks who you are, applies rules).
- The server reads or writes data in the database.
- The server sends a response back.
- The client shows the result to the user.
When the system grows, we add more pieces around this loop. We might run many servers instead of one, add extra copies of the data, or keep popular results ready in memory. You will learn each of those ideas in later chapters, one at a time.
A simple example
Imagine you build a note-taking app. Version 1 is one server and one database on one machine. You save a note: the app (client) sends a "save this note" request, the server stores it in the database, and replies "saved".
It works for 100 users. At 1,000,000 users the machine is overloaded, and if it crashes nobody can reach their notes. The app did not change, but the system around it must.
System design example
A video-sharing site needs to upload videos, store them, and let people watch. A designer would think about:
- Where the video files are stored (they are huge).
- Where the information about each video (title, owner) is stored.
- How to make playback fast for viewers in different countries.
- What happens if one machine fails mid-upload.
No single answer is "correct". The designer picks a reasonable answer, explains why, and notes what it costs. That is what interviewers look for too.
Summary
- A client asks, a server answers, a database remembers.
- A request goes out and a response comes back over a network.
- One machine works for small apps but runs into limits on traffic, failures, speed and data size.
- System design is planning how the pieces fit so the product keeps working as it grows.
Architecture Diagram
The basic loop behind almost every app.
- 1The client sends a request over the network.
- 2The server runs the application logic.
- 3The server reads or writes the database.
- 4The server sends a response back to the client.
Common Interview Questions
Finished this lesson?
0 of 91 lessons done · 0% of the course

