Skip to content
    Back to courses

    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.

    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.

    1. 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
      1. The Big Picture
      2. Client-Server and N-Tier Architecture
      3. Requirements and Scope
      4. Back-of-the-Envelope Estimation
      5. Latency vs Throughput (coming soon)
      6. Availability, Reliability, Durability and SLOs
      7. A Repeatable Approach
      8. Trade-Off Analysis (coming soon)
      9. The Building Blocks Map
    2. 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
      1. The Request Lifecycle
      2. TCP and UDP (coming soon)
      3. DNS (coming soon)
      4. TLS and HTTPS (coming soon)
      5. HTTP/1.1, HTTP/2 and HTTP/3 (coming soon)
      6. Forward and Reverse Proxies (coming soon)
      7. CDN and Edge Networking (coming soon)
      8. CDN and Object Storage
      9. WebSockets, Server-Sent Events and Long Polling (coming soon)
    3. 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
      1. The JVM Memory Model and Heap (coming soon)
      2. Garbage Collectors: G1 and ZGC (coming soon)
      3. Thread Pools, Executors and CompletableFuture (coming soon)
      4. Virtual Threads (Project Loom) (coming soon)
      5. Blocking vs Reactive: Spring MVC and WebFlux (coming soon)
      6. Connection Pooling with HikariCP (coming soon)

      Coming soon

    4. 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
      1. API Design
      2. REST, gRPC, GraphQL and WebSockets: Choosing an API Style (coming soon)
      3. gRPC and Protobuf (coming soon)
      4. GraphQL on the Server and the N+1 Problem (coming soon)
      5. API Gateway and Service Mesh: An Overview
      6. The API Gateway Pattern (coming soon)
      7. Backend for Frontend (BFF) (coming soon)
      8. Pagination: Offset, Cursor and Keyset (coming soon)
      9. Idempotency Keys and Safe Retries (coming soon)
      10. Rate Limiting
      11. Token Bucket, Leaky Bucket and Window Counters in Java with Redis (coming soon)
      12. OpenAPI, Contract-First Design and API Contracts (coming soon)
      13. The Error Model: RFC 9457 Problem Details (coming soon)
    5. 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
      1. Databases Basics
      2. Normalization (1NF to BCNF) and Denormalization (coming soon)
      3. SQL Joins (coming soon)
      4. Aggregation, Window Functions and CTEs (coming soon)
      5. SQL Indexing: B-Trees, Composite, Covering and Partial Indexes (coming soon)
      6. Query Plans with EXPLAIN ANALYZE (coming soon)
      7. ACID Transactions and Isolation Levels (coming soon)
      8. MVCC: Multi-Version Concurrency Control (coming soon)
      9. Locking: Optimistic vs Pessimistic and Deadlocks (coming soon)
      10. Spring @Transactional (coming soon)
      11. JPA and Hibernate: N+1, Lazy Loading and Batching (coming soon)
      12. Data Modeling, Schema Evolution and Zero-Downtime Migrations (coming soon)
      13. Table Partitioning (coming soon)
      14. SQL vs NoSQL: A Decision Framework (coming soon)
    6. 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
      1. NoSQL Types: Key-Value, Document, Wide-Column and Graph (coming soon)
      2. Storage Engines: B-Trees vs LSM Trees
      3. Redis Data Structures (coming soon)
      4. MongoDB and Document Modelling (coming soon)
      5. Cassandra and DynamoDB-Style Modelling (coming soon)
      6. Search Engines and the Inverted Index
      7. Time-Series Databases (coming soon)
      8. Object and Blob Storage (coming soon)
      9. Data Warehouses and Data Lakes (coming soon)
    7. 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
      1. The Fallacies of Distributed Computing
      2. CAP, PACELC and Consistency Models: An Overview
      3. CAP Theorem and PACELC
      4. Consistency Models: Linearizable to Eventual
      5. Quorum Reads and Writes (R + W > N)
      6. Consensus and Leader Election (Raft and Paxos)
      7. Distributed Locks and Fencing Tokens
      8. IDs, Clocks and Ordering
      9. Logical and Vector Clocks
      10. Unique ID Generation: UUID, ULID and Snowflake
      11. Gossip Protocols and Failure Detectors (coming soon)
      12. Idempotent and Commutative Operations
      13. CRDTs and Conflict Resolution (coming soon)
    8. B08 · 2 of 6 lessons published

      Data scaling

      Replication styles and lag, sharding, consistent hashing, hot partitions and resharding.

      6 concepts in Data scaling
      1. Replication
      2. Multi-Leader and Leaderless Replication (coming soon)
      3. Replication Lag and Read-Your-Writes (coming soon)
      4. Sharding and Partitioning
      5. Consistent Hashing (coming soon)
      6. Hot Partitions, Hot Keys and Resharding (coming soon)
    9. 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
      1. Scaling Basics
      2. Stateless Services and Session Affinity (coming soon)
      3. Load Balancing
      4. Auto-Scaling and Kubernetes HPA (coming soon)
    10. B10 · 7 of 9 lessons published

      Caching

      Cache layers, strategies, eviction, invalidation, stampedes and distributed caches, with a Java LRU.

      9 concepts in Caching
      1. Caching Basics
      2. Advanced Caching Strategies
      3. Cache Layers: Client, CDN, Application and Database
      4. Cache-Aside, Read-Through, Write-Through and Write-Back (coming soon)
      5. Eviction Policies: LRU, LFU and TTL
      6. Build an LRU Cache in Java
      7. Cache Invalidation
      8. Cache Stampede and Hot Keys
      9. Distributed Caches: Redis and Memcached (coming soon)
    11. 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
      1. Synchronous vs Asynchronous Communication (coming soon)
      2. Message Queues and Pub/Sub
      3. Event Streaming and Logs
      4. RabbitMQ vs Kafka (coming soon)
      5. Kafka Internals: Partitions, Offsets, Consumer Groups and ISR (coming soon)
      6. Delivery Guarantees: At-Most-Once, At-Least-Once and Exactly-Once (coming soon)
      7. Dead-Letter Queues and Retries (coming soon)
      8. Backpressure (coming soon)
      9. Schema Evolution: Avro and Schema Registry (coming soon)
      10. Stream Processing Basics (coming soon)
      11. Background Jobs and Schedulers (coming soon)
    12. 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
      1. Distributed Transactions: 2PC and Sagas
      2. Saga: Orchestration vs Choreography (coming soon)
      3. The Transactional Outbox (coming soon)
      4. Change Data Capture (coming soon)
      5. Idempotent Consumers and Deduplication (coming soon)
      6. CQRS and Event Sourcing
      7. Eventual Consistency and What It Means for the User Experience (coming soon)
    13. 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
      1. Monolith, Modular Monolith and Microservices
      2. Decomposing into Microservices: Data Ownership and the Distributed Monolith
      3. Domain-Driven Design and Bounded Contexts
      4. DDD Tactical Patterns: Aggregates, Entities and Value Objects
      5. Hexagonal and Clean Architecture in Spring (coming soon)
      6. Service Discovery
      7. Service Mesh (coming soon)
      8. Serverless and Event-Driven Design (coming soon)
      9. Multi-Tenancy: Shared Schema, Schema-per-Tenant and Database-per-Tenant (coming soon)
      10. Strangler Fig Migration (coming soon)
    14. 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
      1. Reliability Basics
      2. Resilience Patterns
      3. Timeouts, Retries, Exponential Backoff and Jitter (coming soon)
      4. Circuit Breaker and Bulkhead (coming soon)
      5. Resilience4j in Spring: Retry, Circuit Breaker, Bulkhead and Time Limiter (coming soon)
      6. Graceful Degradation and Fallbacks (coming soon)
      7. Load Shedding and Retry Storms (coming soon)
      8. Multi-Region and Disaster Recovery
      9. Chaos Engineering (coming soon)
      10. Failure Handling End to End (coming soon)
    15. 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
      1. Security for Distributed Systems: An Overview
      2. Authentication vs Authorization, Sessions vs Tokens (coming soon)
      3. OAuth 2.0, OpenID Connect and PKCE (coming soon)
      4. JWT: Structure and Pitfalls (coming soon)
      5. Authentication Flows End to End (coming soon)
      6. Spring Security Architecture and the Filter Chain (coming soon)
      7. RBAC, ABAC and ReBAC (coming soon)
      8. Encryption at Rest and in Transit (coming soon)
      9. Secrets Management (coming soon)
      10. Input Validation and Injection Prevention (coming soon)
      11. SSRF and the OWASP API Security Top 10 (coming soon)
      12. Zero Trust and Least Privilege (coming soon)
      13. Audit Logging (coming soon)
      14. Compliance and Privacy (GDPR and Similar) (coming soon)
      15. Threat Modeling for Backend Systems (coming soon)
      16. CORS: Server Configuration (coming soon)
    16. 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
      1. Observability and SLOs
      2. Observability with Micrometer, Prometheus and OpenTelemetry (coming soon)
      3. Correlation IDs and Trace Context (coming soon)
      4. Health Checks: Liveness, Readiness and Startup (coming soon)
      5. Alerting and On-Call (coming soon)
      6. Runbooks, Incidents and Postmortems (coming soon)
    17. 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
      1. Docker and Containers (coming soon)
      2. Kubernetes Core Objects (coming soon)
      3. Infrastructure as Code with Terraform (coming soon)
      4. CI/CD Pipelines and Release Strategy (coming soon)
      5. Deployment Strategies: Blue-Green, Canary and Rolling (coming soon)
      6. Feature Flags (coming soon)
      7. Cost Optimization (coming soon)

      Coming soon

    18. 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
      1. The Testing Pyramid for Backend Systems (coming soon)
      2. Integration Testing with Testcontainers (coming soon)
      3. Contract Testing with Pact and Spring Cloud Contract (coming soon)
      4. Load, Stress and Soak Testing (coming soon)

      Coming soon

    19. 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
      1. Capacity Planning and Cost: An Overview
      2. Capacity Planning (coming soon)
      3. Profiling the JVM: JFR and async-profiler (coming soon)
      4. Little's Law and Queueing Intuition (coming soon)
      5. Tail Latency and p99: Why Averages Lie (coming soon)
      6. Cost and Performance Trade-Offs (coming soon)
    20. B20 · 5 lessons planned

      Specialized systems

      Notifications, search and recommendation, upload and media pipelines, payments and ledgers, analytics pipelines.

      5 concepts in Specialized systems
      1. Notification Systems (coming soon)
      2. Search and Recommendation Systems (coming soon)
      3. File Upload and Media Processing Pipelines (coming soon)
      4. Payment Systems and Double-Entry Ledgers (coming soon)
      5. Analytics Pipelines: Batch, Stream, Lambda and Kappa (coming soon)

      Coming soon

    21. 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
      1. Case Studies: The Hard Problems Map and the Template
      2. Case Study: URL Shortener
      3. Case Study: Distributed Rate Limiter (coming soon)
      4. Case Study: Distributed Key-Value Store (coming soon)
      5. Case Study: Distributed Cache (coming soon)
      6. Case Study: Unique ID Generator (coming soon)
      7. Case Study: Chat System
      8. Case Study: News Feed
      9. Case Study: Notification Service (coming soon)
      10. Case Study: Search Autocomplete (coming soon)
      11. Case Study: Video Streaming
      12. Case Study: Ride Sharing
      13. Case Study: Ticket Booking and Overselling (coming soon)
      14. Case Study: Payment System (coming soon)
      15. Case Study: Web Crawler (coming soon)
      16. Case Study: Distributed Job Scheduler (coming soon)
      17. Case Study: E-Commerce Order System (ShopStream) (coming soon)
      18. Case Study: Ad Click Aggregation (coming soon)
      19. Case Study: File Storage (Drive/Dropbox-Style) (coming soon)
      20. Case Study: Photo Sharing App
    22. 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
      1. The Backend Architect Interview Framework (coming soon)
      2. Architecture Decision Records and C4 Documentation (coming soon)
      3. Reviewing Designs and Staff and Principal Expectations (coming soon)
      4. Capstone Brief: A Scoped Distributed System (coming soon)
      5. Capstone: Design Doc, Load Test and Failure-Injection Report (coming soon)

      Coming soon

    23. 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
      1. ShopStream Stage 1: Requirements, Estimates and the First Design
      2. ShopStream Stage 2: Scaling Reads With Balancers, Caches and a CDN
      3. ShopStream Stage 3: Choosing the Right Data Store for Each Job
      4. ShopStream Stage 4: Scaling Writes With Replication and Sharding
      5. ShopStream Stage 5: The Order Pipeline With Queues, Events and Sagas
      6. ShopStream Stage 6: Payments and the Ledger, Money Without Mistakes
      7. ShopStream Stage 7: Search, Notifications, Uploads and Analytics
      8. ShopStream Stage 8: Splitting the Monolith Into Services
      9. ShopStream Stage 9: Surviving Failure Without Losing Orders
      10. ShopStream Stage 10: Secure, Observable and Ready to Run
      11. 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
    System Design cheat sheet: requirements, high-level architecture, request lifecycle, scaling techniques, reliability, data and distributed systems, security and operations, common myths and a practical checklistOpen the full-size cheat sheet

    Case 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.