From 05d207b03a70c9b1af66c59f484647fa6e557461 Mon Sep 17 00:00:00 2001 From: Bharat Kathi Date: Thu, 25 Jun 2026 23:51:28 -0700 Subject: [PATCH] chore(prod): downsize gr-postgres + gr-mqtt for off-season --- infra/environments/prod/main.tf | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/infra/environments/prod/main.tf b/infra/environments/prod/main.tf index 0634c84..23b3763 100644 --- a/infra/environments/prod/main.tf +++ b/infra/environments/prod/main.tf @@ -71,8 +71,9 @@ module "origin_cert" { # Postgres on EC2. Lives in the EKS VPC so pods reach it via private IP; # SG-locked to traffic originating from the EKS node SG so nothing outside -# the cluster can connect. ARM/Graviton t4g.large (8 GiB) — bumped from -# t4g.medium after the OOM under NUM_WORKERS=4 ingest pressure. +# the cluster can connect. Off-season — running on t4g.small to keep +# cost down; bump back to t4g.large before resuming NUM_WORKERS=4 ingest +# (the larger size was originally set after an OOM at that workload). # # Generated password is in TF state — read with: # terraform output -raw postgres_password @@ -88,7 +89,7 @@ module "postgres" { subnet_id = module.vpc.public_subnet_ids[0] availability_zone = "us-west-2a" - instance_type = "t4g.large" + instance_type = "t4g.small" data_volume_size_gb = 50 # Public IP + open to the internet on 5432. The 32-char random password @@ -137,6 +138,10 @@ module "mqtt" { subnet_id = module.vpc.public_subnet_ids[0] availability_zone = "us-west-2a" + # Off-season override — NanoMQ runs fine on t4g.nano at idle/low publish + # rates. Drop the override (module default t4g.small) before in-season. + instance_type = "t4g.nano" + associate_public_ip = true admin_cidr_blocks = ["0.0.0.0/0"]