Skip to content

Commit

Permalink
Add protos for AutoscalerSettings and request where we'll use it (#2841)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwaskom authored Feb 6, 2025
1 parent 5d5b343 commit b1118e5
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions modal_proto/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,22 @@ message Asgi {
}
}

message AutoscalerSettings {
// A collection of user-configurable settings for Function autoscaling
// These are used for static configuration and for dynamic autoscaler updates

// Minimum containers when scale-to-zero is not deisired; pka "keep_warm" or "warm_pool_size"
optional uint32 min_containers = 1;
// Limit on the number of containers that can be running for each Function; pka "concurrency_limit"
optional uint32 max_containers = 2;
// Additional container to spin up when Function is active
optional uint32 buffer_containers = 3;
// Currently unused; a placeholder in case we decide to expose scaleup control to users
optional uint32 scaleup_window = 4;
// Maximum amount of time a container can be idle before being scaled down, in seconds; pka "container_idle_timeout"
optional uint32 scaledown_window = 5;
}

message BaseImage {
string image_id = 1;
string docker_tag = 2;
Expand Down Expand Up @@ -1675,6 +1691,7 @@ message FunctionStats {
message FunctionUpdateSchedulingParamsRequest {
string function_id = 1;
uint32 warm_pool_size_override = 2;
AutoscalerSettings settings = 3;
}

message FunctionUpdateSchedulingParamsResponse {}
Expand Down

0 comments on commit b1118e5

Please sign in to comment.