System Design Basics

ABCDs of System Design

Ask Good Questions:

  1. What’s features to work on?
    • Ask the good questions and define the Minimum Viable Product(MVP) for the system Design Problem.
    • A problem can have many features, it’s our responsibility to work with the owner and figure out which features he cares about and which features he doesn’t care about.
    • We need to remember that we are working under a very strict time frame, so we need to make sure our feature set is small and go deep into this feature set.
  2. How much to scale ?
    • How much data we need to store in the database?
    • How many requests/second need to be handled?
    • What kind of latency is expected from the system?


Don’t Use Buzzwords


Clear and Organized Thinking


Drive Discussions (80-20) Rule


Solving System Design

Solving system design questions could be broken down into three steps:
  1. Scoping the problem : Don’t make assumptions; Ask clarifying questions to understand the constraints and use cases.
  2. Sketching up an abstract design Illustrating the building blocks of the system and the relationships between them.
  3. Identifying and addressing the bottlenecks by using the fundamental principles of scalable system design.

Note:- Remember there is no ONE right answer to the question because any system can be built in different ways. The only thing that is going to be looked into is your ability to rationalize ideas and inputs.

Whenever we are designing a large system, we need to consider few things:
  1. What are different architectural pieces that can be used?
  2. How do these pieces work with each other?
  3. How can we best utilize these pieces, what are the right tradeoffs?

Note:- Investing in scaling before it is needed is generally not a smart business proposition; however, some forethought into the design can save valuable time and resources in the future.


Getting to know the Terminologies

Designing a Restaurant
  1. Once restaurant starts working fine, pay more to chef to increase throughput using same resource — Vertical Scaling
  2. Preparing beforehand during non-peak hours —- Preprocessing and Cron jobs.
  3. Keeps backup and avoid single point of failure. — Backups (Master - Slave Architecture)
  4. Hire more resources. — Horizontal Scaling
  5. Divide responsibility and scale teams at different rate a/c to need. — Separation of concerns (Microservice Architecture)
  6. Open new shop with similar functionality at a new location. — Distributed System (Partitioning) - Now Fault Tolerant
  7. Routing request b/w shops when order received. — Load Balancer
  8. Handling delivery agent and shops separately. — Separation of System (Decoupling) - Handle more effectively
  9. If something goes wrong log it to take corrective action quickly — Logging and Metrics calculation
  10. Delivery agent should not be bothered if they going to deliver pizza or burger tomorrow. — Extensible


High Level Design Vs. Low Level Design




Next: System Design Concepts -1 →