Development

๐Ÿ’ธ How We Helped a SaaS Company Cut Google Cloud Costs by 40% Without Downtime

Complete case study on Google Cloud cost optimization with real results and zero downtime

google-cloudcost-optimizationfirestorebigquerycloud-runbillingfinopscost-reductionperformancemonitoring
Dezoko Team
โ€ข
February 6, 2025
โ€ข
5 min read

Table of Contents

๐Ÿ’ธ How We Helped a SaaS Company Cut Google Cloud Costs by 40% Without Downtime

๐Ÿ’ธ How We Helped a SaaS Company Cut Google Cloud Costs by 40% Without Downtime


Cloud costs can silently kill growing companies.


One of our enterprise clients -- a global B2B SaaS platform -- came to us with a simple problem:


> "Our Google Cloud bill is out of control. Can you help?"


The result?


  • โœ…We reduced their GCP billing by 40% in just 6 weeks
  • โœ…With zero downtime
  • โœ…No team disruption
  • โœ…While improving performance and observability

Here's exactly what we did -- and how we can help other companies do the same.


๐Ÿ” The Problem: High Costs, No Visibility


Before we stepped in:


  • Their Firestore reads exceeded 30M/day
  • Cloud Run instances were scaling inefficiently
  • BigQuery jobs were unpartitioned and expensive
  • Logs were stored indefinitely
  • No clear breakdown of per-feature or per-customer cost

Most teams focus on building -- not optimizing.

That's where we come in.


โš™๏ธ Our 6-Step Optimization Process


๐Ÿ”น 1. Full GCP Billing Audit


We reviewed:


  • Project-level costs
  • Service usage breakdown
  • Logs ingestion/storage
  • Idle services
  • VPC egress and ingress patterns
  • Container scaling behavior

๐Ÿง  Tools used: Billing export to BigQuery + Data Studio dashboards


๐Ÿ”น 2. Firestore Cost Optimization


Before
After
๐Ÿ”ด Redundant reads per user session
โœ… Batched + cached queries
๐Ÿ”ด Multiple `onSnapshot` listeners
โœ… Moved to `get()` where possible
๐Ÿ”ด No TTL for old documents
โœ… Scheduled purges via Cloud Tasks

๐Ÿ”ฅ Firestore bill dropped by 60% alone.


๐Ÿ”น 3. BigQuery Cost Control


  • Partitioned tables by date
  • Clustered large tables on customer ID
  • Scheduled query re-use instead of repeated raw queries
  • Auto-cancel long-running queries over 10s
  • Added UDFs for business logic reuse

๐Ÿ“‰ BigQuery costs dropped by 45%

๐Ÿ“Š Dashboards refreshed faster


๐Ÿ”น 4. Cloud Run & Cloud Functions Tuning


  • Set concurrency to 40+ where safe
  • Tuned CPU idle allocation to 0.25vCPU where possible
  • Switched to reserved min instances for consistent workloads
  • Auto-scaled background jobs based on custom metrics

โฑ๏ธ Latency improved, cost reduced


๐Ÿ”น 5. Log Retention & Observability


  • Moved from "store everything forever" to:

  • 30-day default
  • 1-year for audit logs only
  • Exported essential logs to BigQuery for long-term use
  • Set alert-based logging only on thresholds

๐Ÿ“‰ Logging costs reduced by 80%


๐Ÿ”น 6. Monitoring and Alerts


  • Added custom dashboards in Cloud Monitoring
  • Tracked per-customer usage in BigQuery
  • Cost anomaly detection via budget alerts + Slack notifications

๐Ÿง  Now, they know exactly which features or customers generate most cost.


๐Ÿ“Š Final Outcome


Metric
Before
After
Monthly GCP Cost
$12,100
$7,300
Avg Firestore Read
32M/day
10M/day
Cloud Run Instances
Uncapped
Tuned concurrency
BigQuery Cost
$3,000+
$1,600
Logging
600GB/month
120GB/month

  • โœ…Total Savings: $4,800+/month
  • โœ…Zero performance downgrade
  • โœ…Improved security + cost observability

๐Ÿ” Enterprise-Grade Practices We Applied


  • ๐Ÿ” IAM audit and cleanup (least privilege)
  • ๐Ÿ”’ Enforced VPC Service Controls
  • ๐Ÿ”„ GitOps for infra using Terraform
  • ๐Ÿ” Real-time billing dashboards
  • ๐Ÿงพ FinOps-ready tagging for departments/customers

๐Ÿ’ฌ What the Client Said


> "They didn't just reduce our cost -- they gave us total visibility. We now understand how our platform scales, and we know what each feature really costs to run."

> -- Director of Engineering, Global SaaS Company


๐Ÿ“ž Want to Cut Google Cloud Costs Without Downtime?


We offer:

  • โœ…Full GCP cost audit
  • โœ…Firestore, BigQuery, Cloud Run, and Logging optimization
  • โœ…Security + IAM cleanup
  • โœ…DevOps pipeline enhancements
  • โœ…Feature-level cost tracking for your SaaS


Get a free consultation