Skip to main content

Overview

Heat Orchestration provides native auto-scaling through three coordinated resource types: a , a scaling policy, and an alarm trigger. When a metric threshold is breached — such as CPU utilization exceeding 80% — the alarm fires a webhook that activates the scaling policy, which adds or removes instances from the group. Prometheus is the monitoring backend for alarm-driven scaling. It replaces legacy telemetry stacks (Ceilometer/Aodh) and provides a more reliable, standards-based metrics pipeline with support for multi-dimensional labels, alerting rules, and long-retention storage.
Prerequisites
  • Heat Orchestration enabled in your project
  • A compatible image and flavor for scaled instances
  • Prometheus deployed and scraping compute metrics
  • Basic familiarity with orchestration templates

Architecture

Scaling Components


Use Cases


Orchestration Templates

Static Cluster Template

Use this template when you need a fixed number of instances deployed as a named group. Each instance is declared as a discrete resource — suitable for small, stable clusters.
static-cluster.yaml

Auto-Scaling Template

This template creates a web tier that scales between 1 and 10 instances. The scaling policy signal URLs are exposed as stack outputs and can be wired into Prometheus Alertmanager webhook receivers.
autoscaling-stack.yaml

Adjustment Types


Prometheus Integration

Prometheus Alertmanager delivers scaling signals by sending an HTTP POST to the policy signal URL. Configure a webhook receiver in your Alertmanager configuration:
alertmanager.yml
A matching Prometheus alert rule that fires when average CPU exceeds 80% for 2 minutes:
alert-rules.yml
Use longer evaluation windows (5–10 minutes) for scale-in rules to avoid prematurely terminating instances during short idle periods. Scale-out rules can use shorter windows (1–2 minutes) to respond faster to load spikes.

Deploy and Trigger Scaling

Deploy the auto-scaling stack

Navigate to Orchestration > Stacks and click Create Stack.In the Prepare Template step, upload autoscaling-stack.yaml. In the Orchestration Information step, fill in the parameters:Click Confirm.
Stack reaches Create Complete. The scaling group shows the initial instance count.

Retrieve webhook URLs

Open the stack detail page and select the Detail tab (Outputs card). Copy the values for scale_out_url and scale_in_url — these are used as Alertmanager webhook receiver URLs.

Manually trigger scale-out

To test scaling without waiting for an alert, send an HTTP POST to the signal URL:
Trigger scale-out via webhook
The scaling group adds one instance. Check the Stack Resources tab to confirm the new member.

Monitor the group

Return to Orchestration > Stacks and open the stack. The Stack Resources tab shows the current group resources. The Stack Events tab shows scaling events in real time as Prometheus alerts fire and Alertmanager posts to the signal URLs.

Cooldown Periods

Cooldown prevents rapid successive scaling events from destabilizing your workload. The cooldown value is specified in seconds per scaling policy.
Setting cooldown too low on scale-in can cause thrashing — where instances are terminated before the remaining group has stabilized under the new load distribution. Use a scale-in cooldown at least twice the scale-out cooldown.

Troubleshooting

Cause: Insufficient quota, unavailable flavor, or invalid image name.Resolution:
Check stack events for the error message
Review the resource_status_reason field. Common causes:
  • Compute quota exceeded — check with openstack quota show
  • Image not found — verify with openstack image list
  • Flavor not available in the target availability zone
Cause: The signal URL contains a temporary token that has expired, or the URL was copied incorrectly.Resolution: Retrieve a fresh signal URL from the stack output:
Refresh signal URL
Signal URLs are valid as long as the stack exists. Update your Alertmanager config with the current URL after any stack update.
Cause: Alertmanager is not reaching the signal URL, or the Prometheus alert is not firing.Resolution:
  1. Verify Alertmanager is running: curl http://<alertmanager-host>:9093/-/healthy
  2. Check alert state in Prometheus UI under Alerts
  3. Confirm the webhook receiver URL in Alertmanager config matches the stack output
  4. Test manually: curl -X POST "<scale_out_url>" — if this works, the stack is healthy
Cause: Compute capacity exhausted on available hosts, or image boot failure.Resolution:
List instances in the scaling group
Identify failed instances and check their events:
Check instance events

Next Steps

Template Guide

Learn intrinsic functions and conditions used in scaling templates

Manage Stacks

Update, suspend, and manage the auto-scaling stack lifecycle

Polystack Load Balancer

Front auto-scaling groups with a load balancer for traffic distribution