AWS in 1 Min · Episode 176

Scaling up vs scaling out on AWS

A bigger box, or more boxes. Watch the one-minute video, then read the details.

David Gomez1:04 video · 2 min read

"A bigger server fixes every slowdown." For a while. Every machine has a ceiling, and one machine, however big, is still one point of failure. On AWS you have two ways to add capacity, and good architectures usually prefer one of them.

Scaling up (vertical)

Scaling up means moving to a bigger instance: more vCPUs, more memory, faster network. On EC2 you change the instance type.

  • Simple: no code changes. The application does not know it got bigger.
  • Downtime: an EBS-backed EC2 instance must be stopped before you can change its type, so the resize interrupts service unless something else covers for it.
  • Ceiling: the largest size in the instance family is the limit, and big sizes get expensive.

Scaling up is often the right first move for a database, where splitting the work is hard. Managed databases then add read replicas to spread out reads.

Scaling out (horizontal)

Scaling out means adding more instances that share the work. A load balancer spreads requests across them, and an Auto Scaling group adds instances when traffic grows and removes them when it falls, so you pay for what you use.

Benefits:

  • No hard ceiling for most web workloads: add another instance.
  • Resilience: instances in several Availability Zones mean losing one does not take you down.
  • No resize downtime: you add capacity next to the running instances.

The catch: any copy must handle any request

Scaling out only works if any instance can answer any request. If a user's login session or uploaded file lives on one server's disk, the next request may land on a different server that knows nothing about it. The fix is to keep sessions, files and data outside the server: sessions in DynamoDB or ElastiCache, files in S3, data in a database. That design is called a stateless application, the topic of the next episode.

A common mistake is to scale out an application that still writes sessions to local disk, then "fix" the random logouts with sticky sessions. It works until an instance is replaced.

Where AI fits

AI has the same choice, with GPUs: a bigger GPU, or more of them?

  • Scale up when the model is too big: its weights must fit in GPU memory, so a large model needs an instance with more GPU memory or several GPUs in one machine.
  • Scale out when users grow: once one copy of the model fits, more traffic needs more copies of the model behind an endpoint. Amazon SageMaker AI endpoints, for example, can auto scale the number of instances.

With managed services such as Amazon Bedrock, AWS does this for you; you work with quotas and throughput instead of instance counts.

Quick recap

  • Up means a bigger box: simple, but it has a ceiling and usually a restart.
  • Out means more boxes behind a load balancer, scaled by an Auto Scaling group.
  • Out needs stateless apps; for AI, model size drives up, user count drives out.
AWS in 1 Min #176 · 1:04

Need an AWS expert on your team?

I'm David, an AWS expert and fractional cloud consultant. I work alongside your team to run your cloud and infrastructure: architecture, security, cost and day-to-day operations. You get senior AWS experience when you need it, without the cost of a full-time hire.

  • Architecture reviews and a clear plan for what to fix first
  • Security hardening: IAM, networking, audits
  • Lower AWS bills without slowing your team down
  • Hands-on help with AI workloads on AWS