> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rivestack.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Scaling

> Scale your PostgreSQL cluster by adding or removing nodes

## Overview

Rivestack HA clusters let you add or remove nodes (1 to 3 per cluster) through the dashboard, handled by our automated provisioning system. Added nodes are streaming-replication standbys that provide **high availability and automatic failover** — they are not read-serving replicas, so all client traffic (reads included) is routed to the primary. To increase query performance or fit a larger working set, choose a larger server type (see [Server types](#server-types) below).

<Info>On the **Solo** plan (a single dedicated node), failover isn't available. To add standby nodes and automatic failover, create an [HA cluster](/high-availability).</Info>

## Node limits

|           | Minimum | Maximum | Default |
| --------- | ------- | ------- | ------- |
| **Nodes** | 1       | 3       | 2       |

<Info>We recommend running at least 2 nodes for production workloads to maintain high availability during failures.</Info>

## Add a node

1. Navigate to your cluster's detail page in the dashboard.
2. Open the **Management** tab.
3. Click **Add Node**.
4. Review the cost impact (adds one node at your current plan's per-node price).
5. Confirm the operation.

### What happens

* A new server is provisioned in the same region as your cluster.
* PostgreSQL is installed and configured to match your cluster settings.
* The new node joins the cluster as a **replica** and begins streaming replication from the primary.
* Prometheus exporters are configured for monitoring.
* The operation typically takes 7-10 minutes.
* You can track progress in real time via the dashboard.

## Remove a node

1. Navigate to your cluster's detail page.
2. Open the **Management** tab.
3. Click **Remove Node**.
4. Select the node to remove from the list.
5. Type the node name to confirm.
6. Confirm the operation.

### What happens

* The selected node is removed from the cluster.
* If the removed node was a replica, no failover occurs.
* If the removed node was the primary, Patroni automatically promotes a replica to primary before removal.
* The server is decommissioned.
* Your subscription is updated to reflect the new node count.

<Warning>You cannot remove a node if it would bring your cluster below 1 node. You also cannot remove nodes while another scaling or configuration operation is in progress.</Warning>

## Scaling constraints

* **One operation at a time**: You cannot add or remove nodes while another job (backup, restore, scaling, or configuration) is in progress.
* **Cluster must be active**: Scaling is only available for clusters in an `active` state.
* **No vertical scaling yet**: To change server type (e.g., Starter to Growth), create a new cluster and migrate your data. Vertical scaling is on our roadmap.

## Billing impact

Node changes take effect immediately on your subscription:

* **Adding a node** increases your monthly cost by one unit of your plan price (e.g., +\$39/mo for Growth).
* **Removing a node** decreases your monthly cost accordingly.
* Billing is prorated within the current billing cycle.

## Server types

If you need more resources, choose a larger server type when creating a new cluster:

| Type    | vCPUs | RAM   | Available Storage | Price/node |
| ------- | ----- | ----- | ----------------- | ---------- |
| Starter | 2     | 4 GB  | 55 GB             | \$35/mo    |
| Growth  | 4     | 8 GB  | 135 GB            | \$59/mo    |
| Scale   | 8     | 16 GB | 295 GB            | \$99/mo    |

Storage listed is fully available for your PostgreSQL database. An additional 20 GB is reserved for the OS on each node.
