Skip to Content
InfraGCP cost cuts

GCP cost cuts (Oter + Negodex)

Runbook for waste cuts applied May 2026. Stay on GCP; no platform migration.
Billing narrative (baseline, savings, forecast): gcp-billing.md.

Baseline (Apr 7–30, ~23 days)

SKUCOP~USD/mo
Cloud SQL144,875~$46
Cloud Logging131,398~$42
Cloud Run32,044~$10
Total~$100

Applied (2026-05-25)

Logging (target ~$0/mo — stay under 50 GiB free tier)

App (Oter):

GCP (oter-490318 and negodex):

  • _Default bucket retention 1 day (was 30, then 7).
  • Sink exclusions on _Default:
    • health/readiness URLs
    • severity=DEBUG
    • severity=INFO or NOTICE (global)
    • resource.type="cloud_run_revision" AND severity<ERROR (only ERROR+ stored for Cloud Run)

Redeploy server after merging logback so the image matches. Temporary debug:
gcloud run services update oter --region=us-east1 --update-env-vars=LOG_LEVEL=INFO (raises volume/cost; revert to WARN after).

Negodex Nest still emits INFO to stdout unless you lower Nest log level in that repo; GCP exclusions above drop most of it before billing.

Oter API (~$2–4/mo)

  • Workflow + live service: --cpu=1 --memory=512Mi (was 2/1Gi). Keep --cpu-boost.

Negodex SQL consolidation (~$50–60/mo)

  • myecommercedb + user negodex_api on oter-db (oter-490318:us-east1:oter-db).
  • Data migrated from negodex-pg (PG16) → oter-db (PG18); Nest API started cleanly.
  • Secrets api-db-host, api-db-password updated in project negodex.
  • api Cloud Run: --set-cloudsql-instances=oter-490318:us-east1:oter-db.
  • api-runtime@negodex.iam.gserviceaccount.com: roles/cloudsql.client on oter-490318.
  • Deleted negodex-pg in project negodex.

Artifact Registry

Windmill

Deferred (48h after Negodex on shared SQL)

  • oter-db tier: still db-custom-1-3840. Do not downsize until Oter + Negodex are stable on one instance for 48h.
  • Legacy DB oter: still exists; drop only after confirming unused (backup first).
  • Backups on oter-db already: 7 retained, transaction logs 7 days.

Verify billing (7–30 days)

  1. Billing → Reports → SKU, last 30 days, compare to April baseline.
  2. Expect:
    • Cloud Logging down >90% (goal: within 50 GiB/mo free → ~$0).
    • Cloud SQL down ~50% (one instance instead of two).
    • Cloud Run modest drop from Oter resize.
  3. Smoke tests:
    • Oter: curl -fsS "$(gcloud run services describe oter --region=us-east1 --project=oter-490318 --format='value(status.url)')/health"
    • Negodex API: check Nest startup logs; no DB connection errors in project negodex.

Rollback (Negodex SQL)

If needed before negodex-pg was deleted: restore from gcloud sql backups list --instance=negodex-pg (instance gone). Use oter-db backup pre-negodex-consolidation-20260525 and re-point secrets to a new instance if you must recreate.