What is System Design and High-Level Design?
The 30,000-foot view of software architecture, how single-server systems evolve into distributed architectures, and why HLD matters in real-world engineering.
Every great building starts with two distinct sets of drawings. The civil engineer draws the plumbing, wiring, and structural load calculations for individual rooms. Before any of that happens, the lead architect draws the macro blueprint: where the towers stand, how traffic enters the parking decks, how water flows in from municipal pipes, and how power distributes across 50 floors.
In software engineering, Low-Level Design (LLD) is the room-level wiring: classes, interfaces, design patterns, and method signatures. High-Level Design (HLD) is the macro blueprint: the servers, databases, caches, message queues, and network boundaries that work together to serve millions of simultaneous requests.
01The Evolution of a System
When an application is born, simplicity is an advantage. You launch a web application on a single cloud virtual machine:
- A web server process (such as NGINX or Caddy) listens for incoming HTTP traffic on port 80 and 443.
- The application runtime (such as a Spring Boot JAR or a Node.js process) executes business logic on port 8080.
- A relational database (such as PostgreSQL) runs locally on port 5432, reading and writing tables on the local solid-state drive.
- User avatar uploads and invoice PDFs save directly into a folder on the server disk (
/var/data/uploads).
This architecture works smoothly for the first few hundred users. Deployments are fast, debugging requires checking only one machine, and network latency between the app and the database is near zero because they communicate over the local loopback interface (localhost).
Why the Single Server Fails Under Growth
As the user base climbs from 500 to 500,000 users, the single-server model hits four structural boundaries:
- Hardware Resource Exhaustion: The CPU spends half its cycles running database queries and the other half rendering API responses. When RAM fills up, the operating system invokes its out-of-memory killer, terminating the application process.
- Single Point of Failure (SPOF): If the motherboard fails, the hypervisor crashes, or a bad code release locks up the CPU, your entire company is offline. You have zero redundancy.
- Storage Lock-In: Local disks have finite size. When user-generated media fills the drive, the database fails to write new transactions, resulting in silent data drops or corrupted indices.
- Deployment Downtime: Every time you deploy an updated build, you must stop the application process, leaving users staring at 502 Bad Gateway error screens.
High-Level Design is the discipline of taking this fragile, all-in-one box and breaking it into decoupled, independently scalable components.
02The Core Building Blocks of HLD
When designing large-scale systems, architects assemble solutions using a standard catalog of battle-tested components. Rather than inventing novel infrastructure for every feature, you combine these building blocks based on trade-offs:
| Building Block | Primary Responsibility | Common Technologies |
|---|---|---|
| DNS (Domain Name System) | Translates human names to IP addresses and routes clients to nearest datacenters | Cloudflare, AWS Route 53, CoreDNS |
| Load Balancer (LB) | Distributes incoming client traffic evenly across healthy application servers | HAProxy, NGINX, AWS ALB, Envoy |
| Stateless Application Tier | Executes business logic without storing persistent user state in server memory | Spring Boot, Go, Node.js clusters |
| In-Memory Cache Tier | Stores hot, frequently read records in RAM to eliminate redundant database reads | Redis, Memcached, Dragonfly |
| Persistent Database Tier | Provides durable, ACID or eventually consistent data storage across disk partitions | PostgreSQL, MySQL, Cassandra, DynamoDB |
| Asynchronous Message Broker | Decouples heavy or slow background tasks from synchronous user request threads | Apache Kafka, RabbitMQ, AWS SQS |
| Object Storage | Stores arbitrary files, images, video blobs, and backups cheaply with high durability | AWS S3, Google Cloud Storage, MinIO |
| Content Delivery Network (CDN) | Caches static assets and media at geographic edge locations close to users | Cloudflare, Fastly, AWS CloudFront |
03How Requests Flow Through a Distributed Architecture
Consider what happens when a user opens an e-commerce application on their phone and searches for running shoes:
- DNS Resolution: The mobile app queries DNS for
api.example.com. The DNS provider inspects the user location and returns the IP address of the closest edge gateway. - Edge Security & CDN: The request hits an edge reverse proxy. If the client requested static media (like shoe photos), the CDN returns the images immediately from an edge cache without touching backend servers.
- Load Balancing: If the request is a dynamic API call (
GET /products?search=shoes), the load balancer checks its server health table and forwards the HTTP connection to an available application node. - Stateless Compute: The application server receives the request. It does not look in local server memory. Instead, it queries a distributed Redis cache.
- Cache Evaluation: If the search results exist in cache (a cache hit), the application returns the JSON response in 4 milliseconds. If the cache misses, the application issues an indexed read query to a PostgreSQL read replica.
- Asynchronous Tasks: If the search triggers a side effect (such as recording search analytics or updating user recommendations), the app does not block the user. It emits an event to an Apache Kafka topic and responds to the user immediately. Background workers process the event asynchronously.
Every step in this chain is decoupled. If one application server crashes, the load balancer reroutes traffic within 100 milliseconds. If the database experiences heavy read spikes, the cache tier shields it from collapse.
04Functional vs Non-Functional Requirements
System design interviews and real-world projects always start with requirements gathering. Requirements divide into two distinct categories:
Functional Requirements (What the system does)
These define the concrete features and capabilities delivered to the end user:
- Users can register an account and log in.
- Users can post short text updates up to 280 characters.
- Users can search for other profiles by username.
Non-Functional Requirements (How well the system performs)
These define the operational constraints, quality attributes, and scale limits of the architecture:
- Scalability: The platform must support 50 million daily active users and 10,000 write requests per second during peak hours.
- Latency: 95 percent of read requests must complete in under 50 milliseconds globally.
- Availability: The system must achieve 99.99 percent uptime (no more than 52 minutes of downtime per calendar year).
- Consistency: When a user updates their password, the change must be strongly consistent across all datacenters immediately. When a user posts a photo, timeline updates can be eventually consistent within 3 seconds.
- Durability: Uploaded images and financial ledger records must never be lost, even during catastrophic datacenter outages.
05In the interview
When an interviewer asks you to design a high-level architecture, follow this four-phase mental framework:
- Scope and Clarify (5 to 8 minutes): Never start drawing boxes immediately. Ask clarifying questions to narrow down functional requirements (pick 2 or 3 core user flows) and quantify non-functional constraints (read-to-write ratio, peak traffic multiplier, latency targets).
- Back-of-the-Envelope Estimation (3 to 5 minutes): Calculate queries per second (QPS), incoming network bandwidth, and storage capacity needed over 5 years. This tells you whether you need a single database or a partitioned cluster.
- High-Level Diagram (10 to 15 minutes): Draw the end-to-end request flow from client to DNS, Load Balancer, Application Servers, Cache, Database, and Object Store. Keep it simple and walk through the core read and write journeys.
- Deep Dive and Bottlenecks (15 to 20 minutes): The interviewer will probe your single points of failure. Be prepared to explain how the system handles database crashes, cache stampedes, network partitions, and data growth.