System design

Stage 1 · Lesson 1 of 10

Vertical vs horizontal scaling and stateless services

Core concepts and building blocks

There are two ways to handle more traffic. scaling, or scale up, means a bigger machine with more CPU, more memory or faster disks. It is simple and needs no code changes.

But one machine can only get so big, and if it dies, everything stops: it is a single point of failure. Horizontal scaling, or scale out, means adding more machines behind a , which shares requests between them. There is no hard ceiling, and the system survives one machine dying.

It only works if any server can handle any request. That is why we build : a server keeps nothing in its own memory between requests. Sessions, uploads and caches move out of the app into a shared store such as , a database or .

Common trapsticky state hidden in the app, like an in-memory list of logged-in sessions, which silently breaks the moment a second server is added.

A question to check yourself, an AI practice session and 2 cheat sheet entries come with the full roadmap. Unlock

Resources for this stage

Start with· follow one of these

  • CoursePaid
    Grokking System Design Fundamentals

    Design Gurus · Beginner · Subscription

    Load balancing, API gateway, proxies, caching, CAP and Bloom filters: week 1 of the plan in order

  • GitHub repoFree
    The System Design Primer

    Donne Martin · Intermediate

    Free: its scalability, latency, availability, CDN, load balancer and cache sections

Keep handy

  • Free Design Gurus concept index for looking up a term in the middle of a lesson

Also worth your time

Mark this stage as not done?