Interview Q&A / System Design

INTERVIEW Q&A · 70 QUESTIONS

System Design interview questions

Caching, scaling, databases and classic design problems for beginners.

  1. What is the difference between horizontal and vertical scaling?

    Vertical scaling (scaling up) makes one machine bigger with more CPU, RAM or faster disks. Horizontal scaling (scaling out) adds more machines and spreads the load across them. Vertical is simpler but has a hard ceiling and a single point of failure; horizontal scales further and survives failures but needs stateless services and a load balancer.

    BeginnerIn-depth4 min read
  2. When would you choose vertical scaling over horizontal scaling?

    Choose vertical scaling when the system is small, stateful, or hard to split, such as a single relational database. It is simple and fast to do, but it has a hardware ceiling and leaves one machine as a single point of failure.

    BeginnerQuick answer1 min read
  3. Why are stateless services easier to scale horizontally?

    A stateless server keeps no per-user data in its own memory, so any server can handle any request. You can add, remove or replace servers freely behind a load balancer, with no sticky routing.

    BeginnerQuick answer1 min read