VM Scaling
NetActuate supports two approaches to scaling your virtual machine infrastructure: vertical scaling (resizing a single VM) and horizontal autoscaling (adding or removing VMs automatically).
Vertical Scaling
Vertical scaling lets you increase or decrease the CPU and memory of an existing VM — with little to no downtime and no need to redeploy or migrate the instance.
How It Works
When a VM is created, it is configured with a maximum number of CPUs and memory it can scale to. You submit scaling requests through the API (portal UI support is planned).
- CPU cores can be hot-added or removed without a reboot
- RAM can be added live, but removing RAM may require a reboot
Every scaling event is recorded for billing purposes and reflected in your hourly usage.
Scaling Capabilities
| Resource | Scale Up | Scale Down | Live (No Reboot) |
|---|---|---|---|
| CPU | Yes (up to 64 cores or host max) | Yes (to base plan) | Hot-add/remove supported |
| RAM | Yes (up to 512 GB or host max) | Yes (to base plan, may require reboot) | Hot-add supported only |
API Endpoints
Get available scaling options:
GET /cloud/scaling/{mbpkgid}
Optional query parameters: min_ram, max_ram, min_cpus, max_cpus.
Response:
{
"options": [
{
"pkg_id": 1234,
"pkg_name": "VR32x32x100",
"ram": 8192,
"cpus": 4,
"must_reboot": false
}
]
}
Scale a VM:
POST /cloud/scale/{mbpkgid}
| Parameter | Type | Required | Description |
|---|---|---|---|
pkg_id | integer | Yes (if pkg_name not provided) | ID of the desired scaling package |
pkg_name | string | Yes (if pkg_id not provided) | Name of the desired scaling package |
allow_reboot | boolean | Optional (default: false) | If true, VM can be rebooted to apply changes |
Note: To discover available scaling options (including package IDs and whether a reboot is required), first call
GET /cloud/scaling/{mbpkgid}.
Technical Details
-
Memory is added using DIMM devices. Due to hugepages and guest OS limitations, memory cannot always be removed live.
-
vCPU hotplug is supported via
setvcpus. Guest OS must be configured to bring new CPUs online automatically. Example udev rule:ACTION=="add", SUBSYSTEM=="cpu", ATTR{online}=="0", ATTR{online}="1" -
If memory removal fails live and rebooting is allowed, the system will automatically shut down and restart the VM with reduced memory.
Horizontal Autoscaling
Horizontal autoscaling automatically provisions or terminates VM instances based on CPU and network traffic thresholds. When combined with BGP and ECMP, new nodes are provisioned with upstream BGP sessions and immediately begin serving traffic.
How It Works
You define the base configuration for your autoscaling group — the OS image, plan, and scaling parameters. Scaling actions are triggered under two conditions:
- Threshold-based scaling — CPU utilization or packets-per-second (PPS) exceeds or drops below your defined thresholds
- Size-limit based scaling —
min_instancesormax_instancesvalues are changed manually or programmatically
Upscaling
When usage exceeds your thresholds and the current node count is below max_instances:
- A new VM is created using your specified OS image
- Your SSH key is installed on the default user account
- A cloud-init script (if provided) is passed to the instance for bootstrapping
- If a
bgp_group_idis specified, an upstream BGP session is created in the group and automatically advertised
Downscaling
When usage drops below your thresholds and the group size is above min_instances:
- The most recently created nodes are terminated first
- Downscaling will never reduce the group below
min_instances
Note: Scaling events can also occur outside threshold evaluations. If
max_instancesis lowered, excess nodes are terminated. Ifmin_instancesis increased, additional instances are created to meet the new minimum.
Geographic Scaling
Autoscaling supports Anycast-based services across multiple locations. Each location is evaluated independently — a CPU spike in Europe only scales nodes in that region, not globally. This ensures your deployment scales proportionally to actual demand in each location.
Scaling Parameters
| Parameter | Value | Description |
|---|---|---|
cpu_threshold | 0.0–1.0 | Average vCPU utilization across all provisioned vCPUs |
pps_threshold | Integer | Average ingress packets per second across all instances |
target_ratio | 0.0–1.0 | Continue adding instances until usage is below target_ratio * threshold |
downscale_ratio | 0.0–1.0 | Only terminate nodes if remaining usage stays above downscale_ratio * target_ratio * threshold |
cooldown_hours | Integer | After upscaling, prevent downscaling for this many hours |
upscale_hours | Integer | Lookback window (hours) for CPU/PPS evaluation during upscaling |
upscale_percentile | Integer | Percentile of samples evaluated during the upscale window |
downscale_hours | Integer | Lookback window (hours) for CPU/PPS evaluation during downscaling |
downscale_percentile | Integer | Percentile of samples evaluated during the downscale window |
package_id | Plan ID | Compute plan for new instances |
min_instances | Integer | Minimum nodes to maintain |
max_instances | Integer | Maximum nodes allowed |
Instance Configuration
| Parameter | Value | Description |
|---|---|---|
contract_id | Contract ID | Billing contract for new instances |
os_id | Cloud Image ID | OS image for new VMs |
ssh_key_id | SSH Key ID | SSH key installed on new instances |
cloud_init | String | Cloud-init script for bootstrapping (supports dynamic templating) |
bgp_group_id | BGP Group ID | BGP group for automatic upstream session creation |
Related Sections
- Virtual Machines — deploy and manage VMs
- ECMP Load Balancing — distribute traffic across multiple servers
- Anycast — global anycast routing for scaled deployments
Need Help?
Contact support@netactuate.com or open a support ticket from the portal.