Skip to main content

Overview

Optimize infrastructure costs while maintaining performance, security, and reliability. This guide provides actionable strategies achieving 30-66% cost reduction.

GKE Autopilot

40-60% savings vs. Standard GKE

Committed Use

25-52% additional discounts

Right-sizing

10-30% from resource optimization

GCP Cost Optimization

Current vs. Optimized

Maximum Savings: $9,888/year (66%)

Strategy 1: GKE Autopilot

Pay-per-pod pricing eliminates idle node costs:
Traditional GKE Standard:
  • Pay for entire nodes (even when idle)
  • Typical utilization: 50-70%
  • Waste: 30-50% of spend
GKE Autopilot:
  • Pay only for pod resources used
  • No idle costs
  • Automatic bin-packing
Savings: 40-60%
Right-size Pod Resources:
Action:

Strategy 2: Committed Use Discounts (CUDs)

Commit to 1-year or 3-year usage for significant discounts: Purchase via Console:
  1. Go to: Billing → Commitments → Purchase Commitment
  2. Select resources and term
  3. Enable auto-renew
ROI: Pays for itself in first month

Complete Cost Guide

Comprehensive guide with 8 cost reduction strategies

Strategy 3: Development Cost Controls

Auto-shutdown dev clusters after hours:
Savings: ~$50-70/month per dev environment

Strategy 4: Database Optimization

Analyze CPU usage:
If CPU < 50% consistently, downgrade:
  • db-custom-4-15360 → db-custom-2-7680
  • Savings: $140/month (50%)
Question: Do you use the read replica?Check connections:
If unused, remove:
Savings: $140/month
Reduce retention if compliance allows:
Savings: $5-10/month

Strategy 5: Redis Optimization

Right-size memory:
If usage < 60%, downgrade:
  • 5 GB → 3 GB: Save $88/month (40%)
For non-critical caching:
  • STANDARD_HA → BASIC: Save $110/month (50%)
BASIC tier has no SLA and no auto-failover. Only use for non-critical workloads.

Cost Monitoring

Set Up Budget Alerts

Alerts fire at 50%, 90%, and 100% of budget

Cost Allocation Labels

Already configured in Terraform:
View costs by label in BigQuery:

Quick Wins Checklist

1

Use GKE Autopilot

✅ Already configuredSavings: $200-400/month vs. Standard GKE
2

Right-size Pod Resources

Savings: $50-150/month
3

Purchase 1-year CUD

Console → Billing → CommitmentsSavings: $242/month (25%)
4

Optimize Dev/Staging

  • Use zonal clusters (not regional)
  • Smaller instances
  • Auto-shutdown after hours
Savings: $100-200/month
5

Enable VPA

Vertical Pod Autoscaler automatically optimizes requests:
Savings: 10-30%

Cost Optimization Roadmap

Month 1: Quick Wins ($150-250/month)

  • GKE Autopilot (vs. Standard): $200 saved
  • Right-size pod resources: $96 saved
  • Reduce dev/staging usage: $50 saved
  • Optimize log retention: $15 saved
Total: $361/month savings

Month 2: Commitments ($200-300/month)

  • Purchase 1-year CUD: $242/month saved
  • Right-size Cloud SQL: $140 saved (if applicable)
  • Optimize Redis tier: $88 saved (if non-critical)
Total: $470/month additional savings

Month 3-6: Advanced ($50-100/month)

  • Implement autoscaling schedules
  • Optimize network egress
  • Cleanup unused resources
  • FinOps automation
Total Potential: $580/month savings (60% of baseline)

AWS Cost Optimization

Current vs. Optimized

Maximum Savings: $18,660/year (79%)

Strategy 1: Spot Instances (70-90% Savings)

Use spot instances for fault-tolerant workloads:
On-Demand Pricing:
  • Fixed price, always available
  • t3.large: 0.0832/hour=0.0832/hour = 60.74/month
Spot Pricing:
  • Variable price (usually 70-90% discount)
  • t3.large: ~0.025/hour=0.025/hour = 18.25/month
  • Can be interrupted with 2-minute warning
Savings: $42.49/month per node (70%)
Implementation:
Use Cases:
  • Development/staging environments
  • Batch processing workloads
  • Stateless applications with proper graceful shutdown
  • CI/CD build agents

Strategy 2: Reserved Instances & Savings Plans

Commit to 1-year or 3-year usage for significant discounts: Purchasing Options:
Best for: Predictable, always-running workloads

Strategy 3: Right-Sizing

Analyze and optimize resource allocation:
RDS Right-Sizing:

Strategy 4: VPC Endpoints (70% Data Transfer Savings)

Avoid NAT gateway data transfer charges:
Data Transfer Savings:
  • NAT Gateway data processing: $0.045/GB
  • VPC Endpoint data processing: $0.01/GB
  • Savings: $0.035/GB (78%)

Strategy 5: Auto-Scaling

Cluster Autoscaler removes idle nodes:
HPA scales pods based on utilization:
Savings: 20-40% on compute costs by removing idle capacity

Strategy 6: Development Environment Controls

Stop dev/staging environments after hours:
Single NAT Gateway for Non-Production:

AWS Cost Breakdown

Production Environment ($803/month): Cost Optimization Checklist:
Enable spot instances for fault-tolerant workloads
Purchase Reserved Instances for base capacity (35-50% discount)
Deploy Cluster Autoscaler to remove idle nodes
Right-size instance types based on actual utilization
Use HPA to scale pods, not nodes
Stop dev/staging environments after hours
Use gp3 instead of gp2 (20% savings + better performance)
Enable RDS storage autoscaling (avoid over-provisioning)
Delete old EBS snapshots (lifecycle policy)
Use S3 lifecycle policies (Standard → IA → Glacier)
Enable VPC endpoints (70% data transfer savings)
Use single NAT gateway in dev/staging
Optimize CloudFront caching to reduce origin requests
Use AWS PrivateLink instead of NAT for AWS services
Purchase RDS Reserved Instances (35-50% discount)
Right-size RDS instance class based on CPU/memory usage
Use Aurora Serverless v2 for variable workloads
Enable automated backup retention limits
Use read replicas only when needed
Set CloudWatch Logs retention (7-30 days, not indefinite)
Use CloudWatch Logs Insights instead of exporting to S3
Enable AWS Cost Explorer and set budgets
Tag all resources for cost allocation
Set up billing alerts (50,50, 100, $200 thresholds)

AWS Cost Monitoring

Set Up Cost Alerts:
budget.json:
Enable Cost Allocation Tags:

GCP Infrastructure

GCP Terraform modules with cost-optimized defaults

AWS Infrastructure

AWS Terraform modules with cost breakdowns

GKE Production

GCP production deployment with cost estimates

EKS Production

AWS production deployment with cost estimates

Multi-Environment

Dev/staging cost optimization strategies

Complete Guide

Detailed GCP cost optimization strategies