Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions specification/resources/apps/models/app_alert_spec_rule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@ enum:
- FUNCTIONS_AVERAGE_WAIT_TIME_MS
- FUNCTIONS_ERROR_COUNT
- FUNCTIONS_GB_RATE_PER_SECOND
- REQUESTS_PER_SECOND
- REQUEST_DURATION_P95_MS
type: string
example: CPU_UTILIZATION
35 changes: 35 additions & 0 deletions specification/resources/apps/models/app_autoscaling_spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# CPU-only autoscaling for worker components. Services use app_autoscaling_spec_service.yml.
description: Configuration for automatically scaling this component based on metrics.
type: object
properties:
min_instance_count:
description: The minimum amount of instances for this component.
type: integer
format: uint32
minimum: 1
example: 2
max_instance_count:
description: >-
The maximum amount of instances for this component. Maximum 250.
Consider using a larger instance size if your application requires more than 250 instances.
type: integer
format: uint32
minimum: 1
maximum: 250
example: 3
metrics:
description: The metrics that the component is scaled on.
type: object
properties:
cpu:
description: Settings for scaling the component based on CPU utilization.
type: object
properties:
percent:
description: The average target CPU utilization for the component.
type: integer
format: uint32
minimum: 1
maximum: 100
default: 80
example: 75
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Extends CPU autoscaling with request-based metrics. Only applicable to service components.
allOf:
- $ref: app_autoscaling_spec.yml
- type: object
properties:
metrics:
type: object
properties:
requests_per_second:
description: Settings for scaling the component based on requests per second.
type: object
properties:
per_instance:
description: The target number of requests per second per instance for the component.
type: integer
format: uint32
minimum: 1
example: 100
request_duration:
description: Settings for scaling the component based on request duration.
type: object
properties:
p95_milliseconds:
description: The p95 target request duration in milliseconds for the component.
type: integer
format: uint32
minimum: 1
example: 500
Original file line number Diff line number Diff line change
Expand Up @@ -50,36 +50,3 @@ properties:
example: basic-xxs
deprecated: true
example: apps-s-1vcpu-0.5gb

autoscaling:
description: Configuration for automatically scaling this component based on metrics.
type: object
properties:
min_instance_count:
description: The minimum amount of instances for this component. Must be less than max_instance_count.
type: integer
format: uint32
minimum: 1
example: 2
max_instance_count:
description: The maximum amount of instances for this component. Must be more than min_instance_count.
type: integer
format: uint32
minimum: 1
example: 3
metrics:
description: The metrics that the component is scaled on.
type: object
properties:
cpu:
description: Settings for scaling the component based on CPU utilization.
type: object
properties:
percent:
description: The average target CPU utilization for the component.
type: integer
format: uint32
minimum: 1
maximum: 100
default: 80
example: 75
3 changes: 3 additions & 0 deletions specification/resources/apps/models/app_service_spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ allOf:

- type: object
properties:
autoscaling:
$ref: app_autoscaling_spec_service.yml

cors:
allOf:
- $ref: apps_cors_policy.yml
Expand Down
3 changes: 3 additions & 0 deletions specification/resources/apps/models/app_worker_spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ allOf:
- $ref: app_component_instance_base.yml
- type: object
properties:
autoscaling:
$ref: app_autoscaling_spec.yml

termination:
$ref: app_worker_spec_termination.yml
liveness_health_check:
Expand Down
Loading