Skip to main content
System Design · Lesson 01

Vertical Scaling vs Horizontal Scaling: System Design for Beginners

Learn the two basic ways an application can grow—from upgrading one machine to sharing work across many machines.

One large upgraded server compared with a group of connected servers

Imagine that your website works well for 100 visitors but slows down when 10,000 arrive. The application needs more capacity. You can make its current server stronger or add more servers. These choices are called vertical scaling and horizontal scaling.

Remember this: Vertical scaling means a bigger machine. Horizontal scaling means more machines.

1. What is System Design?

System design is the process of deciding how the parts of an application work together. Those parts may include browsers, APIs, servers, databases, caches and message queues. A good design gives users a fast and reliable service without creating more complexity than the product needs.

Beginners do not need to memorize every cloud service. Start by following one request: where does it enter, where is it processed, where is data stored, and what happens when traffic grows or one component fails?

2. Why do applications need scaling?

A server has limited CPU, memory, disk capacity and network bandwidth. More users create more requests, database queries and background work. A marketing campaign, product launch or viral post can make the load rise quickly.

Simple example

A food-ordering application handles 20 requests each second during lunch. On a festival evening it may receive 2,000 requests each second. If capacity does not grow, pages become slow, requests time out and orders can fail.

Scaling increases the system's useful capacity. It should be based on measurements such as CPU use, memory pressure, response time, queue length and error rate—not guesses alone.

3. What is Vertical Scaling?

Vertical scaling, also called scaling up, means giving one machine more resources. You may move from 2 CPU cores and 4 GB of memory to 8 cores and 32 GB of memory.

Vertical scaling: upgrade one server
Users
Larger serverMore CPU + RAM
Database
The application stays on one server, but that server becomes more powerful.

4. Simple vertical scaling example

A small online shop runs its application and database on a modest virtual server. Monitoring shows that memory is almost full every afternoon. The team changes the server plan from 4 GB to 16 GB of RAM. No request routing is needed because there is still only one application machine.

This is often the fastest solution for a young product. The application architecture changes very little, and the team gains time to understand real traffic patterns.

5. Advantages of Vertical Scaling

Advantages

  • Simple to understand and operate.
  • Usually requires few application changes.
  • No load balancer is required for one server.
  • Can improve performance quickly.
  • Works well for many databases and small applications.

Watch for

A larger machine is convenient, but convenience does not remove its physical and financial limits.

6. Disadvantages of Vertical Scaling

  • There is a ceiling: every provider has a largest available machine.
  • Upgrades can be expensive: top-tier machines often cost disproportionately more.
  • One failure matters: if the server stops, the whole application may become unavailable.
  • Maintenance may cause downtime: some resize operations require a restart.
  • Scaling down is manual: unused capacity can waste money after traffic drops.

7. What is Horizontal Scaling?

Horizontal scaling, also called scaling out, means adding more machines and sharing the work. Instead of one server processing every request, several application servers operate together.

Horizontal scaling: add more servers
Users
Load balancerRoutes requests
Server 1
Server 2
Server 3
A load balancer sends each request to an available server in the pool.

8. Simple horizontal scaling example

A ticket website expects a rush when concert sales open. Rather than depending on one very large server, the team runs six copies of the application. Each copy can handle requests, and more copies can start when demand rises.

Important: Application instances should be as stateless as practical. Store shared sessions, uploads and durable data in services every instance can reach; otherwise a user's next request may arrive at a different server and lose context.

9. Why is a Load Balancer needed?

Users need one stable address even when an application has many servers. A load balancer receives incoming traffic, checks which servers are healthy and forwards each request to one of them. It can use simple round-robin distribution or smarter rules based on capacity and response time.

If Server 2 fails a health check, the load balancer can temporarily stop sending traffic to it. This makes the group more resilient than a single server, although the load balancer itself must also be deployed reliably. Continue with the planned load balancer lesson.

