System Design Academy

Saving…

Lesson 3 of 8 in Module 20 of 54 lessons complete

Vertical Scaling

Module 2, lesson 3Concept10 min

Definition

Scaling

In plain English
Scaling is changing a system so it can handle more work.
Think of it like
It is like adding tables to a restaurant when more diners arrive.

Vertical scaling

In plain English
Vertical scaling means making one machine more powerful with more processors, more memory or faster disks.
Think of it like
It is like swapping your hatchback for a bigger van instead of buying a second car.

Stateless service

In plain English
A stateless service keeps no user-specific memory between requests, so any copy can handle any request.
Think of it like
It is like a bank where any teller can help you because your details live in the shared system, not in one teller's head.

Single point of failure

In plain English
A single point of failure is one part whose breakdown stops the whole system.
Think of it like
It is like an old string of fairy lights where one dead bulb turns off the whole string.

Why it exists

Your database slows during lunch because its memory is full. A larger machine gives it more room.

You keep one server to manage. For many early products, this is the quickest useful upgrade.

How it works

Bottleneck

In plain English
A bottleneck is the one part that limits how fast the whole system can go.
Think of it like
Like the narrow neck of a bottle that slows the pour.

Working set

In plain English
The working set is the data a program touches often enough that it should fit in memory.
Think of it like
Like the books you keep on your desk instead of in the basement.

CDN

In plain English
A CDN is a network of servers that delivers copies of content from locations near users.
Think of it like
It is like keeping the same leaflet at many local branches.
  1. Find the limit

    Check processor use, memory use and time waiting for disk reads.

  2. Choose an upgrade

    Buy more of the resource that limits your work.

  3. Move or restart

    Plan the interruption before moving to the bigger machine.

  4. Measure again

    Compare latency and throughput under the same amount of work.

SymptomUpgrade to consider
Processor busy almost all the timeMore processing cores for work that runs at the same time
Frequently used data exceeds memoryMore memory
Slow disk readsFaster solid-state storage, called an SSD

A server with four processing cores and 16 GB of memory becomes one with 64 cores and 512 GB.

Vertical scaling enlarges one machine.

A server with four processing cores and 16 GB of memory becomes one with 64 cores and 512 GB.

Examples

Keep common records in memory

The inventory database holds 40 GB of data but has 8 GB of memory. Measured common queries improve about tenfold after a 64 GB upgrade.

Before the upgrade, common queries repeatedly read slower disks. Afterward, the working set fits in memory.

  • Check which records are accessed often.
  • Measure the improvement rather than promising tenfold gains everywhere.

The insight

Fitting the working set in memory makes a targeted upgrade valuable.

Trade-offs

Pros

  • Usually needs few application changes.
  • Keep one machine to manage.
  • Avoid dividing data across servers.

Cons

  • Machine sizes have a ceiling.
  • Higher sizes often cost more per unit of work.
  • One failure still stops service.
  • Resizing often interrupts service.

Use when

  • Relieve a measured resource limit.
  • Grow an early product with modest demand.

Avoid when

  • Avoid relying on one machine when outages are costly.
  • Avoid it when growth exceeds the largest size.

Quick check

Which is vertical scaling?
Biggest weakness of relying only on vertical scaling?

Takeaways

  • Vertical scaling means a bigger machine.
  • Upgrade the resource that limits useful work.
  • One large machine still has a capacity ceiling and a failure risk.

Try the quick check above whenever you feel ready.

Previous: Back-of-the-Envelope Estimation