System Design
Master system design fundamentals, low-level design, high-level architecture, and Amazon interview preparation. 11 phases from foundations to real-world case studies.
Amazon SDE-1
8 phases · DSA
Java Mastery
11 phases · Java
SQL Mastery
9 phases · SQL
Frontend
14 phases · Frontend
Backend
20 phases · Backend
System Design
11 phases · Design
MERN Backend
18 phases · MERN
Projects
11 phases · Build
Your Progress
Complete all 11 phases to master this track
Phase 1: System Design Foundations
Understand the core concepts of system design: requirements, scalability, reliability, and tradeoffs.
What is System Design?
Understand system design as the process of defining architecture, components, and data flow.
Why System Design Matters
Learn why system design interviews test architectural thinking and tradeoff analysis.
Functional Requirements
Define what the system must do from the user's perspective.
Non-Functional Requirements
Define quality attributes: performance, scalability, reliability, availability.
Scalability
Understand horizontal and vertical scaling strategies for growing systems.
Availability
Measure and improve uptime with redundancy and failover mechanisms.
Reliability
Design systems that perform correctly under various conditions.
Maintainability
Write systems that are easy to understand, modify, and extend.
Performance
Optimize response times and throughput for user satisfaction.
Latency
Understand and minimize delays in system communication.
Throughput
Measure and optimize the number of operations per unit time.
Consistency
Understand strong vs eventual consistency in distributed systems.
CAP Theorem
Master the fundamental tradeoff between consistency, availability, and partition tolerance.
PACELC Basics
Extend CAP with latency vs consistency tradeoffs in normal operations.
Tradeoffs
Learn to identify and communicate architectural tradeoffs clearly.
Phase 2: Web Architecture
Design web application architectures with clients, servers, load balancers, and service communication.
Client
Understand client architectures: web, mobile, and desktop applications.
Server
Learn about application servers, their role, and request handling.
API
Design APIs with proper endpoints, versioning, and documentation.
REST
Build RESTful APIs with proper HTTP methods, status codes, and resource modeling.
HTTP in System Design
Use HTTP protocols effectively in distributed system communication.
Reverse Proxy
Use Nginx or similar as a reverse proxy for load balancing and security.
Load Balancer
Distribute traffic with round-robin, least connections, and consistent hashing.
Horizontal Scaling
Add more machines to handle increased load across the system.
Vertical Scaling
Upgrade existing machines with more CPU, RAM, or storage.
Stateless Services
Design services that don't store session state for easy scaling.
Stateful Services
Manage stateful services with session affinity or external state stores.
API Gateway
Use an API gateway for routing, authentication, and rate limiting.
Service Discovery
Enable services to find each other dynamically in microservice architectures.
CDN in Architecture
Use CDNs to cache static assets and reduce origin server load.
DNS in Architecture
Understand DNS resolution, TTL, and geographic routing in system design.
Phase 3: Databases
Choose and design database solutions: SQL vs NoSQL, scaling strategies, indexing, and replication.
SQL Databases
Choose SQL databases for structured data with ACID guarantees.
NoSQL Databases
Choose NoSQL for flexible schemas: document, key-value, column-family, graph.
SQL vs NoSQL
Compare tradeoffs between relational and non-relational databases.
Database Scaling
Scale databases with read replicas, sharding, and connection pooling.
Indexing
Create B-tree, hash, and composite indexes for query optimization.
Replication
Replicate data across nodes for availability and read scaling.
Sharding
Partition data across machines with consistent hashing strategies.
Partitioning
Split large tables by range, hash, or list for manageability.
Read Replicas
Offload read traffic to replica databases for performance.
Primary / Replica Architecture
Design primary-replica setups with failover and consistency.
Database Transactions
Use transactions for atomic operations across multiple changes.
ACID Properties
Master Atomicity, Consistency, Isolation, Durability for data integrity.
Eventual Consistency
Understand when eventual consistency is acceptable and how it works.
Connection Pooling
Reuse database connections to reduce overhead and improve performance.
Phase 4: Caching
Design caching strategies to reduce latency, decrease load, and improve system performance.
Why Caching
Understand caching benefits: reduced latency, decreased load, cost savings.
Cache-Aside
Implement the most common caching pattern: check cache, then database.
Read-Through
Cache transparently loads data on first access from the database.
Write-Through
Write to cache and database simultaneously for consistency.
Write-Behind
Write to cache first, asynchronously persist to database for performance.
Cache Invalidation
Implement strategies to keep cached data fresh and correct.
TTL (Time To Live)
Set expiration times on cached entries for automatic freshness.
Cache Eviction
Remove old entries when cache is full: LRU, LFU, FIFO, TTL.
LRU Cache
Implement Least Recently Used eviction for memory-efficient caching.
Redis
Use Redis for in-memory caching with data structures and persistence.
Cache Stampede
Prevent thundering herd when many requests hit expired cache simultaneously.
Hot Keys
Handle frequently accessed keys that can cause cache hotspots.
Distributed Cache
Scale caching across multiple nodes with consistent hashing.
Phase 5: Messaging
Design message-driven architectures with queues, event streaming, and delivery guarantees.
Message Queues
Decouple services with asynchronous message passing for reliability.
Kafka
Use Kafka for high-throughput, durable, distributed event streaming.
RabbitMQ
Use RabbitMQ for traditional message queuing with routing and acknowledgments.
Producers
Design message producers with proper serialization and error handling.
Consumers
Build message consumers with concurrency, offset management, and idempotency.
Topics
Organize messages into topics for logical separation and routing.
Partitions
Partition messages for parallel processing and ordering guarantees.
Consumer Groups
Scale consumption with consumer groups for load balancing.
Message Ordering
Guarantee message order within partitions and handle ordering tradeoffs.
Delivery Semantics
Understand at-most-once, at-least-once, and exactly-once delivery.
At Most Once
Implement fire-and-forget messaging with possible data loss.
At Least Once
Ensure message delivery with acknowledgments and retries.
Exactly Once
Achieve exactly-once semantics with idempotent producers and transactions.
Dead Letter Queue
Route failed messages to DLQ for debugging and retry.
Retry Strategies
Implement retry with backoff, jitter, and circuit breaking.
Backpressure
Handle slow consumers and prevent system overload with flow control.
Phase 6: Distributed Systems
Master distributed system patterns: communication, fault tolerance, rate limiting, and observability.
Distributed Systems
Understand the challenges of building systems across multiple machines.
Service Communication
Choose synchronous (HTTP/gRPC) vs asynchronous (queues) communication.
Synchronous vs Asynchronous
Compare blocking vs non-blocking communication patterns.
Timeouts
Set appropriate timeouts to prevent cascading failures.
Retries
Implement automatic retries with exponential backoff and jitter.
Exponential Backoff
Increase retry delays exponentially to reduce system load.
Circuit Breaker
Prevent cascading failures with circuit breaker pattern.
Idempotency
Design idempotent operations for safe retries without side effects.
Distributed Locks
Coordinate access to shared resources across distributed services.
Leader Election
Elect a single leader for coordination using Raft or similar protocols.
Heartbeats
Detect failed nodes and maintain cluster membership with heartbeats.
Fault Tolerance
Design systems that continue operating despite component failures.
Graceful Degradation
Reduce functionality gracefully when components fail.
Rate Limiting
Protect APIs with token bucket, sliding window, or leaky bucket algorithms.
Load Shedding
Drop excess requests to maintain system stability under heavy load.
Observability
Monitor system health with logs, metrics, and distributed tracing.
Logging
Implement structured logging for debugging and audit trails.
Metrics
Collect and analyze metrics: counters, gauges, histograms, percentiles.
Distributed Tracing
Track requests across services with Jaeger, Zipkin, or OpenTelemetry.
Phase 7: Low-Level Design
Design individual modules and classes with proper OOP, SOLID principles, and design patterns.
What is LLD?
Design individual modules and classes with proper OOP and patterns.
Classes and Objects
Model real-world entities with classes, properties, and methods.
Encapsulation
Hide internal state and expose only necessary interfaces.
Abstraction
Define contracts with abstract classes and interfaces.
Inheritance
Model IS-A relationships while preferring composition.
Polymorphism
Enable flexible behavior through method overriding and interfaces.
Composition
Build complex objects by composing simpler ones.
SOLID Principles
Master Single Responsibility, Open-Closed, Liskov, Interface Segregation, Dependency Inversion.
DRY
Don't Repeat Yourself: eliminate duplication through abstraction.
KISS
Keep It Simple: prefer straightforward solutions over clever ones.
YAGNI
You Aren't Gonna Need It: build only what's required now.
Interfaces in LLD
Define clear contracts between components for loose coupling.
UML Basics
Read and create UML diagrams for system documentation.
Class Diagrams
Model class relationships: association, composition, aggregation, inheritance.
Sequence Diagrams
Model object interactions over time for workflow documentation.
Design Patterns
Recognize and apply creational, structural, and behavioral patterns.
Factory Pattern
Create objects without specifying exact classes in the creation logic.
Builder Pattern
Construct complex objects step by step with readable code.
Strategy Pattern
Define a family of algorithms and make them interchangeable.
Observer Pattern
Implement publish-subscribe for event-driven communication.
Singleton Pattern
Ensure a class has only one instance with global access.
Adapter Pattern
Convert one interface to another for compatibility.
Decorator Pattern
Add behavior to objects dynamically without modifying their class.
State Pattern
Allow objects to change behavior when their internal state changes.
Dependency Injection
Inject dependencies for testable, loosely-coupled code.
Phase 8: LLD Practice
Apply low-level design skills to real-world systems: parking lots, elevators, chat apps, and more.
Parking Lot Design
Design a parking lot system with different vehicle types and pricing.
Library Management
Design a library system with book catalog, borrowing, and returns.
ATM Design
Design an ATM system with card authentication and cash dispensing.
Elevator Design
Design an elevator control system with scheduling algorithms.
Vending Machine
Design a vending machine with inventory, selection, and payment.
Coffee Machine
Design a coffee machine with drink selection and customization.
Movie Ticket Booking
Design a movie booking system with seats, shows, and pricing.
Ride Sharing
Design a ride-sharing system with matching, routing, and pricing.
Food Delivery
Design a food delivery system with restaurants, orders, and delivery.
Notification System
Design a notification service with multiple channels and preferences.
Chess Game
Design a chess game with rules validation, turns, and win detection.
Tic Tac Toe
Design a tic-tac-toe game with multiplayer support.
Splitwise
Design an expense splitting system with debts and settlements.
File System
Design a file system with directories, files, and permissions.
Phase 9: High-Level Design Framework
Learn the structured approach to system design interviews: requirements, estimation, design, and discussion.
Clarify Requirements
Ask the right questions to understand scope and constraints.
Functional Requirements (HLD)
Define user-facing features for the system design.
Non-Functional Requirements (HLD)
Define quality attributes: performance, scalability, availability.
Estimate Scale
Calculate storage, bandwidth, and QPS for capacity planning.
API Design
Design clean, versioned APIs with proper endpoints and contracts.
Data Model
Design database schemas, entity relationships, and data flow.
High-Level Architecture
Draw the system overview with clients, servers, databases, and caches.
Database Design (HLD)
Choose SQL vs NoSQL, design schemas, and plan for scaling.
Cache Design (HLD)
Identify what to cache, caching strategy, and invalidation approach.
Queue Design (HLD)
Identify async processing needs and choose messaging solutions.
Scaling Strategy
Plan horizontal scaling, load balancing, and auto-scaling.
Reliability Design
Plan for fault tolerance, redundancy, and disaster recovery.
Security Design
Address authentication, authorization, encryption, and compliance.
Monitoring Design
Plan logging, metrics, alerting, and observability.
Discussing Tradeoffs
Communicate architectural decisions and their implications.
Identifying Bottlenecks
Find and address performance bottlenecks in system design.
Future Improvements
Discuss potential enhancements and scaling considerations.
Phase 10: HLD Case Studies
Design real-world systems end-to-end: URL shorteners, social feeds, chat systems, and e-commerce platforms.
URL Shortener
Design a URL shortening service like bit.ly with analytics.
Rate Limiter
Design a distributed rate limiter for API protection.
Pastebin
Design a pastebin service like Pastebin with sharing features.
Twitter / Social Feed
Design Twitter's timeline, tweet, and social graph system.
Instagram Feed
Design Instagram's photo sharing and feed generation system.
YouTube
Design YouTube's video upload, processing, and streaming platform.
Netflix
Design Netflix's content delivery and recommendation system.
WhatsApp / Chat System
Design a real-time messaging system with presence and delivery.
Notification Service
Design a multi-channel notification system with preferences.
File Storage System
Design a distributed file storage system like S3.
Cloud Drive
Design a cloud storage service like Google Drive.
Food Delivery (HLD)
Design a food delivery platform end-to-end.
Ride Sharing (HLD)
Design a ride-sharing platform with matching and routing.
E-commerce
Design an e-commerce platform with cart, checkout, and inventory.
Search Autocomplete
Design a typeahead/autocomplete system with ranking.
News Feed
Design a news feed generation system with fanout.
Job Queue
Design a distributed job scheduling and execution system.
Distributed Cache (HLD)
Design a distributed caching system like Memcached.
API Gateway (HLD)
Design an API gateway with routing, auth, and rate limiting.
Phase 11: Amazon System Design Interview
Master the Amazon SDE-1 system design interview format: structure, communication, and follow-up handling.
How to Clarify Requirements
Ask targeted questions to narrow scope and show structured thinking.
How to Estimate Scale
Perform back-of-envelope calculations for storage, QPS, and bandwidth.
How to Communicate
Structure your design discussion with clear narration and diagrams.
How to Draw Architecture
Create clear, labeled architecture diagrams during interviews.
How to Discuss Tradeoffs
Present alternatives with pros/cons and justify your choices.
Handling Interruptions
Adapt when interviewers redirect or add constraints mid-discussion.
Follow-up Questions
Handle depth questions on databases, caching, scaling, and reliability.
Identifying Bottlenecks
Proactively identify and address system bottlenecks.
Improving the Design
Iterate on your design based on feedback and new requirements.
Failure Scenarios
Discuss how the system handles component failures and disasters.
Monitoring and Security
Address observability, alerting, and security in your design.