What is Low Level Design? (LLD vs HLD)
Introduction
Imagine you are planning to build a house.
First you hire an architect, who decides how many floors there will be, where the kitchen sits next to the living room, and how the plumbing and wiring run through the walls. That is the big-picture plan: which major parts exist and how they connect.
The architect's floor plan does not tell a carpenter how to build one kitchen cabinet, though, or tell an electrician which wire to run to one socket. For that you need detailed drawings, with the exact sizes, the materials and the steps to put each part together.
Software has the same two levels of design. High Level Design (HLD) is the architect's floor plan: which services exist, how they talk to each other, and where the data lives. Low Level Design (LLD) is the carpenter's drawings: which classes exist inside one service, how its objects work together, and how its code is arranged so that it stays easy to change.
The rest of this page looks at both levels, where the line between them falls, and why the second one is the everyday skill of turning working code into code a team can keep changing.
What is High Level Design (HLD)?
High Level Design is the architecture part of system design. It looks at the whole system as a set of services and the connections between them, and it answers questions like these:
- Which components exist? Web servers, databases, caches, message queues, content delivery networks.
- How do they talk to each other? REST APIs, gRPC calls, events sent through a queue, WebSocket connections.
- Where does the data live? A relational database for orders, a cache for data that is read often, object storage for files.
- How does it cope with more users? Load balancers spread the traffic, more servers take more load, and sharding splits the data across machines.
If you were asked to design Twitter at this level, you would draw boxes such as a Tweet Service, a Timeline Service, a Notification Service and their databases, then arrows showing how the data moves when someone posts a tweet or opens their home feed.
At this level you do not decide which classes exist inside the Tweet Service, how a Tweet object relates to a User object in the code, which design pattern the notification code uses, or whether a method is public or private.
Think of HLD as the view from a satellite: you can see the cities and the roads between them, but not the rooms inside any building.
What is Low Level Design (LLD)?
Low Level Design zooms into one of those boxes and designs what is inside it. In one interview guide's words, "Low-level design interviews test your ability to structure code for a self-contained problem." You will also hear it called Object-Oriented Design (OOD), and as the same guide puts it, "They're the same interview, just a different name."
At this level the questions are about classes and objects. Which classes exist? For Twitter they might be User, Tweet, Timeline and FeedRanker. What does each one hold? A Tweet keeps its content, its author, the time it was created and its likeCount. What can each one do? You can call Tweet.like(), Timeline.addTweet(tweet) or User.follow(otherUser).
You also decide how the classes relate. A Tweet keeps a reference to the User who wrote it, which is called an association (Association — Objects That Know Each Other). A FeedRanker uses a RankingAlgorithm that it is handed, without owning it, which is a dependency (Dependency — Objects That Use Each Other). And you decide which design patterns fit: the Observer pattern tells interested objects when something changes (Observer Pattern — Event-Driven Communication), the Strategy pattern lets the feed swap one ranking algorithm for another (Strategy Pattern — Swappable Algorithms), and a factory creates the right kind of notification without the caller naming each kind (Factory Method Pattern).
If you were asked to design a parking lot at this level, you would work through five steps, the same ones that guide's delivery framework names: the requirements, the entities and how they relate, the design of each class, the implementation of the core logic, and how the design takes a new requirement. At the second step a quick sketch of the classes is enough; as the framework puts it, "You're not drawing a full UML diagram".
Think of LLD as the view from the street: one building, its doors and windows, and the wiring inside its walls. The same guide has a neat way of saying it: "System design is the map. Low level design is the blueprint for a building on the map."
LLD vs HLD: A Side-by-Side Comparison
Here is what each level covers, and what it leaves out, side by side:
| Dimension | High Level Design (HLD) | Low Level Design (LLD) |
|---|---|---|
| Focus | The whole system: services and how they connect | One component: the classes inside it |
| Building blocks | Services, databases, queues, caches, load balancers | Classes, interfaces, objects, enums, methods |
| Diagrams | Architecture and deployment diagrams | UML class and sequence diagrams |
| Key decisions | Which database? REST or gRPC? How to split the data? | Which class does what? Interface or abstract class? Which pattern, if any? |
| What good means | Scales with users and data, survives failures | Easy to read, test, extend and change |
| Core ideas | Load balancing, caching, replication, consistency | Object-oriented pillars, SOLID, design patterns, UML, refactoring |
| Code | None in the interview | Classes and method signatures, in pseudocode or a real language |
The last row comes from the same guide, which says of the system design interview: "There is no coding in system design".
You need both levels. A system with a good architecture but badly designed classes inside each service is slow to change, because every new feature touches code all over it. Well-designed classes inside a system that cannot carry its traffic fail in a different way. This course works at the low level; CodePeet teaches the high level in Fundamentals of System Design.
The picture below follows one example through both levels: first the whole system, then the classes inside one of its boxes, the Order Service.

