System design concepts · Interview method

LLD vs HLD

Short answer

High level design (HLD) describes a system as services, data stores, queues and caches and the flows between them, and it answers questions about scale, availability, consistency and cost. Low level design (LLD) zooms into one component and describes its classes, interfaces, data structures, method signatures and state transitions, and it answers questions about correctness, extensibility and readable code. In interviews, the HLD round is usually called system design ("design Uber"), while the LLD round is called object oriented design or machine coding ("design a parking lot", often with working code at the end). Many companies run both for mid-level and senior roles, and they reward different habits.

Read the video transcript

Low level design and high level design are the same problem, seen from two different altitudes. High level design is the view from above. Clients, a load balancer, services, a cache, a database and a queue, and the flows between them. The questions are about scale. How many requests per second, what happens when a node fails, and where the data lives.

Now zoom into one service, and the boxes turn into classes. A parking lot has levels, each level has spots, and a ticket links a vehicle to a spot. Here the questions are about code. Which class owns each responsibility, which interface lets you add a new pricing rule, and whether parking is safe when two cars want the same spot.

In interviews, the high level round says, design Uber, and grades your trade-offs. The low level round says, design a parking lot, and grades clean abstractions, often with working code. The habits carry over. State the requirements, name the core entities, and justify every choice.

LLD vs HLD: comparison table

AspectLLD (low level design)HLD (high level design)
Unit of designClasses, interfaces, enums, methodsServices, databases, caches, queues, CDNs
Main questionsResponsibilities, extensibility, patterns, thread safety inside a processScale, latency, availability, consistency, cost
Typical artifactsClass diagram, method signatures, state machine, codeArchitecture diagram, API list, data model, capacity estimate
Typical promptsDesign a parking lot, an elevator, an LRU cache, a vending machineDesign Twitter, Uber, a URL shortener, a chat system
VocabularySOLID, composition, strategy, observer, factorySharding, replication, load balancing, eventual consistency
Graded onClean abstractions, correct behavior, code that is easy to changeSound trade-offs, finding bottlenecks, handling failure
A replica fails its health check, the load balancer sends traffic to the healthy replicas, and it recovers.

When to use each

You are in an LLD round when

  • The prompt describes a single application or device, such as a parking lot, a library or a game.
  • The interviewer asks for classes, method signatures or runnable code.
  • Follow-ups are about adding a new type of entity or rule without rewriting existing classes.

You are in an HLD round when

  • The prompt names a product used by millions of people.
  • The interviewer asks about traffic, storage, latency or availability.
  • Follow-ups are about a component failing, a region going down or traffic growing tenfold.
The verdict

You are in an LLD round when

The prompt describes a single application or device, such as a parking lot, a library or a game.

Otherwise

You are in an HLD round when

The prompt names a product used by millions of people.

The class diagram assembles, then a PricingStrategy interface slides in with two implementations.

The same problem at two altitudes

Hotel booking works as either round. As HLD, you design a search service over availability, an inventory store that never double books a room, a payment flow, and a way to keep search results fresh. As LLD, you design Hotel, Room, Reservation and Guest classes, a ReservationStatus state machine, a pricing strategy interface, and a reserve method that is safe when two guests try the same room.

The same system at two altitudes: the camera dives from boxes and flows into the classes inside one service, then back out.

Codemia has several problems in both forms, which is a good way to feel the difference: the parking lot, hotel booking and ride sharing each have an object oriented version and a system design version.

Where the rounds overlap

An HLD deep dive may drop into a data model or an API contract, which is close to LLD. An LLD round may ask how your classes behave when two threads call the same method, which touches concurrency control. The skill that transfers is the same in both: state the requirements, name the core entities, and justify each choice by what it makes easy to change later.

Interview angle

How it comes up in a system design interview

The biggest mistake is answering the wrong round. Drawing Kafka and a CDN in an object oriented round wastes the time you need for classes and code, and writing class hierarchies in a system design round means you never reach scale or failure handling. Ask the recruiter which format you will get, and confirm in the first minute with the interviewer.

Where you will meet it

  • LLD: Model a parking lot with different spot sizes, then add electric vehicle charging without editing existing classes.
  • LLD: Implement an LRU cache with O(1) get and put, then make it thread safe.
  • HLD: Design a ride sharing backend that matches riders to nearby drivers in real time.
  • HLD: Design a hotel booking service that never double books under concurrent requests.
How a strong answer sounds
“Before I start, is this round focused on the class design and code for a single service, or on the distributed architecture? If it is the class design, I will start with the core entities and their responsibilities, then the interfaces where I expect new variants, then walk through the main flows in code.”

Common mistakes

  • Treating LLD as drawing UML. Interviewers grade whether the design makes likely changes easy and whether the code works.
  • Jumping to class diagrams in an HLD round before scale, data flow and storage are settled.
  • Preparing only one kind. Many loops include both, and they reward different practice.

Frequently asked questions

Is LLD the same as object oriented design?

Mostly. LLD rounds are usually object oriented design rounds. Some companies call theirs machine coding and expect a working, runnable program within the time limit, not just a class diagram.

Which comes first, HLD or LLD?

In real projects, HLD comes first: you decide the services and data stores, then design each component in detail. In interviews they are separate rounds and either can come first.

Is a database schema part of HLD or LLD?

Both touch it. HLD picks the kind of store, the partition key and the main access patterns. LLD goes down to tables, columns, indexes and the queries a component runs.

How should I prepare for both?

For LLD, practise a set of classic problems end to end in code and learn the handful of design patterns that keep recurring. For HLD, learn the building blocks and practise talking through trade-offs on open problems with a timer.

Learn and practise

Lessons

Problems where this choice matters

Knowing the trade-off is half of it

Practise saying it under follow-up questions: a timed system design interview with an AI interviewer that probes your choices and grades against a rubric.

Start a mock interview