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
- Production
- All Environments
Maximum Savings: $9,888/year (66%)
Strategy 1: GKE Autopilot
Pay-per-pod pricing eliminates idle node costs:How Autopilot Saves Money
How Autopilot Saves Money
Traditional GKE Standard:
- Pay for entire nodes (even when idle)
- Typical utilization: 50-70%
- Waste: 30-50% of spend
- Pay only for pod resources used
- No idle costs
- Automatic bin-packing
Strategy 2: Committed Use Discounts (CUDs)
Commit to 1-year or 3-year usage for significant discounts:
Purchase via Console:
- Go to: Billing → Commitments → Purchase Commitment
- Select resources and term
- Enable auto-renew
Complete Cost Guide
Comprehensive guide with 8 cost reduction strategies
Strategy 3: Development Cost Controls
Auto-shutdown dev clusters after hours:Strategy 4: Database Optimization
Right-size Cloud SQL
Right-size Cloud SQL
Analyze CPU usage:If CPU < 50% consistently, downgrade:
- db-custom-4-15360 → db-custom-2-7680
- Savings: $140/month (50%)
Evaluate Read Replicas
Evaluate Read Replicas
Question: Do you use the read replica?Check connections:If unused, remove:Savings: $140/month
Optimize Backups
Optimize Backups
Reduce retention if compliance allows:Savings: $5-10/month
Strategy 5: Redis Optimization
Right-size memory:- 5 GB → 3 GB: Save $88/month (40%)
- STANDARD_HA → BASIC: Save $110/month (50%)
Cost Monitoring
Set Up Budget Alerts
Alerts fire at 50%, 90%, and 100% of budget
Cost Allocation Labels
Already configured in Terraform:Quick Wins Checklist
1
Use GKE Autopilot
✅ Already configuredSavings: $200-400/month vs. Standard GKE
2
Right-size Pod Resources
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
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
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)
Month 3-6: Advanced ($50-100/month)
- Implement autoscaling schedules
- Optimize network egress
- Cleanup unused resources
- FinOps automation
AWS Cost Optimization
Current vs. Optimized
- Production
- All Environments
Maximum Savings: $18,660/year (79%)
Strategy 1: Spot Instances (70-90% Savings)
Use spot instances for fault-tolerant workloads:How Spot Instances Save Money
How Spot Instances Save Money
On-Demand Pricing:
- Fixed price, always available
- t3.large: 60.74/month
- Variable price (usually 70-90% discount)
- t3.large: ~18.25/month
- Can be interrupted with 2-minute warning
- 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:
- Reserved Instances
- Compute Savings Plans
Best for: Predictable, always-running workloads
Strategy 3: Right-Sizing
Analyze and optimize resource allocation:Strategy 4: VPC Endpoints (70% Data Transfer Savings)
Avoid NAT gateway data transfer charges:- 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:Strategy 6: Development Environment Controls
Stop dev/staging environments after hours:AWS Cost Breakdown
Production Environment ($803/month):
Cost Optimization Checklist:
Compute
Compute
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
Storage
Storage
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)
Network
Network
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
Database
Database
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
Monitoring
Monitoring
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 (100, $200 thresholds)
AWS Cost Monitoring
Set Up Cost Alerts:Related Documentation
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