A Concrete Example: The Order Service
Let's take one example through both levels: an online shop.
The high-level view
At the high level you design the whole system, as the left half of the picture above shows. Web and mobile apps send their requests to an API Gateway, and the gateway sends each order to the Order Service. The Order Service stores the order in PostgreSQL, asks the Payment service to charge for it, and publishes it to a queue. The Inventory and Notification services read the order from that queue; one takes the items out of stock and the other tells the customer.
The questions at this level are about the services and the network between them. What happens if the Payment service is down for a minute? How do you stop two orders for the last item from both going through?
The low-level view
Now zoom into one box, the Order Service, as the right half of the picture shows.
The classes are OrderController, which takes the request in, OrderService, which holds the business rules, OrderRepository, which saves and finds orders, and Order and OrderItem, which hold the data. Two more join them in the text below, OrderStatus and PricingStrategy.
An Order holds its orderId, its list of OrderItem objects, a status (an enum of its states, see Enums — Type-Safe Constants) and the time it was created, and it offers calculateTotal(), confirm() and cancel().
Order and OrderItem are related by composition: the items belong to that one order and do not outlive it. UML defines composition in exactly those terms: "If a composite object is deleted, all of its part instances that are objects are deleted with it." (Composition — Has-A with Dependent Lifecycle).
The price is worked out through a PricingStrategy interface, so a flat price, a percentage discount or a buy-one-get-one offer can be swapped in without changing Order (Strategy Pattern — Swappable Algorithms). An order moves through its states, PENDING, then CONFIRMED, SHIPPED and DELIVERED, with each state deciding which moves are allowed (State Pattern — Objects that Change Behavior). And other parts of the system hear about a new order through observers that react on their own, so adding one means no change to OrderService (Observer Pattern — Event-Driven Communication).
The question at this level is which classes, with which data and methods, related in which ways, and written how.
If Strategy, State or Observer are new to you, Design Patterns - Low Level Design teaches each of them with its class diagram and its code in Python, Java, C++, TypeScript, C# and Go.
Where LLD Fits in the Software Engineering Lifecycle
Building software runs through a chain of decisions, each one resting on the one before:
- Requirements: what the system must do, and within which limits.
- High Level Design: which components to build, and how they talk across the network.
- Low Level Design: how to arrange the code inside each component, meaning its classes, how they relate, and the patterns that fit.
- Implementation: writing the code from that design.
- Testing: checking the code on normal cases, unusual cases and failures.
- Maintenance: fixing, extending and reshaping the code for the rest of its life.
LLD sits between the architecture and the code. It turns a box on a system diagram into classes that a developer can sit down and write.
When it is skipped, code goes straight from the requirements into files, and the usual mess follows: classes that do many unrelated jobs, the same rule copied into several places, and parts so tied together that changing one breaks another. When it is done, the responsibilities, the relationships and the places where the code will need to grow are thought through before the code is written, so each class is easier to understand, to test on its own and to extend.
Step 6 is where most of a program's life is spent, which is why its design matters long after it ships. Why LLD Matters — The 70% Maintenance Problem looks at what that maintenance costs.
LLD in Interviews
Low-level design is also an interview round of its own, often called by its other name, object-oriented design.
What the round tests
The guide describes the round as a small, self-contained problem: you are given a system (a game, an elevator controller, a parking lot) and asked to design its classes, interfaces and relationships. What is expected depends on where you interview. On code: "US Big Tech leans toward partial code in a real language." "For interviews in India or Asia, the expectation is closer to structured pseudocode." On design patterns: "Smaller and mid-size companies in India and Asia ask about patterns more directly and are more likely to expect you to call them out." And on how open the question is: "Requirements tend to be vaguer in India and Asia."
The guide's advice for finding out what your target company expects is short: "just ask!"
What interviewers look for
"While each company uses its own scoring rubric, LLD interviews tend to evaluate the same core skills." The guide names five:
- Problem Analysis: do you pin down what you are building before you design it?
- Class Design: are the responsibilities, the method signatures and who owns what clear?
- Code Quality: encapsulation, well-managed state, sensible composition or inheritance, clear separation of concerns.
- Extensibility and Maintainability: can the design take a new requirement without being rewritten?
- Communication: can you explain your reasoning, and adjust it when the interviewer pushes back?
How the time goes
"You have roughly thirty-five minutes to clarify requirements, define your object model, design class APIs, and walk through the core logic." The five steps are what keep the round moving in order. The course's own interview part, The LLD Interview Framework, teaches them one at a time, and Design Problems - Low Level Design puts them to work on 36 full problems, from a parking lot to an elevator system.
How This Course is Structured lays out the whole LLD track: this course, Design Patterns - Low Level Design, Design Problems - Low Level Design and Concurrency - Low Level Design.