Skip to content
LakeBench
ProblemsCommunityPricing
Sign inStart practicing
Back
  1. Home
  2. Interview prep
  3. Horizontal vs vertical scaling

Cloud · General Cloud

Horizontal vs vertical scaling

Easycloud-18
scalinghorizontalverticalperformance

Question

What is the difference between horizontal and vertical scaling?

Solution

Vertical scaling (scale up) means making one machine bigger: more CPU, RAM, or disk on the same node.

Horizontal scaling (scale out) means adding more machines and spreading work across them.

Vertical:   [ small VM ]  -->  [ BIG VM ]

Horizontal: [VM]          -->  [VM][VM][VM][VM]

Data engineering examples

  • Vertical: resize a Redshift node type; give Spark driver more memory
  • Horizontal: add Spark executors / EMR core nodes; add Kafka partitions + consumers; add BigQuery slots conceptually via concurrency

Trade-offs

  • Vertical is simple until you hit hardware limits and single-node failure blast radius
  • Horizontal needs distributable workloads (sharding, partitioning, stateless services)

Interview tip: "Up = bigger box; out = more boxes." For big data, prefer designs that scale horizontally (partitioned data + parallel workers).

PreviousNext