Backend track
Backend System Design, from first principles to real systems
51 lessons in 4 courses: three levels from your first design to distributed-systems trade-offs, and a project that builds one real system from a single server to ten million users. Plain-English explanations, diagrams, trade-off tables and practice exercises in every lesson.
Three courses, one path
Start at your level. Each course builds on the one before it.
Starter · ~12.5 hr · 12 lessons
System Design Foundations: From Zero to Your First Design
Start here if system design is new to you. Learn how to turn requirements into a design, estimate load, and use the basic building blocks (DNS, load balancers, caches, databases, CDNs) with plain-English explanations and diagrams.
Intermediate · ~14.5 hr · 14 lessons
System Design Building Blocks: Data, Messaging and Scale
The intermediate course: replication, sharding, consistency, advanced caching, queues and streaming, API gateways, rate limiting, search, storage engines, observability and security, with the trade-offs behind each choice.
Advanced · ~15.5 hr · 14 lessons
Advanced System Design and Case Studies
The advanced course: distributed transactions, CQRS and event sourcing, consensus, clocks and ordering, resilience, multi-region design and capacity planning, then full case studies: URL shortener, photo sharing, news feed, chat, video streaming and ride sharing.
Modules
23 modules, 70 of 210 lessons published so far. Each lesson teaches one concept. A module without published lessons is marked coming soon and is not linked.
B01 · 7 of 9 lessons published
Foundations and requirements
What a system is made of, how to state requirements, estimate load and approach any design problem.
9 concepts in Foundations and requirements
- The Big Picture
- Client-Server and N-Tier Architecture
- Requirements and Scope
- Back-of-the-Envelope Estimation
- Latency vs Throughput (coming soon)
- Availability, Reliability, Durability and SLOs
- A Repeatable Approach
- Trade-Off Analysis (coming soon)
- The Building Blocks Map
B02 · 2 of 9 lessons published
Networking and protocols
TCP, UDP, DNS, TLS and HTTP, plus proxies, the CDN and real-time transports every backend sits on.
9 concepts in Networking and protocols
- The Request Lifecycle
- TCP and UDP (coming soon)
- DNS (coming soon)
- TLS and HTTPS (coming soon)
- HTTP/1.1, HTTP/2 and HTTP/3 (coming soon)
- Forward and Reverse Proxies (coming soon)
- CDN and Edge Networking (coming soon)
- CDN and Object Storage
- WebSockets, Server-Sent Events and Long Polling (coming soon)
B03 · 6 lessons planned
Java runtime and concurrency
The JVM memory model, garbage collectors, thread pools, virtual threads, reactive code and connection pools.
6 concepts in Java runtime and concurrency
- The JVM Memory Model and Heap (coming soon)
- Garbage Collectors: G1 and ZGC (coming soon)
- Thread Pools, Executors and CompletableFuture (coming soon)
- Virtual Threads (Project Loom) (coming soon)
- Blocking vs Reactive: Spring MVC and WebFlux (coming soon)
- Connection Pooling with HikariCP (coming soon)
Coming soon
B04 · 3 of 13 lessons published
API design
REST, gRPC, GraphQL, gateways, pagination, idempotency, rate limiting, contracts and error models.
13 concepts in API design
- API Design
- REST, gRPC, GraphQL and WebSockets: Choosing an API Style (coming soon)
- gRPC and Protobuf (coming soon)
- GraphQL on the Server and the N+1 Problem (coming soon)
- API Gateway and Service Mesh: An Overview
- The API Gateway Pattern (coming soon)
- Backend for Frontend (BFF) (coming soon)
- Pagination: Offset, Cursor and Keyset (coming soon)
- Idempotency Keys and Safe Retries (coming soon)
- Rate Limiting
- Token Bucket, Leaky Bucket and Window Counters in Java with Redis (coming soon)
- OpenAPI, Contract-First Design and API Contracts (coming soon)
- The Error Model: RFC 9457 Problem Details (coming soon)
B05 · 1 of 14 lessons published
Relational databases and SQL
The relational model, SQL, indexes, query plans, transactions, MVCC, locking, JPA, migrations and partitioning.
14 concepts in Relational databases and SQL
- Databases Basics
- Normalization (1NF to BCNF) and Denormalization (coming soon)
- SQL Joins (coming soon)
- Aggregation, Window Functions and CTEs (coming soon)
- SQL Indexing: B-Trees, Composite, Covering and Partial Indexes (coming soon)
- Query Plans with EXPLAIN ANALYZE (coming soon)
- ACID Transactions and Isolation Levels (coming soon)
- MVCC: Multi-Version Concurrency Control (coming soon)
- Locking: Optimistic vs Pessimistic and Deadlocks (coming soon)
- Spring @Transactional (coming soon)
- JPA and Hibernate: N+1, Lazy Loading and Batching (coming soon)
- Data Modeling, Schema Evolution and Zero-Downtime Migrations (coming soon)
- Table Partitioning (coming soon)
- SQL vs NoSQL: A Decision Framework (coming soon)
B06 · 2 of 9 lessons published
NoSQL and specialized stores
Key-value, document, wide-column and graph stores, LSM trees, Redis, search, time-series, blob storage and lakes.
9 concepts in NoSQL and specialized stores
- NoSQL Types: Key-Value, Document, Wide-Column and Graph (coming soon)
- Storage Engines: B-Trees vs LSM Trees
- Redis Data Structures (coming soon)
- MongoDB and Document Modelling (coming soon)
- Cassandra and DynamoDB-Style Modelling (coming soon)
- Search Engines and the Inverted Index
- Time-Series Databases (coming soon)
- Object and Blob Storage (coming soon)
- Data Warehouses and Data Lakes (coming soon)
B07 · 11 of 13 lessons published
Distributed systems theory
CAP, consistency models, quorums, consensus, locks, clocks, gossip and the tools for reasoning about failure.
13 concepts in Distributed systems theory
- The Fallacies of Distributed Computing
- CAP, PACELC and Consistency Models: An Overview
- CAP Theorem and PACELC
- Consistency Models: Linearizable to Eventual
- Quorum Reads and Writes (R + W > N)
- Consensus and Leader Election (Raft and Paxos)
- Distributed Locks and Fencing Tokens
- IDs, Clocks and Ordering
- Logical and Vector Clocks
- Unique ID Generation: UUID, ULID and Snowflake
- Gossip Protocols and Failure Detectors (coming soon)
- Idempotent and Commutative Operations
- CRDTs and Conflict Resolution (coming soon)
B08 · 2 of 6 lessons published
Data scaling
Replication styles and lag, sharding, consistent hashing, hot partitions and resharding.
6 concepts in Data scaling
- Replication
- Multi-Leader and Leaderless Replication (coming soon)
- Replication Lag and Read-Your-Writes (coming soon)
- Sharding and Partitioning
- Consistent Hashing (coming soon)
- Hot Partitions, Hot Keys and Resharding (coming soon)
B09 · 2 of 4 lessons published
Compute scaling and load balancing
Vertical and horizontal scaling, stateless services, load balancers, auto-scaling and Kubernetes HPA.
4 concepts in Compute scaling and load balancing
- Scaling Basics
- Stateless Services and Session Affinity (coming soon)
- Load Balancing
- Auto-Scaling and Kubernetes HPA (coming soon)
B10 · 7 of 9 lessons published
Caching
Cache layers, strategies, eviction, invalidation, stampedes and distributed caches, with a Java LRU.
9 concepts in Caching
- Caching Basics
- Advanced Caching Strategies
- Cache Layers: Client, CDN, Application and Database
- Cache-Aside, Read-Through, Write-Through and Write-Back (coming soon)
- Eviction Policies: LRU, LFU and TTL
- Build an LRU Cache in Java
- Cache Invalidation
- Cache Stampede and Hot Keys
- Distributed Caches: Redis and Memcached (coming soon)
B11 · 2 of 11 lessons published
Messaging and event streaming
Queues, pub/sub and logs, Kafka internals, delivery guarantees, dead letters, backpressure and schemas.
11 concepts in Messaging and event streaming
- Synchronous vs Asynchronous Communication (coming soon)
- Message Queues and Pub/Sub
- Event Streaming and Logs
- RabbitMQ vs Kafka (coming soon)
- Kafka Internals: Partitions, Offsets, Consumer Groups and ISR (coming soon)
- Delivery Guarantees: At-Most-Once, At-Least-Once and Exactly-Once (coming soon)
- Dead-Letter Queues and Retries (coming soon)
- Backpressure (coming soon)
- Schema Evolution: Avro and Schema Registry (coming soon)
- Stream Processing Basics (coming soon)
- Background Jobs and Schedulers (coming soon)
B12 · 2 of 7 lessons published
Distributed data consistency patterns
Distributed transactions, sagas, the outbox, CDC, idempotent consumers, CQRS and event sourcing.
7 concepts in Distributed data consistency patterns
- Distributed Transactions: 2PC and Sagas
- Saga: Orchestration vs Choreography (coming soon)
- The Transactional Outbox (coming soon)
- Change Data Capture (coming soon)
- Idempotent Consumers and Deduplication (coming soon)
- CQRS and Event Sourcing
- Eventual Consistency and What It Means for the User Experience (coming soon)
B13 · 5 of 10 lessons published
Architecture styles
Monolith to microservices, DDD, hexagonal architecture, discovery, mesh, serverless, multi-tenancy and migration.
10 concepts in Architecture styles
- Monolith, Modular Monolith and Microservices
- Decomposing into Microservices: Data Ownership and the Distributed Monolith
- Domain-Driven Design and Bounded Contexts
- DDD Tactical Patterns: Aggregates, Entities and Value Objects
- Hexagonal and Clean Architecture in Spring (coming soon)
- Service Discovery
- Service Mesh (coming soon)
- Serverless and Event-Driven Design (coming soon)
- Multi-Tenancy: Shared Schema, Schema-per-Tenant and Database-per-Tenant (coming soon)
- Strangler Fig Migration (coming soon)
B14 · 3 of 10 lessons published
Resilience engineering
Timeouts, retries, circuit breakers, Resilience4j, degradation, load shedding, failover, chaos and failure handling.
10 concepts in Resilience engineering
- Reliability Basics
- Resilience Patterns
- Timeouts, Retries, Exponential Backoff and Jitter (coming soon)
- Circuit Breaker and Bulkhead (coming soon)
- Resilience4j in Spring: Retry, Circuit Breaker, Bulkhead and Time Limiter (coming soon)
- Graceful Degradation and Fallbacks (coming soon)
- Load Shedding and Retry Storms (coming soon)
- Multi-Region and Disaster Recovery
- Chaos Engineering (coming soon)
- Failure Handling End to End (coming soon)
B15 · 1 of 16 lessons published
Security
Authentication, OAuth and OIDC, JWT, Spring Security, access control, encryption, secrets, injection, SSRF and privacy.
16 concepts in Security
- Security for Distributed Systems: An Overview
- Authentication vs Authorization, Sessions vs Tokens (coming soon)
- OAuth 2.0, OpenID Connect and PKCE (coming soon)
- JWT: Structure and Pitfalls (coming soon)
- Authentication Flows End to End (coming soon)
- Spring Security Architecture and the Filter Chain (coming soon)
- RBAC, ABAC and ReBAC (coming soon)
- Encryption at Rest and in Transit (coming soon)
- Secrets Management (coming soon)
- Input Validation and Injection Prevention (coming soon)
- SSRF and the OWASP API Security Top 10 (coming soon)
- Zero Trust and Least Privilege (coming soon)
- Audit Logging (coming soon)
- Compliance and Privacy (GDPR and Similar) (coming soon)
- Threat Modeling for Backend Systems (coming soon)
- CORS: Server Configuration (coming soon)
B16 · 1 of 6 lessons published
Observability and operations
Logs, metrics, traces, Micrometer and OpenTelemetry, correlation IDs, health checks, alerting and postmortems.
6 concepts in Observability and operations
- Observability and SLOs
- Observability with Micrometer, Prometheus and OpenTelemetry (coming soon)
- Correlation IDs and Trace Context (coming soon)
- Health Checks: Liveness, Readiness and Startup (coming soon)
- Alerting and On-Call (coming soon)
- Runbooks, Incidents and Postmortems (coming soon)
B17 · 7 lessons planned
Deployment and platform
Docker, Kubernetes, infrastructure as code, CI/CD, release strategies, feature flags and cost optimization.
7 concepts in Deployment and platform
- Docker and Containers (coming soon)
- Kubernetes Core Objects (coming soon)
- Infrastructure as Code with Terraform (coming soon)
- CI/CD Pipelines and Release Strategy (coming soon)
- Deployment Strategies: Blue-Green, Canary and Rolling (coming soon)
- Feature Flags (coming soon)
- Cost Optimization (coming soon)
Coming soon
B18 · 4 lessons planned
Testing backend systems
The test pyramid, Testcontainers, contract tests, load, stress and soak tests, and testing async flows.
4 concepts in Testing backend systems
- The Testing Pyramid for Backend Systems (coming soon)
- Integration Testing with Testcontainers (coming soon)
- Contract Testing with Pact and Spring Cloud Contract (coming soon)
- Load, Stress and Soak Testing (coming soon)
Coming soon
B19 · 1 of 6 lessons published
Performance and capacity
Capacity planning, JVM profiling, Little's Law, queueing, tail latency and cost versus performance trade-offs.
6 concepts in Performance and capacity
- Capacity Planning and Cost: An Overview
- Capacity Planning (coming soon)
- Profiling the JVM: JFR and async-profiler (coming soon)
- Little's Law and Queueing Intuition (coming soon)
- Tail Latency and p99: Why Averages Lie (coming soon)
- Cost and Performance Trade-Offs (coming soon)
B20 · 5 lessons planned
Specialized systems
Notifications, search and recommendation, upload and media pipelines, payments and ledgers, analytics pipelines.
5 concepts in Specialized systems
- Notification Systems (coming soon)
- Search and Recommendation Systems (coming soon)
- File Upload and Media Processing Pipelines (coming soon)
- Payment Systems and Double-Entry Ledgers (coming soon)
- Analytics Pipelines: Batch, Stream, Lambda and Kappa (coming soon)
Coming soon
B21 · 7 of 20 lessons published
Backend case studies
Eighteen educational reference designs, from a URL shortener to a Drive-style file store, in one template.
20 concepts in Backend case studies
- Case Studies: The Hard Problems Map and the Template
- Case Study: URL Shortener
- Case Study: Distributed Rate Limiter (coming soon)
- Case Study: Distributed Key-Value Store (coming soon)
- Case Study: Distributed Cache (coming soon)
- Case Study: Unique ID Generator (coming soon)
- Case Study: Chat System
- Case Study: News Feed
- Case Study: Notification Service (coming soon)
- Case Study: Search Autocomplete (coming soon)
- Case Study: Video Streaming
- Case Study: Ride Sharing
- Case Study: Ticket Booking and Overselling (coming soon)
- Case Study: Payment System (coming soon)
- Case Study: Web Crawler (coming soon)
- Case Study: Distributed Job Scheduler (coming soon)
- Case Study: E-Commerce Order System (ShopStream) (coming soon)
- Case Study: Ad Click Aggregation (coming soon)
- Case Study: File Storage (Drive/Dropbox-Style) (coming soon)
- Case Study: Photo Sharing App
B22 · 5 lessons planned
Architect interview and capstone
The interview framework, ADRs and C4 documentation, design review, staff expectations and a capstone system.
5 concepts in Architect interview and capstone
- The Backend Architect Interview Framework (coming soon)
- Architecture Decision Records and C4 Documentation (coming soon)
- Reviewing Designs and Staff and Principal Expectations (coming soon)
- Capstone Brief: A Scoped Distributed System (coming soon)
- Capstone: Design Doc, Load Test and Failure-Injection Report (coming soon)
Coming soon
B23 · 11 of 11 lessons published
ShopStream: the design walk-through
One evolving e-commerce system in eleven stages, from the first estimate to the method for designing any system.
11 concepts in ShopStream: the design walk-through
- ShopStream Stage 1: Requirements, Estimates and the First Design
- ShopStream Stage 2: Scaling Reads With Balancers, Caches and a CDN
- ShopStream Stage 3: Choosing the Right Data Store for Each Job
- ShopStream Stage 4: Scaling Writes With Replication and Sharding
- ShopStream Stage 5: The Order Pipeline With Queues, Events and Sagas
- ShopStream Stage 6: Payments and the Ledger, Money Without Mistakes
- ShopStream Stage 7: Search, Notifications, Uploads and Analytics
- ShopStream Stage 8: Splitting the Monolith Into Services
- ShopStream Stage 9: Surviving Failure Without Losing Orders
- ShopStream Stage 10: Secure, Observable and Ready to Run
- Design Any System: A Repeatable Method With Three New Problems
Build one real system
ShopStream, an online grocery marketplace, grows from one server to ten million monthly users. Every stage meets a real problem, brings in the concepts that solve it and ends with the architecture so far. The last lesson turns the stages into a method for designing any system.
What you will be able to do
- Turn a vague idea into clear functional and non-functional requirements.
- Estimate traffic, storage and bandwidth before you draw a single box.
- Choose between caches, queues, databases and replication, and explain the trade-off.
- Design for failure: timeouts, retries, circuit breakers and graceful degradation.
- Reason about consistency, ordering and distributed transactions.
- Walk through complete designs: URL shortener, photo sharing, news feed, chat, video streaming and ride sharing.
- Grow one system, ShopStream, from a single server to ten million users, and apply a repeatable method to design any new system.
Tools you will meet
The lessons teach the ideas first and use these widely used tools as examples. Naming a tool is not an endorsement, and every design in the course works with equivalents.
Data and caching
- PostgreSQLRelational database
- MySQLRelational database
- MongoDBDocument database
- Apache CassandraWide-column database
- DynamoDBManaged key-value database
- RedisIn-memory cache and data store
- MemcachedIn-memory cache
- OpenSearchSearch and analytics engine
- ElasticsearchSearch engine
- Amazon S3Object storage
Messaging and events
- Apache KafkaDistributed event log
- RabbitMQMessage broker
Traffic and platform
- NginxWeb server, reverse proxy, load balancer
- EnvoyProxy for gateways and service meshes
- KubernetesContainer orchestration
- etcdConsensus-backed key-value store
- TerraformInfrastructure as code
Observability
- PrometheusMetrics and alerting
- GrafanaDashboards
Names and logos are trademarks of their respective owners and are shown only to identify the tools.
The whole subject on one page
This cheat sheet maps the territory: requirements, the high-level architecture, the request lifecycle, scaling techniques, reliability, data trade-offs, security and the common myths. The first lesson explains every part of it in text.
Read System Design: The Big Picture
Open the full-size cheat sheetCase studies
Full designs worked end to end: requirements, estimation, API, data model, architecture, bottlenecks and trade-offs. For a longer worked example, read the notification service design.
Questions
- Who is this Backend System Design course for?
- Anyone who builds or will build software: students, developers moving into backend or architecture work, and engineers preparing for system design interviews. The first course assumes no prior knowledge.
- Do I need to know a programming language?
- No. The lessons explain ideas with diagrams, tables and plain language. A few lessons include short code or configuration sketches, but you can follow them without writing code.
- Is it free?
- Yes. The first lesson of each course is open to everyone, and a free account unlocks the rest, tracks your progress and keeps your place.
- Where should I start?
- Start with System Design Foundations. If you already know the basics (load balancers, caches, databases), start with Building Blocks, and take the Advanced course and case studies when you are comfortable with replication, sharding and consistency. The ShopStream project course can be taken alongside any level: it shows the same concepts working together in one system.
- Will this get me through a system design interview?
- It teaches the concepts, the way to reason about trade-offs, and six worked case studies you can practise out loud. No course can promise an interview result, so practise the exercises and explain your designs to another person.