Skip to main content

What is database scaling?

Database scaling is the process of increasing its performance and throughput as load grows (data volume, request count, users).

There are two main approaches:

Vertical scaling (Scale-up)

The power of a single server increases, adding more CPU, RAM, an SSD.

  • Pros: simple to implement, no architectural changes needed.
  • Cons: there's a physical ceiling, it's expensive, and it's a single point of failure.

Example: upgrading a PostgreSQL server from 16 GB RAM to 64 GB.

Horizontal scaling (Scale-out)

The load gets spread across several servers (nodes).

  • Pros: flexible, fault-tolerant, you can add capacity as you grow.
  • Cons: harder to configure and keep data in sync.

Example solutions:

  • Sharding, the database gets split into parts by user, region, and so on.
  • Replication, data gets copied to several servers: one primary, the rest for reads.
  • Caching, some requests get served from memory (Redis, Memcached).

Conclusion: scaling is a way to make the database faster and more resilient under load, choosing between "add more power" and "add more servers".

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.