Skip to content

Configs

Scale configuration is made by creating a config.yml or whatever file SCALR_CONFIG points to.

Hint

The config will be re-read before every run, no need to restart a running Scalr service after a config change.

Common Config Skeleton

Hint

You find a sample config.yml in our GitHub Repo

---
# Name is used to group instances e.g. with a tag or label depending on the cloud provider
# NOTE: If you change the name, all current instances having the name are getting unmanaged.
name: my-app

# Change it to false to completely skip all action
enabled: true

# Change it to false to skip the scaling
dry_run: false

# Not scaling down below this value
min: 2

# Not scaling up above this value
max: 5

# The max value of instances to be scaled down in one run
# Set to 0 to never scale down
max_step_down: 1

# Which instance to destroy first when scaling down:
# oldest, youngest or random
scale_down_selection: oldest

# After scaling down, wait for so long in seconds
cooldown_timeout: 60

# See Policy configs
policies: []

# See cloud config
cloud:
  kind: ...
  launch_config: {}

Validation

The config is validated before every run and scaling is aborted if it does not hold up:

  • min must not be negative and must not be greater than max.
  • scale_down_selection must be one of oldest, youngest or random.
  • Unknown keys are rejected. A misplaced or misspelled key used to be ignored silently, which could disable a policy without any hint in the logs.