On this page
The High-Level Design Diagram
Component 1: The Client
Why Start Here?
Component 2: The Load Balancer
The Role of Traffic Distribution
Reliability and Health Checks
Component 3: The API Gateway and Application Service
Visualizing the Cluster
The Concept of Statelessness
Separation of Concerns
Component 4: The Database
Placement and Connection
Read and Write Operations
The Flow of Data
Directionality
Network Latency
Optimization: The Cache
The Look-Aside Pattern
Optimization: The Message Queue
Asynchronous Processing
Conclusion
The Diagram Everyone Must Make in System Design Interview


System design interviews often present a unique challenge for engineers.
Unlike coding interviews that demand a specific algorithm to solve a defined problem, design interviews are intentionally vague.
The prompt is usually open-ended and broad. This ambiguity is the primary hurdle.
Without a clear set of constraints, it is easy to become overwhelmed by the possibilities.
The whiteboard remains blank, and the silence in the room can feel heavy.
This confusion typically leads to a scattered technical discussion where critical components are missed and the system fails to scale.
The most effective way to navigate this uncertainty is to impose a standard structure immediately.
There is a specific architectural pattern that applies to the vast majority of distributed systems.
Drawing this pattern at the very beginning of the session provides a roadmap. It transforms an abstract concept into a concrete visual plan. This diagram anchors the conversation and allows for a logical exploration of the system's requirements.
The High-Level Design Diagram
The diagram we will explore is known as the High-Level Design (HLD).
This visualization does not concern itself with low-level details. It does not include class definitions, variable names, or specific function calls. Instead, it focuses on the infrastructure. It maps out the major functional blocks of the system and, more importantly, how data moves between them.
For a candidate, this diagram serves as a safety net. It demonstrates a fundamental understanding of how modern web applications function. It proves that the lifecycle of a user request is understood.
By drawing this diagram first, the scope of the system is defined. It creates a checklist of topics to discuss. It allows the interview to progress from a high-level overview down to specific optimizations without losing sight of the bigger picture.
Component 1: The Client
The first step in drawing this diagram is to identify the source of the traffic. This component is the Client.
In the context of system design, the client is the interface where the interaction begins. It is the device or software that initiates a network request. This component should be drawn on the far left side of the whiteboard.
Why Start Here?
Starting with the client establishes the direction of the data flow. It signals that the system exists to serve a specific user need. It also helps to clarify the constraints of the connection.
A mobile client might have unreliable network connectivity, while a desktop client might have a stable wired connection.
When this box is drawn, it defines the external boundary of the system. Everything to the right of this box is the internal infrastructure that needs to be built and managed. Everything to the left is the external world.
Component 2: The Load Balancer
As a system grows, it must handle an increasing number of concurrent users.
A single server has physical limits on the amount of traffic it can process. To solve this, engineers use multiple servers to share the workload.
However, the client needs a single point of contact.
The component responsible for this management is the Load Balancer. This box should be drawn directly to the right of the client.
The Role of Traffic Distribution
The load balancer acts as a gatekeeper. It accepts incoming network traffic from the client and makes a decision on where to send it. It selects a healthy server from a pool of available resources and forwards the request.
This component is critical for Scalability.
Scalability is the ability of a system to handle growth. By including a load balancer, the design explicitly states that the system is not running on a single machine. It demonstrates that the architecture is designed to grow horizontally by adding more servers as needed.
Reliability and Health Checks
The load balancer also plays a key role in reliability. It constantly checks the health of the backend servers.
If a server fails or crashes, the load balancer detects the issue and stops sending traffic to that specific machine. It redirects the work to the remaining healthy servers.
This ensures that the system remains available to the user even when hardware failures occur inside the data center.
Component 3: The API Gateway and Application Service
The request travels from the load balancer to the core processing unit. This is the Application Service, often preceded by an API Gateway.
In the diagram, this component sits in the center. It represents the business logic of the system. This is where the code executes. Whether the system is validating a password, calculating a route, or filtering a list of items, the work happens here.
Visualizing the Cluster
When drawing this component, it is effective to represent it as a cluster rather than a single box. Drawing three small boxes stacked slightly behind each other indicates that there are multiple instances of the service running simultaneously.
This visual shorthand reinforces the concept of distributed computing.
The Concept of Statelessness
A vital concept to explain at this stage is statelessness.
A stateless architecture means that the application server does not store any user context or session data in its own local memory between requests. Every time the server receives a request, it treats it as a completely new interaction.
This is essential for the load balancer to function correctly.
If Server A held user data in its memory, and the load balancer routed the user's next request to Server B, Server B would not know who the user was. By keeping the servers stateless, any server in the cluster can handle any request at any time.
This flexibility allows the system to scale up or down without breaking the user experience.
Separation of Concerns
By isolating the application service in its own box, the design adheres to the separation of concerns. The logic layer is distinct from the presentation layer (Client) and the storage layer (Database).
This separation makes the system easier to maintain. Code can be deployed or updated in this layer without affecting how the data is stored physically.
Component 4: The Database
The final essential component in the linear flow is the Database.
Since the application servers are stateless and clear their memory after every request, the system requires a place to store data permanently.
The database provides Persistence. It ensures that records, profiles, and transactions remain intact even if the entire fleet of application servers shuts down and restarts.
Placement and Connection
The database is drawn on the far right of the diagram. It connects directly to the application service.
It is important to note the connection path. The client never connects directly to the database. A direct connection would expose the raw data to security risks and bypass the business logic validation. The application service acts as the necessary intermediary.
Read and Write Operations
The connection between the service and the database represents two primary operations: Reads and Writes.
- Writes: The service sends new information to be saved.
- Reads: The service requests existing information to display to the user.
For a more advanced visualization, this component can be split into two parts: a Primary database for writes and Read Replicas for reads.
This separation optimizes performance for systems that have many more people viewing data than creating it.
The Flow of Data
The boxes provide the structure, but the arrows provide the narrative. The lines connecting the components are just as critical as the components themselves.
Directionality
Arrows should clearly indicate the direction of the request.
-
Request Flow: An arrow moves from the Client to the Load Balancer, then to the Application Service.
-
Query Flow: An arrow moves from the Application Service to the Database.
-
Response Flow: It is implied that data returns along the same path. However, visualizing the return journey verbally is important to show an understanding of the full cycle.
Network Latency
Every arrow represents a network call. A network call takes time. By drawing these lines, the design acknowledges Latency.
The distance between the client and the data center, and the time it takes for the database to look up a record, all contribute to the speed of the system.
Optimization: The Cache
Once the four core components are established, the design can be improved. The most common optimization to add is a Cache.
Reading data from a database typically involves reading from a physical hard disk.
This process is slow relative to the speed of a CPU.
A cache stores frequently accessed data in memory (RAM), which is significantly faster.
The Look-Aside Pattern
To visualize this, draw a small box labeled "Cache" connected to the Application Service. The flow of logic changes slightly:
-
The Application Service receives a request.
-
It checks the Cache first.
-
If the data is found (Cache Hit), it is returned immediately.
-
If the data is not found (Cache Miss), the Service queries the Database.
-
The data is retrieved and then stored in the Cache for future requests.
Adding this component demonstrates a concern for Performance. It shows that the goal is not just to build a working system, but to build a fast one.
Optimization: The Message Queue
Not all tasks can be performed instantly. Some operations require heavy processing power or time.
If the application service waits for these tasks to finish, the client is stuck waiting.
To handle this, an additional path is often added to the diagram. This involves a Message Queue.
Asynchronous Processing
A message queue is drawn connected to the application service. Instead of processing a heavy task immediately, the service packages the task as a "message" and places it in the queue.
A separate component, often labeled "Worker," monitors this queue.
The worker picks up the message and performs the heavy lifting in the background.
This structure demonstrates the concept of Asynchronous Processing. It decouples the user experience from the backend processing.
The user receives an immediate confirmation, while the system handles the work separately. This prevents the main system from becoming unresponsive during complex operations.
Conclusion
The High-Level Design diagram is the primary tool for navigating the complexity of system design. It provides a reliable structure that organizes thoughts and guides the technical discussion.
By standardizing the approach to this diagram, the vast open-ended nature of the problem becomes manageable.
Here are the key takeaways to remember:
- Start Left to Right: Establish a clear linear flow from the Client to the Database.
- Prioritize the Load Balancer: Always include a distribution layer to demonstrate scalability.
- Isolate the Logic: Keep the Application Service separate to ensure statelessness and flexibility.
- Visualize Persistence: Clearly define where data is stored permanently versus where it is processed.
- Optimize with Caching: Insert a cache layer to show an understanding of latency and performance.
Mastering this single diagram provides a framework for success. It ensures that every technical decision fits into a coherent and logical picture.
What our users say
AHMET HANIF
Whoever put this together, you folks are life savers. Thank you :)
Nathan Thomas
My newest course recommendation for all of you is to check out Grokking the System Design Interview on designgurus.io. I'm working through it this month, and I'd highly recommend it.
Arijeet
Just completed the “Grokking the system design interview”. It's amazing and super informative. Have come across very few courses that are as good as this!
Designgurus on Substack
Deep dives, systems design teardowns, and interview tactics delivered daily.
Access to 50+ courses
New content added monthly
Certificate of completion
$33.25
/month
Billed Annually
Recommended Course

Grokking the System Design Interview
163,425+ students
4.7
Grokking the System Design Interview is a comprehensive course for system design interview. It provides a step-by-step guide to answering system design questions.
View Course