github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/website/content/docs/autoscaling/index.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: Autoscaling
     4  sidebar_title: Autoscaling
     5  description: |-
     6    Overview of the Nomad Autoscaler that provides horizontal application and
     7    cluster scaling.
     8  ---
     9  
    10  # Nomad Autoscaler Overview
    11  
    12  This section details the Nomad Autoscaler, a horizontal application and cluster
    13  autoscaler for Nomad. The Nomad Autoscaler is built and released separately to
    14  Nomad. The source code can be viewed on [GitHub][autoscaler_github] and releases
    15  are available on the [HashiCorp releases page][autoscaler_releases] or via
    16  [Docker Hub][autoscaler_dockerhub].
    17  
    18  The Nomad Autoscaler repository includes a number of [demos][autoscaler_demo]
    19  which provide guided learning on running the autoscaler.
    20  
    21  ## Horizontal Application Autoscaling
    22  
    23  Horizontal application autoscaling is the process of automatically controlling the
    24  number of instances of an application to have sufficient work throughput to meet
    25  service-level agreements (SLA). In Nomad, horizontal application autoscaling can
    26  be achieved by modifying the number of allocations in a task group based on the
    27  value of a relevant metric, such as CPU and memory utilization or number of open
    28  connections. This is enabled by configuring [autoscaling policies][autoscaling_policy]
    29  on individual Nomad jobs using the [`scaling` block][scaling_block].
    30  
    31  ## Horizontal Cluster Autoscaling
    32  
    33  Horizontal cluster autoscaling is the process of adding or removing Nomad clients
    34  from a cluster to ensure there is an appropriate amount of cluster resource for
    35  the scheduled applications. This is achieved by interacting with remote providers
    36  to start or terminate new Nomad clients based on metrics such as the remaining
    37  free schedulable CPU or memory. Cluster scaling is enabled by configuring the
    38  [autoscaler agent](/docs/autoscaling/agent#dir) with policies targeting the Nomad
    39  cluster.
    40  
    41  ## Dynamic Application Sizing
    42  
    43  <EnterpriseAlert>
    44  This functionality only exists in Nomad Autoscaler
    45  Enterprise. This is not present in the open source version of Nomad Autoscaler.
    46  </EnterpriseAlert>
    47  
    48  Dynamic Application Sizing enables organizations to optimize the resource
    49  consumption of applications using sizing recommendations from Nomad. It evaluates,
    50  processes and stores historical task resource usage data, making recommendations
    51  for CPU and Memory resource parameters. The recommendations can be calculated
    52  using a number of different algorithms to ensure the recommendation best fits
    53  the application profile.
    54  
    55  Dynamic Application Sizing can be enabled on an individual task by configuring
    56  [autoscaling policies][autoscaling_policy] within the task stanza using the job
    57  specification [`scaling` block][scaling_block].
    58  
    59  [scaling_block]: /docs/job-specification/scaling#scaling-stanza
    60  [autoscaling_policy]: /docs/autoscaling/policy
    61  [autoscaler_github]: https://github.com/hashicorp/nomad-autoscaler
    62  [autoscaler_releases]: https://releases.hashicorp.com/nomad-autoscaler/
    63  [autoscaler_dockerhub]: https://hub.docker.com/r/hashicorp/nomad-autoscaler
    64  [autoscaler_demo]: https://github.com/hashicorp/nomad-autoscaler-demos