services.<name>.replicas
Number of copies. An integer fixes the count; an object enables autoscaling.
- Type: integer or object
- Since: manifest v1
Accepted forms
- integer
- object: the full form, with the fields below
Example
Section titled “Example”services: web: replicas: 2services: web: replicas: min: 2 max: 6 scale_on: cpu: 70%Fields
Section titled “Fields”services.<name>.replicas.min
Fewest replicas. 0 allows scaling to zero.
- Type: integer
- Default:
1 - Range: 0 to 20
- Since: manifest v1
services: web: replicas: min: 2services.<name>.replicas.max
Most replicas.
- Type: integer
- Range: 1 to 20
- Since: manifest v1
services: web: replicas: max: 6scale_on
Section titled “scale_on”services.<name>.replicas.scale_on
Targets for horizontal autoscaling between min and max.
- Type: object
- Since: manifest v1
services: web: replicas: scale_on: cpu: 70% concurrency: 80services.<name>.replicas.scale_on.cpu
Average CPU use, as a percentage of the limit.
- Type: percent
- Since: manifest v1
services: web: replicas: scale_on: cpu: 70%memory
Section titled “memory”services.<name>.replicas.scale_on.memory
Average memory use, as a percentage of the limit.
- Type: percent
- Since: manifest v1
services: web: replicas: scale_on: memory: 80%concurrency
Section titled “concurrency”services.<name>.replicas.scale_on.concurrency
In-flight requests per replica, measured at the edge.
- Type: integer
- Range: 1 to …
- Since: manifest v1
services: web: replicas: scale_on: concurrency: 80See also
Section titled “See also”- services: all fields of
services - guv.yaml reference