Google Cloud

Right-Sizing Google Cloud Infrastructure to Improve Efficiency and Control Costs

Overview

A production application environment underwent a comprehensive Google Cloud infrastructure optimization initiative focused on reducing unnecessary cloud costs, strengthening security, improving resource efficiency, and creating a more predictable operating model.

The engagement covered compute, database, networking, storage, monitoring, IAM, autoscaling, and cloud cost management. Optimization decisions were driven by actual production utilization, enabling resources to be right-sized without compromising application performance or availability.

The Challenge

The production environment had been provisioned with capacity beyond observed workload requirements. This created opportunities to reduce infrastructure spend while improving the overall security and operational posture.

Key challenges included:

  • Over-provisioned Cloud SQL compute and storage resources.
  • Database connectivity relying on a public IP.
  • Cloud Run resources and scaling configuration requiring optimization.
  • Unused cloud storage resources increasing unnecessary footprint.
  • Limited proactive monitoring for infrastructure resource utilization.
  • An opportunity to strengthen IAM and service account permissions.
  • Cloud commitment decisions needed to be based on an optimized baseline rather than existing provisioning.

The goal was to optimize the environment without introducing performance degradation or operational risk.

Our Solution

Cloud SQL Right-Sizing

Production database utilization was analyzed to determine the appropriate capacity for the workload.

The Cloud SQL environment was optimized by:

  • Reducing compute capacity from 4 vCPU / 16 GB to 2 vCPU / 12 GB.
  • Reducing allocated SSD storage from 100 GB to 70 GB.
  • Migrating database connectivity from Public IP to Private IP.
  • Validating application connectivity and database performance following the changes.

This reduced unnecessary database capacity while improving the network security posture.

Cloud Run Optimization

Cloud Run services were optimized to balance performance, cost, and predictable scaling.

The implementation included:

  • Direct VPC Egress for private connectivity to the database.
  • Right-sizing a production service to 1 vCPU and 1 GB memory based on observed utilization.
  • Standardizing maximum instance settings at the service and revision levels.
  • Configuring controlled autoscaling with a maximum of 5 instances.

This established a more predictable scaling model while reducing the risk of unnecessary resource consumption.

Storage Optimization

The storage environment was reviewed to identify resources that were no longer required.

Actions included:

  • Removing an unused Cloud Build storage bucket.
  • Reviewing application image storage requirements.
  • Configuring controlled public read-only access where required.
  • Simplifying the overall storage footprint.

Monitoring & Security

The optimized infrastructure was supported with stronger monitoring and security controls.

The implementation included:

  • Cloud Monitoring alerts for Cloud SQL CPU and memory utilization.
  • Cloud Run CPU and memory alerts.
  • Project-level Cloud Billing budget alerts.
  • IAM permission reviews.
  • Removal of unnecessary access.
  • Application of least-privilege principles to users and service accounts.

These controls improved visibility into infrastructure health, resource consumption, security, and cloud spending.

Cost Optimization

Following infrastructure right-sizing, a Cloud SQL Spend-based Committed Use Discount was purchased against the optimized database baseline.

Rather than committing against the previous over-provisioned configuration, the commitment was aligned with the optimized workload. This approach supports long-term savings while retaining greater flexibility as future Cloud SQL requirements evolve.

Architecture

The optimized architecture introduced private database connectivity, controlled Cloud Run scaling, right-sized infrastructure, and improved monitoring and cost controls across the Google Cloud environment.

Business Impact

The optimization initiative transformed the production environment into a more efficient, secure, and predictable cloud operating model.

Key business and operational benefits included:

  • Lower ongoing infrastructure consumption through resource right-sizing.
  • Reduced unnecessary Cloud SQL compute and storage allocation.
  • More secure database connectivity through private networking.
  • Better control over Cloud Run scaling and resource usage.
  • Elimination of unused cloud resources.
  • Improved visibility into infrastructure performance and cloud expenditure.
  • Stronger IAM security through least-privilege access.
  • Long-term Cloud SQL savings through an optimized CUD commitment.
  • A more predictable and sustainable production environment.

Key Accomplishments

Optimized Infrastructure Utilization

Cloud SQL and Cloud Run resources were aligned with actual production workloads rather than theoretical capacity requirements.

Improved Security Posture

Public database connectivity was replaced with private networking, while IAM permissions were reviewed and tightened.

Predictable Autoscaling

Cloud Run scaling limits were standardized and capped to provide greater control over infrastructure consumption.

Reduced Cloud Waste

Unused storage resources were removed and unnecessary infrastructure capacity was eliminated.

Stronger Monitoring & Cost Visibility

Resource-level alerts and project-level billing budgets provided improved visibility into performance, utilization, and cloud spending.

Long-Term Cost Efficiency

Cloud SQL committed usage was applied only after right-sizing, allowing the environment to capture savings from an optimized baseline.

Key Learnings

Effective cloud optimization should be utilization-driven rather than assumption-driven. Right-sizing resources, securing network connectivity, controlling autoscaling, continuously monitoring workloads, and applying commitments only after optimization can significantly improve both infrastructure efficiency and cloud economics.

Conclusion

This initiative demonstrates a practical approach to optimizing a production Google Cloud environment without compromising application performance.

By combining infrastructure right-sizing, private networking, controlled autoscaling, security improvements, monitoring, and cost management, the environment became more secure, efficient, predictable, and sustainable while creating a stronger foundation for future growth.