Scaling a system

Keeping a service up as traffic grows: scaling vertically or horizontally, why a stateless server is easy to duplicate, where the real bottleneck hides. Definitions, scenarios and trade-offs, every answer explained.

  • 33 cards
  • 3 topics
  • Free

The outline, topic by topic

Each topic is weighted the way the exam weighs it.

  1. Vertical or horizontal
  2. Stateless
  3. Bottlenecks

A few cards from the deck

  • What is “scaling vertically”?

    Show the answer

    Giving the same machine more resources (CPU, memory, disk)

    It is simple and the code does not change, but it soon hits the largest machine available, and that machine stays a single point of failure.

  • A site runs on one saturated server and traffic will double next year. Which approach holds over time?

    • Add identical servers behind a load balancer
    • Buy a bigger server every year
    • Restart the server every night
    • Accept fewer connections
    Show the answer

    Add identical servers behind a load balancer

    Horizontal scaling has no hardware ceiling and removes the single point of failure; vertical scaling always ends at the largest machine.

  • Giving the same machine more resources (CPU, memory, disk): what is this called?

    Show the answer

    scaling vertically

    It is simple and the code does not change, but it soon hits the largest machine available, and that machine stays a single point of failure.

  • When is vertical scaling often the right first move?

    • For a database that is still small, simpler to keep on one machine
    • For a service that must survive a machine failure
    • For traffic that will grow a hundredfold
    • To serve users on several continents
    Show the answer

    For a database that is still small, simpler to keep on one machine

    Spreading a database across machines is complex; as long as a bigger machine is enough, it is the simplest way to gain headroom.