10. Advantages of Horizontal Scaling

  • Higher growth ceiling: capacity can increase by adding instances.
  • Better availability: healthy servers can continue when one fails.
  • Flexible capacity: automation can add and remove instances as traffic changes.
  • Safer maintenance: instances can be updated one group at a time.
  • Commodity machines: several standard servers may be more practical than one extreme machine.

11. Disadvantages of Horizontal Scaling

  • The architecture is harder to build, deploy and observe.
  • A routing or load-balancing layer is needed.
  • Sessions and files cannot safely live on only one application instance.
  • Concurrent requests may expose race conditions.
  • Databases and third-party services can become the next bottleneck.
  • Distributed logs and failures are harder to investigate.

12. Vertical vs Horizontal Scaling comparison

AreaVertical scalingHorizontal scaling
Main ideaUpgrade one machineAdd more machines
Other nameScale upScale out
Initial complexityLowerHigher
Growth limitMachine-size limitUsually much higher
Failure riskOne server can be a single point of failureTraffic can move away from a failed instance
Application changesOften fewMay require stateless design and shared services
Best early useSmall systems and quick capacity increasesGrowing systems needing availability and elasticity

13. Real-world example

Consider a growing photo-sharing application. It begins on one server. When image processing consumes too much CPU, the team first moves to a larger server. That is vertical scaling and may be the right choice at this stage.

Later, traffic becomes unpredictable and one machine can no longer provide enough capacity or availability. The team places a load balancer in front of several application instances, moves uploads to shared object storage and keeps sessions in a shared store. The application tier now scales horizontally.

The database may still use vertical scaling for a while. A cache can reduce repeated reads, replicas can serve read traffic, and more advanced data partitioning can come later. Real systems often mix both approaches instead of choosing only one forever.

14. When should you use each approach?

Choose vertical scaling when

  • The product is small or traffic is predictable.
  • You need a quick, low-complexity improvement.
  • The software is difficult to distribute.
  • A larger machine remains affordable.

Choose horizontal scaling when

  • Traffic may exceed one machine's limit.
  • Downtime has a high business cost.
  • Demand changes quickly.
  • The application can run as multiple stateless instances.
Practical rule: Use the simplest design that meets today's needs, but avoid choices that make tomorrow's likely growth impossible.

15. Common interview questions

  1. What is the difference between scaling up and scaling out?
    Scaling up adds resources to one machine; scaling out adds machines.
  2. Why does horizontal scaling improve availability?
    Another healthy instance can handle traffic when one instance fails.
  3. What makes horizontal scaling difficult?
    Shared state, routing, data consistency, observability and distributed failures.
  4. Can a database scale horizontally?
    Yes, through patterns such as read replicas, partitioning and sharding, but data consistency makes it more complex.
  5. What is a single point of failure?
    A component whose failure can stop the whole service.

16. Key takeaways

  • Vertical scaling upgrades one machine; horizontal scaling adds machines.
  • Vertical scaling is usually simpler but has a hard ceiling.
  • Horizontal scaling supports resilience and elastic growth but adds operational complexity.
  • A load balancer normally distributes web traffic across application instances.
  • Stateless application servers are easier to scale horizontally.
  • Most production systems combine both approaches.
  • Measure the bottleneck before spending money or redesigning the architecture.

17. Frequently asked questions

Is vertical or horizontal scaling better?

Neither is always better. Vertical scaling is simpler and often ideal early on. Horizontal scaling provides more growth and resilience when the extra complexity is justified.

Does horizontal scaling always need a load balancer?

Web applications usually need a load balancer or another routing layer so clients can use one address while requests are distributed across instances.

Can an application use both approaches?

Yes. Many systems use reasonably powerful machines and add more instances as traffic grows. Databases and application servers may also follow different scaling strategies.

Is auto scaling the same as horizontal scaling?

Auto scaling is automation that changes capacity using rules or metrics. It often adds and removes instances horizontally, though some platforms can also resize resources.

What should a beginner learn next?

Learn load balancing next, followed by caching, database scaling, queues and rate limiting. Each solves a different bottleneck or reliability problem.

Keep building your System Design foundation

Continue through the visual beginner series and learn one architecture building block at a time.

Explore the series
WhatsApp