system-design
4 lessons tagged system-design: free, quiz-checked micro-lessons.
Database Sharding and Replication
Go beyond a single database: learn how read replicas offload query load, how range and hash sharding partition data, why consistent hashing makes rebalancing tractable, and how to pick a shard key that avoids the celebrity problem and cross-shard pain.
Scaling and Load Balancing
Master the mechanics of scaling distributed systems: when to scale up versus out, why statelessness is the prerequisite for horizontal scale, how L4 and L7 load balancers differ, which balancing algorithm fits which workload, and how to avoid turning your load balancer into the next single point of failure.
Queues, Async, and Microservices
Learn how message queues and pub/sub decouple services, why at-least-once delivery demands idempotent consumers, how backpressure and dead-letter queues protect the system, and when microservices are worth the complexity — with a sequenceDiagram of async order processing.
Caching Strategies
Understand where caches live, how cache-aside, read-through, write-through, and write-back differ, how to choose eviction policies, and how to prevent cache stampedes — with hit ratio math and a concrete cache-aside code snippet.
