Cloud Optimization as Code
Automatically Optimize Your Cloud—ForeverContinuous Optimization That Fits into Your CI/CD Framework
Infrastructure as code (IaC) automates cloud resource selection, but often creates operational risks and high cloud costs.
Optimization as code automates away these problems, seamlessly extending your CI/CD pipeline to enable Continuous Optimization (CO).
Inject one line of code into your favorite infrastructure as code template to link your cloud application instances to Densify, and your cloud apps get exactly the resources they need at the lowest possible cost, now, and as requirements and technologies change.
Introduction to Optimization as Code
Manual Instance Specification Limits the Power of IaC Automation
Infrastructure as code (IaC) tools like HashiCorp Terraform and AWS CloudFormation simplify and automate the process of managing and provisioning infrastructure. But two pitfalls are often inadvertently encountered:
- Developers often leverage tribal knowledge to manually size cloud instances, provisioning them larger (increasing costs) or smaller (introducing business outage risk) than required, or even selecting totally wrong instance types.
- These incorrect requirements become hardcoded through declarative IaC. Even if you change the instance type and size on the fly, the instance will be kicked back to the original misconfiguration after every restart.
provider "aws" {
region = "${var.aws_region}"
}
resource "aws_instance" "web" {
name = "Web Server"
instance_type = "m4.large"
ami = "${lookup(var.aws_amis, var.aws_region)}"
}
Effects of Hardcoded IaC Resource Selection
Increased operational risk
Potential business outages
High cloud costs
Suboptimal instance lock-in
The Solution: Optimization as Code Continuous, Environment-Aware Resource Selection
Step One: Self-Aware Infrastructure Imagine If Your Cloud Apps Just Knew
What if your cloud apps became self-aware of their exact resource requirements?
The Densify™ analytics engine uses patented machine learning to continuously model your apps’ utilization patterns and compare these models against complete knowledge of offerings from cloud providers. Densify then generates recommendations for optimal instance types and sizes for each app and workload:
- Injecting these findings into your cloud instances as tags (optional)
- Building an Impact Analysis Report for providing transparency to app and business owners and attaching directly to change tickets
- Documenting recommendations in machine-readable map files (that can be automatically synced to repos like GitHub) for advanced organizations that choose to automate optimization
With self-aware cloud apps, developers no longer need to rely on tribal knowledge when selecting and sizing cloud instances. Densify™ automatically provides a perfect, data-validated recommendation—every time.
Step Two: Continuous Optimization The Next Frontier of Infrastructure as Code
What if your cloud infrastructure became forever self-optimizing?
The next step for organizations that are successfully leveraging self-aware infrastructure is to evaluate Continuous Optimization (CO) as an addition to their CI/CD framework—an approach that makes infrastructure automatically self-optimizing.
By replacing fixed resource assignments in your infrastructure as code templates with calls to reference Densify’s recommendations, your cloud apps and workloads can be automatically reprovisioned to the best-fit instances. And, as app resource demands change over time or newer instance types are introduced by cloud providers, your infrastructure remains optimized.
When your organization embraces Continuous Optimization, hardcoded instance selections in your IaC templates are replaced by calls to Densify™ to leverage recommendations based on your apps’ exact needs. Your cloud infrastructure becomes self-optimizing, 24/7.
provider "aws" {
region = "${var.aws_region}"
}
resource "aws_instance" "web" {
name = "Web Server"
#instance_type = "m4.large"
instance_type = "${lookup(local.densify_spec,"appr_type") == "all" ? lookup(local.densify_spec,"rec_type") : lookup(local.densify_spec,"cur_type")}"
ami = "${lookup(var.aws_amis, var.aws_region)}"
}