System Design is the process of defining the architecture, components, modules, interfaces, and data for a system to satisfy specified requirements. Unlike coding problems that test your ability to write algorithms, system design tests your ability to architect an entire application from scratch—like designing Twitter, Netflix, or Uber—to handle millions of users.
Every modern application you use daily is a massive distributed system:
These systems cannot run on a single computer. They require hundreds of thousands of servers, sophisticated networking, intelligent caching, and redundant databases.
When designing a system, you must optimize for several competing properties:
The capability of a system to grow and manage increased demand. A scalable system can continuously evolve to support growing amounts of work. A system might need to scale because of increased data volume, increased transaction count, or increased user traffic.
The probability a system will fail in a given period. A distributed system is considered reliable if it keeps delivering its services even when one or several of its software or hardware components fail. Amazon cannot afford to have their "Add to Cart" button fail even for a millisecond during Black Friday.
The percentage of time that a system remains operational. A system with 99.999% availability ("Five Nines") has less than 5.26 minutes of downtime per year.
Two standard measures of efficiency: Latency (the delay to obtain the first item, measured in milliseconds) and Throughput (the number of items delivered per second). Google mandates that search results appear in under 200ms.
How easy is it for a team of engineers to understand, fix, and extend the system? A system that requires 20 engineers to deploy a single feature is poorly maintainable.
When tackling any system design problem, follow this structured 4-step approach:
Always ask clarifying questions. You must define both:
Estimate the scale of the system to determine if you need 1 server or 10,000.
Draw the architecture diagram. Identify the core components: Clients, Load Balancers, Application Servers, Databases, Caches, Message Queues.
Drill into the most critical components. Discuss trade-offs: SQL vs NoSQL, Sharding strategies, Caching policies, etc.