How does one add a node or nodes to an existing YugaByte DB CE cluster?
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
YugaByte DB is a high-performance, open-source distributed SQL database designed to support both scale-out and geographically distributed architectures. A common task when working with distributed databases like YugaByte DB is expanding the cluster size to increase capacity or improve fault tolerance. This can be achieved by adding one or more nodes to the existing cluster. Below, the process specific to YugaByte DB Community Edition (CE) is elaborated, including preparation, actual steps, verification, and considerations.
Preparation
Before adding a node to a YugaByte DB cluster, ensure that the new machine meets the same system requirements as the existing nodes (such as OS, memory, CPU). Also, make sure that the new node can communicate with all current nodes over the necessary ports. Typically, these include:
- 7100 (for YB-Master RPCs)
- 9100 (for YB-TServer RPCs)
- 9300 (for Redis APIs)
- 9042 (for CQL APIs)
- 5433 (for YSQL APIs)
Also, configure the new node by installing YugaByte DB and setting up the appropriate configurations needed by the cluster.
Adding a Node
Step-by-Step Guide
- Install YugaByte DB: If not already installed, download and install YugaByte on the new node using the same version as that of the existing cluster nodes. Detailed instructions for the installation are available on the official YugaByte documentation site.
- Start the YB-Master process: On the new node, start the master process. This can be done using the
yb-masterbinary with a command similar to:
Replace existing_node_1, existing_node_2 with the IP addresses or hostnames of current master nodes, and new_node with the IP address/hostname of the new master node.
- Start the YB-TServer process: After the master, initiate the TServer process on the new node:
It's crucial that the tserver_master_addrs argument includes all master nodes, not just the new one.
- Restart other nodes: Restart the master and tserver processes on each existing node to recognize the new configuration. Be sure to point their
--master_addressestowards the updated master list.
Verification
After setting up the nodes, verify the status:
- Use the
yb-adminCLI tool to check cluster configuration and confirm the addition of the new node. - Access the YugaByte DB Admin UI (typically accessible on port 7000 of any of the nodes) and verify that the new node appears with status
ALIVE.
Considerations
When expanding a YugaByte DB cluster, consider the following:
- Load Balancing: The load (both read and write) might rebalance across the cluster after adding a new node. Monitor the load and performance.
- Data Migration: Existing data will automatically start sharding across the additional node(s). This process takes time and might temporarily impact performance.
- Consistency and Replication: Ensure that the cluster’s replication factor stays aligned with requirements to maintain data consistency and durability.
Summary Table
| Aspect | Detail |
| Preparation | Check requirements, install YugaByte, configure |
| Steps to Add a Node | Install DB, start YB-Master and YB-TServer, restart nodes |
| Verification | Use yb-admin and Admin UI |
| Key Considerations | Load balancing, data migration, consistency |
By methodically following these steps and considerations, one can successfully scale out a YugaByte DB CE cluster by adding new nodes, thus enhancing its capacity and resilience.

