Skip to content

Commit d646c00

Browse files
authored
Set limits on GAE resources (#50)
* Set limits on GAE resources * Set min instances since the default is 2
1 parent 83aaa64 commit d646c00

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

tf/gae-standard/gae-standard.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ resource "google_app_engine_standard_app_version" "test_service" {
3737
shell = var.entrypoint
3838
}
3939

40+
// Limit resources and QPS
41+
automatic_scaling {
42+
max_concurrent_requests = 5
43+
standard_scheduler_settings {
44+
max_instances = 1
45+
}
46+
}
47+
4048
env_variables = {
4149
"PUSH_PORT" = "8080",
4250
"REQUEST_SUBSCRIPTION_NAME" = module.pubsub.info.request_topic.subscription_name,

tf/gae/gae.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,14 @@ resource "google_app_engine_flexible_app_version" "test_service" {
3737
path = "/ready"
3838
}
3939

40+
// Limit resources and QPS
4041
automatic_scaling {
41-
cool_down_period = "120s"
42+
max_concurrent_requests = 5
4243
cpu_utilization {
4344
target_utilization = 0.9
4445
}
4546
max_total_instances = 1
46-
min_total_instances = 1
47+
min_total_instances = 0
4748
}
4849

4950
env_variables = {

0 commit comments

Comments
 (0)