Auto Scaling
Auto Scaling adjusts a cluster's on-demand compute capacity as its workload changes. Use it for workloads with unpredictable demand when you want VeloDB Cloud to manage capacity within limits that you set.
The cluster's cache capacity changes with its compute capacity.
Warning:
- Scaling can temporarily interrupt connections and delay requests.
- Scaling in compute can reduce cache capacity, but not below the minimum for the target compute size. If cache capacity decreases, cached data beyond the new capacity is removed, which can affect request response times.
- The cluster can scale out to Maximum vCPU, increasing on-demand charges.
Before you begin
- You need permission to manage compute resources in the warehouse.
- The cluster must be Running, and the warehouse must not be in the Creating state.
- If Scaling is unavailable, point to it to view the reason.
- Disable the time-based scaling policy before you enable AutoScaling.
Enabling AutoScaling makes manual and time-based scaling configurations unavailable.
Configure Auto Scaling
Choose Minimum vCPU to support the cluster's baseline workload. Choose Maximum vCPU based on expected peak demand and your budget.
- Log in to the VeloDB Cloud console.
- In the upper-left corner, select the warehouse that contains the cluster.
- In the left navigation pane, under Compute, click Clusters.
- Click Physical Clusters.
- Click Card, then select the running cluster to display its details panel.
- Click Scaling.
- If a resource menu opens, select On-Demand (Hourly).
- In Elastic Scaling, turn on AutoScaling.
- Under vCPU Range, set Minimum vCPU and Maximum vCPU.
- Review the displayed Cache range.
- Click Confirm.
To verify the configuration, reopen the cluster details panel and confirm that Scaling Mode is Auto Scaling. Open Scaling again to check the configured vCPU range.
Change the vCPU range
- Open Elastic Scaling for the cluster.
- Change Minimum vCPU or Maximum vCPU.
- Review the displayed Cache range.
- Click Confirm.
Disable Auto Scaling
- Open Elastic Scaling for the cluster.
- Turn off AutoScaling.
VeloDB Cloud stops automatic scaling and retains the cluster's current resource configuration. To verify the change, confirm that Scaling Mode in the details panel is Manual Scaling. You can then configure manual scaling or time-based scaling.
Monitor the cluster
Use Resource Overview in the cluster details panel to review CPU utilization, memory utilization, disk cache utilization, and disk cache hit rate. Click a metric to view a longer time range.
You can also open the cluster on the Metrics page:
- In the upper-right corner, click ....
- Click View metrics.
If the cluster frequently reaches Maximum vCPU, consider increasing the maximum if the additional cost is acceptable. If the cluster's normal workload needs more capacity, increase Minimum vCPU.
How Auto Scaling works
VeloDB Cloud regularly evaluates CPU and memory utilization to determine whether to scale the cluster. It calculates a target capacity and selects a supported compute tier. Cache capacity changes proportionally when the compute tier changes.
Evaluation windows
VeloDB Cloud evaluates two time windows to balance fast response with stability:
- Short window (3 hours): Detects sudden changes in demand and allows the cluster to scale in when demand decreases.
- Long window (30 hours): Accounts for daily peaks so the cluster can scale out to a suitable tier without moving through multiple smaller tiers.
Each window recommends scaling out, scaling in, or keeping the current size. VeloDB Cloud combines the recommendations into one scaling decision.
Utilization watermarks
Utilization that exceeds the high watermark produces a scale-out recommendation. Utilization that falls below the low watermark produces a scale-in recommendation. Utilization between the watermarks produces a recommendation to keep the current size.
CPU and memory use these default watermarks and utilization targets:
| Resource | Low watermark | High watermark | Target utilization |
|---|---|---|---|
| CPU | 37.5% | 75% | Approximately 53% |
| Memory | 40% | 80% | Approximately 57% |
VeloDB Cloud evaluates CPU and memory independently and selects the larger target capacity. This prevents low CPU utilization from triggering scale-in when the workload still needs memory. High CPU utilization can trigger scale-out even when memory utilization remains stable.
Supported compute tiers
Clusters scale to predefined vCPU capacities:
4, 8, 16, 32, 48, 64, 80, 96, 128, 160, 192, ...
For capacities greater than 80 vCPUs, tiers increase in increments of 32 vCPUs. VeloDB Cloud rounds the calculated target capacity to the nearest supported tier. If the target is exactly halfway between two tiers, it selects the larger tier. Minimum vCPU and Maximum vCPU must also match supported tiers.
For example, a cluster with 16 vCPUs has a peak CPU usage of 14 vCPUs during the short window. Its utilization is 87.5%, which exceeds the 75% high watermark. The recommended capacity is approximately 27 vCPUs, so VeloDB Cloud selects the nearest supported tier: 32 vCPUs.
If the same cluster has a peak CPU usage of 5 vCPUs during the short window, its utilization is approximately 31%, which falls below the 37.5% low watermark. The recommended capacity is approximately 10 vCPUs, so VeloDB Cloud selects the nearest supported tier: 8 vCPUs.
Stability safeguards
Auto Scaling uses two safeguards to limit repeated scaling as demand fluctuates:
- Cooldown period: After a successful scaling event, VeloDB Cloud waits 15 minutes before making another change. Newly created or restarted clusters also have a 15-minute warm-up window before Auto Scaling can adjust their capacity.
- Window conflict resolution: When the short and long windows recommend different directions, VeloDB Cloud prioritizes the long window when the short-window trend is rising. When the short-window trend is flat or falling, it prioritizes the short window.
Monitor and tune Auto Scaling
Activity Logs record each Auto Scaling event, including its timestamp, scaling direction, and cluster size before and after scaling. After changing the vCPU range, review these logs to check whether scaling frequency and capacity meet your workload needs.
If the cluster repeatedly reaches Maximum vCPU, increase the limit or use manual scaling before a known short-term peak. If capacity stays at Minimum vCPU during recurring quiet periods, consider reducing the minimum.
Best practices
- Set Minimum vCPU to support baseline demand. A value that is too low can require several scaling events during a sudden spike. A value that is too high reduces savings during quiet periods.
- Set Maximum vCPU to allow for demand spikes. Set it to about 1.5-2 times expected peak demand when the additional cost is acceptable.
- Before an important launch, campaign, or migration, increase Minimum vCPU and restore the original value after the event.
- Review Activity Logs regularly to adjust the vCPU range based on scaling history.
- The default capacity limit is 1,024 vCPUs per cluster. Contact VeloDB Cloud support to request a higher quota.