From 98c41bf4c62efa03a42f0abdba2a2221722c1dc4 Mon Sep 17 00:00:00 2001 From: Nathan Kim Date: Thu, 18 Jan 2024 14:18:01 -0500 Subject: [PATCH] Make scale down smaller and slower --- deploy/saturn/main.tf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/deploy/saturn/main.tf b/deploy/saturn/main.tf index f999527c4..05b88b4ed 100644 --- a/deploy/saturn/main.tf +++ b/deploy/saturn/main.tf @@ -161,6 +161,12 @@ resource "google_compute_autoscaler" "this" { max_replicas = var.max_instances min_replicas = var.min_instances cooldown_period = 60 + scale_down_control { + max_scaled_down_replicas { + fixed = 1 + } + time_window_sec = 600 + } metric { name = "pubsub.googleapis.com/subscription/num_undelivered_messages"