Stage 10, Part 4 of 9 · p. 86, Autoscaling & Cost Optimization
PART 4: CAPACITY PLANNING & COST MODELING
17. Cost Modeling and FinOps
The FinOps Lifecycle
| Phase | Activities |
| Inform | Cost visibility, allocation, showback |
| Optimize | Rightsizing, spot, bin-packing |
| Operate | Governance, budgets, alerts |
Cost Allocation Dimensions
| Dimension | Example |
| Namespace | team-a, team-b |
| Label | app=web, env=prod |
| Deployment | web, api, db |
| Cluster | prod-us-east, prod-eu-west |
The Optimization Formula
text
Savings = (Current cost) - (Optimized cost)
Optimized cost = (Rightsized resources × Correct price) × (1 - Spot discount)
Example:
Current: 100 nodes × $0.20/hour = $20/hour
Rightsized: 60 nodes
Spot: 40% of nodes at 70% discount
Optimized: (60 × $0.20 × 0.6) + (60 × $0.20 × 0.4 × 0.3) = $8.64/hour
Savings: 57%
18. Optimization ROI Calculation
The ROI of Autoscaling
| Optimization | Typical Savings | Effort |
| Rightsizing (VPA) | 20–40% | Low |
| Spot instances | 60–90% on eligible workloads | Medium |
| Bin-packing | 20–30% | Medium |
| Karpenter consolidation | 30–50% | Medium |
| KEDA scale-to-zero | 50–80% on batch | Medium |
| Combined | 50–70% | High |
Case Study: Cast AI Evictor
“Cast AI Evictor cut node count by 50% in one measured case, keeping remaining nodes at 80% CPU utilization.”
19. SLA & Availability Design for Autoscaling
Availability Math
text
99.9% = 8.76 hours downtime/year
99.99% = 52.56 minutes downtime/year
99.999% = 5.26 minutes downtime/year
Autoscaling SLA Design
| Target | Architecture |
| 99.9% | HPA with 2+ replicas, basic monitoring |
| 99.99% | HPA + VPA (Off) + PDBs + Karpenter |
| 99.999% | Full stack: HPA + KEDA + Karpenter + Spot with fallback + chaos-tested |
The Availability vs Cost Trade-Off
| Strategy | Availability | Cost |
| On-demand only | Highest | Highest |
| Mixed spot + on-demand | High | Medium |
| Spot only | Medium | Lowest |
| Bin-packed | Lower (blast radius) | Lowest |
1:1 copy of the class Google Doc, code in code blocks.