The big picture: the main parts of a system, what each one does, and how data flows between them.
High-level design (HLD) is the big picture of a system: the main parts, what each one is for, and how data moves between them. It answers "what are the boxes, and how do they talk?" It does not answer "what are the class names?"
A system is too big to hold in one head, so we draw it at different zoom levels. HLD is the zoomed-out view. You can see the whole city, the main roads and the bridges. You cannot see the furniture inside any house. Someone who has never seen the code should be able to read an HLD and explain how a request travels through the system.
A good HLD has five ingredients: the components (the boxes), the connections (the arrows, with a direction and a reason), the data (what is stored where), the numbers (how much traffic and data the picture must handle), and the decisions (why this and not something else).
| Part | What it says | Example |
|---|---|---|
| Components | The main building blocks and the job of each | Load balancer, API service, cache, database, queue, search index |
| Data flow | How requests and data move. Show the read path and the write path separately | Write: client to API to database. Read: client to cache to database on a miss |
| Storage choices | Which kind of store holds which data, and why | User profiles in SQL, images in object storage, hot items in a cache |
| Interfaces | The APIs at the boundaries between boxes, not their internals | POST /links, GET /{code} |
| Non-functional plan | How the design meets scale, availability and consistency goals | Three replicas, two zones, eventual consistency for counters |
| Capacity numbers | The estimates the picture must handle | About 400 writes per second, 40,000 reads per second |
| Deployment view | Where it runs: regions and zones | Two regions, active-active, a CDN in front |
| Failure plan | What happens when a box dies | The load balancer removes it, the replica takes over |
The C4 model is a popular way to zoom: level 1 (context) shows your system as one box among its users and other systems. Level 2 (containers) opens that box into the deployable parts, such as the web app, the API and the database. Levels 3 and 4 (components and code) belong to low-level design.
| High-level design (HLD) | Low-level design (LLD) | |
|---|---|---|
| Question | What are the parts, and how do they connect? | How is one part built inside? |
| Zoom | The whole system | One component or module |
| Shows | Services, stores, queues, flows | Classes, interfaces, methods, patterns |
| Decides | Technology, scale, availability, data placement | Structure of code, responsibilities, extensibility |
| Typical author | Architect or tech lead | The engineer who builds the component |
| Interview | โDesign a URL shortener / chat appโ | โDesign a parking lot / an elevatorโ |
Most requests are redirects. A few popular links get most of the traffic, and a redirect must feel instant.
A teaching model with fixed rules, not a rulebook. Real designs depend on the numbers: with different traffic, a different set of blocks could be the right answer. Always say why you added each box.
| Check | Ask yourself |
|---|---|
| Requirements | Can I point to the requirement behind every box? |
| Components | Does each box have one clear job and one clear name? |
| Data flow | Are there labelled arrows, and both read and write paths? |
| Data | Is it clear what is stored where, and why that store? |
| Scale | Are there numbers, and does each box handle them? |
| Failure | What happens when each box dies? Is there a single point of failure? |
| Trade-offs | Can I say what I gave up with each choice? |
| Term | Meaning in easy words |
|---|---|
| High-level design (HLD) | The big picture: main components and how they connect |
| Low-level design (LLD) | The inside of one component: classes, interfaces and patterns |
| Component | One box with one job, such as a cache or a service |
| Data flow | The path data takes through the system |
| Read path / write path | The route of a request that reads data, and one that changes it |
| Architecture diagram | A drawing of the parts and their links |
| C4 model | A set of four zoom levels: context, containers, components, code |
| Design doc / RFC | A written proposal that holds the HLD and the alternatives |
| ADR | Architecture decision record: a short note on one decision and its reasons |
| Single point of failure | One part whose failure stops the whole system |
| Non-functional requirement | How well the system must work: speed, uptime, scale |
| Choice | We gain | We lose |
|---|---|---|
| Detailed HLD | Fewer surprises | More time before coding starts |
| Light sketch | Speed, room to learn | Gaps found late |
| Few big components | Simple to run and reason about | Harder to scale parts separately |
| Many small components | Independent scaling and teams | More network calls and more to operate |
| Named technologies | Concrete and testable | Locks in early, sometimes for fashion |