Cianplan

Level 0: Orientation & prerequisites · L0.1 How the internet works & the design interview frame

From one server to many

Explain vertical vs horizontal scaling and why statelessness matters.

13 min · Free

What you take away

  • Vertical scaling buys a bigger machine: simple, immediate, but it has a ceiling and is still a single point of failure.
  • Horizontal scaling adds machines behind a load balancer: elastic and survivable, but it needs the servers to be interchangeable.
  • Interchangeable means stateless: no session, no uploaded file, no counter kept in the process between requests.
  • State does not disappear, it moves to a shared store — a database, a cache or a signed token.

How the class is laid out

  1. The problem
  2. The simple version
  3. What actually changes when you add the second server
  4. Stateless does not mean amnesiac
  5. Check your understanding