open-nomad/website/pages/docs/job-specification/scaling.mdx
Charlie Voiselle 9d85195361
[docs] Update redirects and links for learn.hashicorp.com (#8598)
* Fix links to ACL guides
* Managing Nomad guide links; links in jsx pages
* job updates guide URLS
* node-drain guide URLS
* outage recovery guide links
* fix guide links - sentinel
* fix guide links - namespaces
* fix guide links - quotas
* fix guide links - autopilot
* more guide links.
* more guide links - continued.
* Updating redirects for learn
* Getting Started
* Load Balancing Guides
* update redirects for ui guide
* Consolidate spark redirects to point to GH repo
* operating job update part 1
* finish operating job links; operations guides links.
* finish guide redirects
* coalesce EOL redirects for spark guides.
* one last link
* Checked links and found a few more stray links
* Found more .htmls
* Fixup links for new HC websites
* Post-merge fixups
* linkcheck caught missing ids
2020-09-29 12:48:32 -04:00

56 lines
1.8 KiB
Plaintext

---
layout: docs
page_title: scaling Stanza - Job Specification
sidebar_title: scaling <sup>Beta</sup>
description: The "scaling" stanza allows specifying scaling policy for a task group
---
# `scaling` Stanza
<Placement groups={['job', 'group']} />
The `scaling` stanza allows configuring scaling options for a task group, for the purpose
of supporting external autoscalers like the [Nomad Autoscaler](https://github.com/hashicorp/nomad-autoscaler)
and scaling via the Nomad UI. This stanza is not supported within jobs of type `system`.
```hcl
job "example" {
datacenters = ["dc1"]
group "cache" {
task "redis" {
driver = "docker"
config {
image = "redis:3.2"
}
}
scaling {
enabled = true
min = 0
max = 10
policy {
}
}
}
}
```
## `scaling` Parameters
- `min` - <code>(int: nil)</code> - The minimum acceptable count for the task group.
This should be honored by the external autoscaler. It will also be honored by Nomad
during job updates and scaling operations. Defaults to the specified task group [count][].
- `max` - <code>(int: &lt;required&gt;)</code> - The maximum acceptable count for the task group.
This should be honored by the external autoscaler. It will also be honored by Nomad
during job updates and scaling operations.
- `enabled` - <code>(bool: false)</code> - Whether the scaling policy is enabled.
This is intended to allow temporarily disabling an autoscaling policy, and should be
honored by the external autoscaler.
- `policy` - <code>(map<string|...>: nil)</code> - The autoscaling policy. This is
opaque to Nomad, consumed and parsed only by the external autoscaler. Therefore,
its contents are specific to the autoscaler; see autoscaler documentation.
[count]: /docs/job-specification/group#count 'Nomad Task Group specification'