When the Nomad Autoscaler agent starts it loads all the policies defined in
the sources configured and monitors them for changes. Each
policy is assigned a handler that periodically sends the policy to a broker
where it is evaluated by a worker. The frequency the policy is enqueued is set
The worker executes a series of steps by calling the different plugins used in the policy to determine if a scaling action is needed and then to apply the necessary actions. The worker then loops back to evaluate the next policy.
If a scaling action is performed and the policy defines a
cooldown value the policy handler waits the specified
value before enqueuing it again.
If the policy target are Nomad clients the target plugin will usually execute more steps, such as selecting nodes to be removed and draining them.