Horizontal scalability

Horizontal scalability

Dynamically add and remove nodes in a running cluster

A YugabyteDB cluster can be scaled horizontally (to increase the aggregate vCPUs, memory, and disk in the database cluster) by dynamically adding nodes to a running cluster, or by increasing the number of pods in the yb-tserver StatefulSet in the case of Kubernetes deployments.

A YugabyteDB cluster is scaled out so that it can handle:

  • More transactions per second
  • Higher number of concurrent client connections
  • Larger datasets

A YugabyteDB cluster can also be scaled in dynamically by draining all the data from existing cluster nodes (or pods), and subsequently removing them from the cluster.

How scalability works

Every table in YugabyteDB is transparently sharded using the primary key of the table, and each of these shards are called tablets. Each tablet consists of a set of rows in a table. In YugabyteDB, tables are automatically split into tablets. This is done when creating the table if possible. Tablets can also be split dynamically.

The following table summarizes the support for scalability and sharding across YSQL and YCQL APIs.

Property YSQL YCQL Comments
Scale transactions per sec Yes Yes Scale out the cluster to handle a higher number of concurrent transactions per second.
Data distribution support Hash sharding
Range sharding
Hash sharding Sharding is used to distribute data across nodes of clusters.
Tables can be pre-split at creation time, and dynamically split at runtime.