Skip to content

Scale Cloud Run min instances to 0 - #1

Merged
willtech3 merged 1 commit into
mainfrom
scale-to-zero
Aug 14, 2026
Merged

Scale Cloud Run min instances to 0#1
willtech3 merged 1 commit into
mainfrom
scale-to-zero

Conversation

@willtech3

Copy link
Copy Markdown
Owner

Why

mafia-staging is pinned at min 2 (1 vCPU / 512Mi, request-based billing). Those two warm instances were costing ~$20/month even with no traffic.

Change

  • Set google_cloud_run_v2_service.mafia min_instance_count from 2 to 0 so the service scales to zero when idle.
  • Record the reversal in DECISIONS.md (#22 superseded by #53).

Max instances stays at 10. Cold starts are acceptable off-demo; bump min back to 2 before a live drill or show.

Merging this applies via .github/workflows/deploy.yml (terraform apply on main).

Idle staging was billing two always-on instances. Scale to zero when unused; bump min back to 2 before a live drill.
@willtech3
willtech3 merged commit 63811a7 into main Aug 14, 2026
2 checks passed
@willtech3
willtech3 deleted the scale-to-zero branch August 14, 2026 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant