Distinguish High-Level from Low-Level Design, understand what companies actually evaluate in an LLD round, and see how the typical interview unfolds.
You're 12 minutes into an interview. The interviewer says, "Design a parking lot." You start
typing a main() method. Forty minutes later you have 200 lines of code, three nested
if-ladders, and a panicked feeling that none of it is designed. You didn't fail
because you can't code — you failed because nobody taught you what "design" actually means at this
altitude. That's what this lesson fixes.
Concept: two altitudes of design
High-Level Design (HLD) is the 10,000-foot view: services, databases, queues, load balancers, network boundaries. It answers "how do the big boxes talk, and how does this scale to millions of users?"
Low-Level Design (LLD) is the 100-foot view: the classes, interfaces, methods, and relationships inside one of those boxes. It answers "how is this component structured so it's correct, readable, and easy to extend?" LLD is where object-oriented thinking, SOLID, and design patterns live.
| Aspect | High-Level Design | Low-Level Design |
|---|---|---|
| Unit of thought | Services & data stores | Classes & interfaces |
| Key concerns | Scalability, availability, latency | Extensibility, readability, correctness |
| Typical artifact | Architecture diagram | Class / sequence diagram + code |
| Example question | "Design Twitter's timeline" | "Design the Tweet & Feed classes" |
The two meet in the middle. In a full system-design interview you sketch the HLD, then the interviewer zooms into one box and says "now design this part properly" — and you're in LLD territory.
Java in action: same feature, two altitudes
HLD says "a Matching service assigns drivers to riders." LLD turns that sentence into types with clear responsibilities — note how the strategy is an interface, so the matching rule can change without touching the service:
// LLD: the "inside" of the matching box, expressed as collaborating objects.
interface MatchingStrategy {
Driver selectDriver(Rider rider, List<Driver> nearbyDrivers);
}
class NearestDriverStrategy implements MatchingStrategy {
public Driver selectDriver(Rider rider, List<Driver> nearbyDrivers) {
return nearbyDrivers.stream()
.min(Comparator.comparingDouble(d -> distance(rider, d)))
.orElseThrow(() -> new NoDriverAvailableException(rider.getId()));
}
private double distance(Rider r, Driver d) { /* haversine */ return 0; }
}
class MatchingService {
private final MatchingStrategy strategy; // depend on the abstraction
MatchingService(MatchingStrategy strategy) { this.strategy = strategy; }
Trip assign(Rider rider, List<Driver> nearby) {
Driver driver = strategy.selectDriver(rider, nearby);
return new Trip(rider, driver);
}
}This is what "good LLD" looks like at a glance: small types, one job each, and a seam
(MatchingStrategy) where future change is expected. We'll build up every technique used here
over the coming sections.
What companies actually evaluate
Interviewers are not grading whether your code compiles. They score signals:
- Requirement handling — did you clarify before coding, or assume?
- Abstraction — did the right classes and interfaces emerge?
- Extensibility — can a new requirement be added without rewriting everything?
- Communication — did you think out loud and justify trade-offs?
- Pragmatism — did you avoid both under- and over-engineering?
The typical interview flow
Take any app on your phone and write two sentences: one HLD sentence (the big boxes and
how they connect) and one LLD sentence (name 3–4 classes inside one box and what each is
responsible for). Example for Spotify → HLD: "Clients hit an API gateway that fans out to a catalog
service, a streaming service, and a recommendation service backed by their own stores." LLD (catalog):
"Track, Album, Artist, and a CatalogRepository that
looks them up." Do this for three apps — it trains the altitude switch you'll need on demand.
- ⚠️ Trap: jumping to code. Spending the first minute typing instead of clarifying is the single most common reason strong coders fail LLD rounds.
- ⚠️ Trap: answering HLD when asked LLD. If they say "design the classes for X," don't start talking about sharding and Kafka — zoom in.
- ⚠️ Trap: silence. Unspoken good design scores lower than narrated decent design. The interviewer grades what they hear.
- LLD is the class-level design inside one HLD box — its currency is interfaces, responsibilities, and relationships, not servers and queues.
- Interviews grade signals, not syntax: clarifying, abstraction, extensibility, communication, and pragmatism.
- The flow is predictable: clarify → model → diagram → code → extend. The rest of this course turns that flow into a repeatable framework.