liveBook · Manning

Cost optimization

As explained in Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform

Cost optimization is the practice of controlling infrastructure spending by aligning resource usage and capacity with demand and organizational requirements.

Cost optimization aligns infrastructure usage and capacity with demand and organizational requirements. Treat cost as an IaC concern alongside security, then revisit decisions as systems, customers, and billing change. section 12.0

Apply the practice through an iterative operational cycle:

  • Identify cost drivers and unused resources before provisioning or changing infrastructure. section 12.0
  • Build environments on demand, compose infrastructure across providers when appropriate, and evolve deployments across regions. section 12.3
  • Use monitoring and instrumentation to match capacity to changing demand; refactor or re-platform systems that cannot scale elastically. section 12.3.4
  • Test production changes with feature flags, canary deployment, or blue-green deployment, and maintain a roll-forward plan for failure. section 12.3.4

Seasonal platform demand

A conference platform sees its greatest demand in May, June, October, and November. Aggregated usage metrics can guide capacity changes, architecture improvements, and negotiations for reserved capacity or volume discounts. section 12.3.4

Figure 12.11 Cost optimization requires IaC practices for scaling and deploying infrastructure resources.

Relates cost optimization to IaC practices for scaling and deploying infrastructure resources. section 12.3

How Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform covers it

How deep it goes
Explains iterative practices, demand measurement, deployment safeguards, and architectural trade-offs, but defers provider-specific implementation.
Examples
Uses on-demand environments, regional infrastructure changes, production testing, and seasonal conference-platform demand as concrete cases.
What it assumes
Assumes familiarity with infrastructure as code, cloud resources, deployment patterns, and system monitoring.
What you can do after
Apply cost optimization by measuring demand, changing capacity, testing infrastructure safely, and selecting suitable pricing arrangements.
How it connects
Connects infrastructure as code with cloud computing, elasticity, monitoring, feature flags, canary deployment, and blue-green deployment.

Also explained in

Compare how 4 books explain cost optimization →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform. The section links point to the parts of the book it draws on.