Skip to main content

What is horizontal scaling (horizontal scaling)?

Horizontal scaling is increasing a system's performance by adding new servers (nodes) that jointly handle the database's load.

The idea is simple

Instead of one powerful server, a cluster of several machines is used. Data and requests get split across them. The main methods:

  • Sharding, splitting data into parts, each stored on a separate server. For example, users with IDs 1-100000 on one server, 100001-200000 on another.
  • Replication, copying data between nodes. One server can be the primary (master), while the rest are copies (replicas) that only accept read requests.
  • Load balancing, spreading requests across servers for an even load.

The advantage is nearly unlimited performance growth and fault tolerance. The drawback is added complexity in data synchronization, transaction consistency, and cluster administration.

Short Answer

Interview ready
Premium

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