Category Archives: System Design

Introduction to System Design

HLD:
Gather all requirements:

  1. Functional Requirements
  2. Non Functional Requirements
  3. Costing Limitation

Understand the expectation like

  1. Consistency
  2. Availability
  3. Performance
  4. Scalability

Selecting Various component which has fulfilled all the functional and non-functional requirements while meeting the constraints.

In this kind of interview are not hard to come up with solutions. But what we need to prove that, find which approach is suitable for the requirements.

And I will tell you the fun fact there is no one absolute solution to any problems. There can be multiple ways in which to design the uber, Facebook, NetFlix, and so on.

We have come up with approach 1 and approach 2 and take a decision on which approach is suitable. Sometimes both approaches will merge and that’s works perfect. Decision-making is the key role of the system design approaches. 

While designing considering: 

  • pick up the component
  • Select DataStore
  • Caching
  • Messaging
  • Types of Architecture – 1) event-driven or 2) Transactional
  • Availability
  • Number of Transaction
  • Number of Requests
  • Scale 
  • Number of Users

Think about what components are required as per requirements and start designing and coming up with the solutions.

Even after designing Architecture, your job doesn’t get over. You have to think about the future what are the places or the scenarios where the system is going to fail and what are the limitation of the system and what would be the follow-up and what would be version 2 of the system. That’s really important when comes to designing the system.

Example of System Design Architecture:

System Design – Architecture diagram

HLD
1. What is a System?

Architecture or collection of software(Technologies) that communicate with each other interact in order to serve a certain set of users to a certain set of requirements.

Example of System: 



Example applications
: Instagram, Whatsapp, Netflix and Hotstar

2. What is Design?

Design is a process of understanding the user requirements and selecting the components, modules, and software technologies and how they are interlinked and communicate with each were actually serve the needs of the system.


3. Why System Design?
System Design is the process of designing the architecture, components, and interfaces for a system so that it meets the end-user requirements.

Let’s now see what are the components of system design?

System Design

Topics to be covered: High-Level System Design

  1. Introduction to System Design
  2. Components of System Design
  3. Client-Side Architecture
  4. Proxies
  5. Data & Data Flow
  6. Database Types: SQL | NoSQL | Column | Search | Key Value
  7. Anatomy of Applications and Services
  8. API (Application Programming Interface)
  9. Caching | Cache patterns | Cache Invalidations & Eviction
  10. What is Rest API? | CRUD APIs | REST vs HTTP
  11. Message Queues | Producer consumer Model
  12. Pub-Sub Messaging | Publisher Subscriber
  13. Performance Metrics
  14. Fault & Failure in distributed System
  15. Scaling in nutshell | Horizontal vs Vertical Scaling
  16. Database Replication | Synchronous vs Asynchronous
  17. CAP | Consistency, Availablity, and Partitioning
  18. What is CAP Theorem? Degrees of CAP Theorem | Use cases
  19. What is Database sharding? Logical and Physical Shards
  20. Key-based Sharding | Shard Key | Hash function | Advantages and disadvantages
  21. Range-based sharding | Advantages, and disadvantages | Hotspots | Use Cases
  22. Directory-based sharding
  23. A simple introduction to the basics of hashing & need for Consistent Hashing
  24. Basics of consistent hashing in plain English
  25. Foundation of System Design Interview starting with Functional vs Non Functional Requirements
  26. How to solve capacity estimation problems faster? | Thumb rules and quick tips

HLD (High-Level system Design) Interview important Topic

  1. Websockets
  2. Polling (Short polling, long polling)
  3. Polling vs web sockets
  4. Server-Side Events (SSE)
  5. HTTPs, HTTP (Get put post delete)
  6. REST vs GraphQL
  7. Message Queues (pub-sub pattern)
  8. Proxy( Forward / Reverse proxy)
  9. Load Balancing (Reverse proxies)
  10. Horizontal scaling and vertical scaling
  11. Latency and throughput
  12. CAP Theorem
  13. Consistent hashing
  14. NoSQL / SQL (ACID)
  15. Storage (BLOB, Graph-based storage)
  16. Indexing
  17. Replication and sharding
  18. Caching (hit/ miss | LRU | LFU)
  19. Resiliency, Availability, Replication
  20. Paging & filtering
  21. Rate limiting
  22. Logging & Monitoring