DevNotes
Support
System Design · 14 chapters

System Design Basics

System design for backend interviews and real systems: a step-by-step framework, estimation, scalability and availability, load balancing, caching and CDNs, SQL vs NoSQL, replication and sharding, CAP and consistency, queues, rate limiting, API design, and worked designs of a URL shortener and a notification system.

CHAPTER 01

How to Approach System Design

What system design interviews test, a repeatable step-by-step framework — requirements, estimates, API, data model, high-level design, deep dives and trade-offs — functional vs non-functional requirements, and common mistakes.

5 min · 3 Q&A · 0 examples
CHAPTER 02

Back-of-the-Envelope Estimation

Powers of two and data sizes, latency numbers every developer should know, converting daily users into requests per second, estimating storage, bandwidth, cache size and servers, and a worked example.

5 min · 4 Q&A · 0 examples
CHAPTER 03

Scalability, Availability & Reliability

Vertical vs horizontal scaling, stateless services, scaling a web app step by step from one server to many, latency vs throughput, availability and nines, redundancy and failover, single points of failure, and multi-region designs.

5 min · 5 Q&A · 0 examples
CHAPTER 04

Load Balancing

What a load balancer does, Layer 4 vs Layer 7, balancing algorithms from round robin to least connections and consistent hashing, health checks, sticky sessions, TLS termination, global load balancing with DNS and anycast, and avoiding the load balancer as a single point of failure.

5 min · 5 Q&A · 0 examples
CHAPTER 05

Caching & CDNs

Where caches live, cache-aside, read-through, write-through and write-behind, TTLs and invalidation, eviction policies, cache stampedes and hot keys, Redis vs local caches, Spring @Cacheable, and content delivery networks.

7 min · 6 Q&A · 2 examples
CHAPTER 06

Choosing a Database — SQL vs NoSQL

Relational databases and ACID, the four NoSQL families — key-value, document, wide-column and graph — search engines, time-series and object storage, how to choose by access pattern, polyglot persistence, and common misconceptions.

6 min · 5 Q&A · 0 examples
CHAPTER 07

Database Replication, Partitioning & Sharding

Leader–follower replication, read replicas and replication lag, synchronous vs asynchronous replication, multi-leader and leaderless designs, failover, vertical and horizontal partitioning, sharding strategies, consistent hashing, hot spots and resharding.

7 min · 6 Q&A · 0 examples
CHAPTER 08

CAP Theorem & Consistency Models

The CAP theorem stated correctly, CP vs AP systems with examples, PACELC and the latency trade-off, strong, eventual and causal consistency, ACID vs BASE, and how to choose consistency per feature.

5 min · 6 Q&A · 0 examples
CHAPTER 09

Message Queues & Asynchronous Processing

Why move work off the request path, queues vs event streams, point-to-point and publish–subscribe, back-pressure and load levelling, delivery guarantees, ordering, idempotency, dead-letter queues, and choosing Kafka, RabbitMQ or SQS.

5 min · 5 Q&A · 0 examples
CHAPTER 10

Rate Limiting

Why rate limits matter, where to enforce them, the token bucket, leaky bucket, fixed window, sliding window log and sliding window counter algorithms with their trade-offs, distributed rate limiting with Redis, HTTP 429 and headers, and designing a rate limiter.

6 min · 5 Q&A · 0 examples
CHAPTER 11

API Design & Communication Protocols

REST resource design, HTTP methods and status codes, idempotency and idempotency keys, pagination, filtering and versioning, error formats, REST vs GraphQL vs gRPC, WebSockets, server-sent events, polling and webhooks.

6 min · 6 Q&A · 0 examples
CHAPTER 12

Design: URL Shortener

A complete worked design of a TinyURL / bit.ly-style service — requirements, estimates, API, data model, short-code generation with Base62, counters and hashing, 301 vs 302 redirects, caching, scaling, analytics, expiry, abuse prevention and trade-offs.

7 min · 5 Q&A · 1 examples
CHAPTER 13

Design: Notification System

A complete worked design of a system that sends push, SMS, email and in-app notifications at scale — requirements, estimates, API, architecture with queues per channel, templates and preferences, retries and provider failover, deduplication, rate limits, scheduling, tracking and trade-offs.

6 min · 5 Q&A · 0 examples
CHAPTER 14

System Design Cheat Sheet & Practice

The interview framework on one page, the building blocks and when to use each, key numbers, common trade-offs, a checklist of non-functional concerns, and practice problems with hints.

5 min · 0 Q&A · 0 examples