Scaling Operations Runbook
HeliosDB Scaling Operations Runbook
Use this runbook when capacity pressure, growth planning, or cost optimization requires changing cluster resources.
Manual Scaling Procedures
Vertical Scaling
Use vertical scaling when a node is CPU, memory, or I/O constrained and the workload cannot be redistributed quickly.
- Confirm the bottleneck with metrics.
- Drain one node from traffic.
- Stop the node cleanly.
- Resize the instance, container limits, or storage.
- Start the node and validate health.
- Return it to service and repeat gradually.
Horizontal Scaling
Use horizontal scaling when adding read capacity, shard capacity, or regional redundancy.
- Provision the new node with matching configuration.
- Join it to the cluster.
- Wait for bootstrap, sync, or shard assignment.
- Validate health and replication state.
- Add the node to serving traffic.
Auto-Scaling Configuration
Auto-scaling policies should use stable signals:
- CPU utilization sustained above threshold.
- Memory pressure sustained above threshold.
- Queue depth or connection saturation.
- Query latency above service objective.
- Storage utilization and growth rate.
Avoid scaling on short spikes. Use cooldown periods and minimum healthy replica counts.
Resource Monitoring
Check current pressure:
curl -s http://heliosdb-node:7000/metrics | grep -E "(cpu|memory|disk|connection)"psql -h heliosdb-lb -U admin -c "SELECT datname, numbackends, blks_read, blks_hit FROM pg_stat_database;"Capacity Planning
Plan capacity from:
- Peak query concurrency.
- Write throughput and WAL growth.
- Data retention and index growth.
- Backup and restore windows.
- Regional failover requirements.
Keep enough headroom for one node or one region to fail without breaching service objectives.
Cost Optimization
Reduce cost only after confirming sustained overprovisioning:
- Identify nodes with low utilization over a representative period.
- Confirm no failover or maintenance workload depends on that headroom.
- Scale down gradually.
- Monitor latency, error rate, and replication lag after each change.