Handle varying workloads by running multiple replicas of your Servers and Background Workers. For installations that receive traffic, Ryvn automatically distributes it evenly across your running replicas.
Installations with persistent storage cannot scale to multiple replicas.

Scaling Methods

Ryvn supports two primary methods for scaling your applications:

Manual Scaling

Run a fixed number of replicas that you specify.

Autoscaling

Automatically adjusts replica count based on CPU and memory utilization targets.

Manual Scaling

Manual scaling gives you direct control over your application’s capacity by running a fixed number of replicas. Each replica runs an identical copy of your application, and Ryvn’s load balancer automatically distributes incoming requests across all available replicas. To configure manual scaling:
1

Navigate to Environments

Go to the Environments tab in the Ryvn Dashboard
2

Select Environment

Choose the environment containing your installation
3

Select Installation

Click on the installation you want to configure
4

Configure Scaling

  1. In the Scaling section, select Manual Scaling 2. Enter the desired number of replicas (up to 100) 3. Click Save to apply the changes
When you update the number of replicas, Ryvn immediately begins provisioning or deprovisioning replicas to match your desired count. You can scale your installation up to a maximum of 100 replicas.

Autoscaling

Autoscaling provides dynamic resource management by automatically adjusting the number of running replicas based on your application’s actual resource usage. This helps you maintain optimal performance during high-traffic periods while minimizing costs during quieter times.

Configuration

To configure autoscaling:
1

Navigate to Environments

Go to the Environments tab in the Ryvn Dashboard
2

Select Environment

Choose the environment containing your installation
3

Select Installation

Click on the installation you want to configure
4

Enable Autoscaling

  1. In the Scaling section, select Autoscaling 2. Toggle the Enable Autoscaling switch 3. Set the minimum number of replicas 4. Set the maximum number of replicas 5. Configure the target CPU utilization percentage (recommended: 70-80%) 6. Configure the target Memory utilization percentage (recommended: 80-85%) 7. Click Save to apply the changes

How Autoscaling Works

Ryvn continuously monitors the resource utilization across all replicas of your server. When utilization exceeds your specified targets, the following process occurs:
1

Calculate Current Utilization

Ryvn measures the average CPU and memory usage across all running replicas.
2

Determine Scaling Need

Using the formula: new_replicas = ceil(current_replicas * (current_util / target_util)), Ryvn calculates if scaling is needed.
3

Scale Up

If more replicas are needed, Ryvn immediately provisions new replicas to handle the increased load.
4

Scale Down

If fewer replicas are needed, Ryvn waits for a cool-down period before removing replicas to prevent rapid fluctuations.
If you set both CPU and memory targets, Ryvn will scale based on whichever metric requires more replicas to meet its target.

Best Practices

When implementing scaling for your applications, consider the following recommendations:

Monitoring and Debugging

You can monitor your server’s scaling behavior through the Ryvn Dashboard, which provides real-time visibility into:
  • Current replica count and status
  • Scaling events history
  • CPU and memory utilization metrics
For advanced scaling scenarios or help with debugging scaling issues, please reach out to our support team.