← All posts
6 min read

Vertical and Horizontal Scaling Revisited

#technology#scaling#distributed-systems#systems-at-scale
📑 On this page

Capacity can grow by making one machine larger or by distributing work across more machines.

Both approaches are useful. They fail in different ways and move complexity to different parts of the system.

Scaling up preserves simpler coordination but has machine limits; scaling out exchanges those limits for distributed-system complexity.

Most large systems use a combination rather than one pure strategy.

A concrete example: a growing database

A database first moves from:

  • 4 CPUs to 16,
  • more memory,
  • faster storage.

This vertical step requires little application change.

Later, one host cannot meet capacity or recovery needs, so data is sharded across nodes. The application must now route each customer and combine cross-shard reports.

Vertical scaling

Vertical scaling increases resources of one node:

  • CPU,
  • memory,
  • storage,
  • network,
  • or accelerator.

It keeps one process or database authority and avoids many coordination problems.

Advantages of scaling up

Advantages include:

  • simple architecture,
  • local transactions,
  • easy joins,
  • fewer network calls,
  • and familiar operations.

For many products, a larger managed database is the most economical next step.

Limits of scaling up

Limits include:

  • maximum hardware size,
  • steep premium tiers,
  • restart or migration,
  • one larger failure domain,
  • and finite vertical headroom.

At the top tier, the next increase may require redesign under pressure.

Horizontal scaling

Horizontal scaling adds nodes:

  • web instances,
  • workers,
  • cache servers,
  • database shards,
  • or replicas.

Work must be divisible and routed among them.

Stateless services

Stateless request handlers scale out relatively easily.

Shared state belongs in:

  • database,
  • cache,
  • object storage,
  • or signed client data.

Local-only sessions and files create affinity and replacement risk.

Stateful systems

Scaling databases and stateful services requires:

  • replication,
  • partitioning,
  • consistency,
  • leadership,
  • failover,
  • and rebalancing.

The hard problem is preserving meaning while copies and partitions change.

Load distribution

A load balancer or partition function distributes work.

Even distribution by request count may be uneven by cost. One large customer or expensive endpoint can create a hot node.

Use workload-aware signals where practical.

Partitioning

Horizontal data scaling needs a partition key:

  • customer ID,
  • region,
  • device,
  • or time.

The key affects:

  • locality,
  • balance,
  • queries,
  • transactions,
  • and migration.

It becomes an architectural contract.

Coordination

Nodes coordinate for:

  • shared locks,
  • unique identifiers,
  • leader election,
  • ordering,
  • and transactions.

Coordination adds network latency and failure uncertainty. Avoid global coordination when the business invariant does not need it.

Consistency

Replicas and shards may temporarily disagree or be unavailable.

Decide:

  • authoritative write path,
  • stale read tolerance,
  • conflict resolution,
  • and behavior during partition.

Horizontal scale is not only "more servers."

Failure domains

One large node creates one large failure.

Many nodes allow partial survival but introduce more frequent individual failures. Automation must replace nodes without turning routine failure into an incident.

Spread nodes across meaningful zones.

Elasticity

Horizontal fleets can add and remove capacity incrementally.

Stateful nodes are harder because:

  • data must move,
  • caches warm,
  • replicas catch up,
  • and membership changes coordinate.

Compute elasticity is usually faster than data elasticity.

Cost curve

Larger machines often cost more than proportional at high tiers.

Horizontal scale adds:

  • load balancers,
  • transfer,
  • coordination,
  • observability,
  • and engineering.

Compare total cost, not instance count.

Operational complexity

More nodes mean:

  • more deployments,
  • more telemetry,
  • more failure combinations,
  • more configuration,
  • and more security identities.

Platforms and automation can make this manageable but still need ownership.

Hybrid strategy

A common progression:

  1. optimize obvious inefficiency,
  2. scale vertically,
  3. add read replicas or caches,
  4. split independent workloads,
  5. shard only when evidence requires it.

This delays irreversible complexity while preserving a path to growth.

Functional decomposition

Instead of sharding one database immediately, separate workloads with different needs:

  • search index,
  • analytics warehouse,
  • media storage,
  • queue,
  • reporting replica.

This is horizontal scaling by responsibility and can reduce pressure on the transactional core.

Amdahl's law

Speeding one parallelizable part cannot improve the serial portion.

If 20 percent of work must remain sequential, adding workers to the other 80 percent has diminishing returns.

Measure the serial and coordination components.

Scaling and reliability

More capacity does not guarantee reliability.

A shared database, deployment, DNS, or cloud account can remain one failure point. Scale architecture should map capacity and failure domains separately.

Migration cost

Scaling decisions are easier when their migration path is understood in advance.

Moving to a larger host may require minutes of failover. Sharding may require months of dual writes, backfill, routing changes, and query redesign. Include engineering time, temporary duplicate infrastructure, data verification, and rollback limitations in the comparison.

Organizational scaling

One technically centralized system can also become a coordination bottleneck for teams.

Clear APIs, ownership, and deployment boundaries may improve delivery before data needs physical distribution. Splitting architecture solely to mirror an org chart can create network complexity without capacity benefit, so measure both technical and team constraints.

Decision questions

Ask:

  1. Which resource is constrained?
  2. How much vertical headroom exists?
  3. Can work be partitioned naturally?
  4. Which transactions cross partitions?
  5. How will nodes fail and recover?
  6. What operational skill and cost are available?

Knowledge check

  1. Why is vertical scaling operationally simpler?
  2. What new decisions appear when state scales horizontally?
  3. Why can equal request counts still create uneven load?
  4. How does data elasticity differ from compute elasticity?
  5. Why might functional decomposition come before database sharding?

The one idea to remember

Vertical scaling buys capacity while preserving one coordination boundary; horizontal scaling adds nodes and requires routing, partitioning, consistency, recovery, and automation. Use measurement and natural workload boundaries to introduce distribution only when its value exceeds its cost.