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.
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:
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)}"
}
Increased operational risk
Potential business outages
High cloud costs
Suboptimal instance lock-in
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:
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.
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)}"
}
Ready to try optimization as code for yourself?
Start Optimizing—Free!Kubernetes is a powerful container scheduling technology, but it will still run inefficiently if the containers are misconfigured.
Kubernetes Pods consist of a set of containers that run on a common node. Each container specification has a CPU and memory resource request and limit.
It can be challenging for developers to determine precise values for these settings, either because they cannot project how the app will behave once live, or because they are risk-averse and want to play it safe. Both of these approaches make hardcoding the values justifiable, but the efficiency impact on the container clusters can be significant.
resource "kubernetes_pod" "nginx1" {
metadata {
name = "nginx1"
labels {
App = "nginx"
}
}
spec {
container {
image = "nginx:1.7.8"
name = "nginx1"
port {
container_port = 80
}
resources {
requests {
cpu = "50m"
memory = "256Mi"
}
limits {
cpu = "500m"
memory = "512Mi"
}
}
}
}
}
Densify™ solves this problem by learning the utilization patterns of containers and their Pods and scientifically determining the optimal request and limit values to ensure that the Pods get precisely the resources they need, while at the same time enabling the Kubernetes clusters to run at far higher utilization.
Densify™ also automates the process of updating the container manifests. By supplying one line of code that can be included in popular templating technologies like Terraform, Densify™ makes container applications self-optimizing. This enables developers to focus their apps, and lets infrastructure managers maintain high efficiency and safety by using automation to close the optimization loop.
spec {
container {
image = "nginx:1.7.8"
name = "nginx1"
port {
container_port = 80
}
resources {
requests {
#cpu = "50m"
#memory = "256Mi"
cpu = "${lookup(local.densify_spec,"appr_type") == "all" ?
lookup(local.densify_spec,"rec_cpu_request") :
lookup(local.densify_spec,"cur_cpu_request")}"
memory = "${lookup(local.densify_spec,"appr_type") == "all" ?
lookup(local.densify_spec,"rec_mem_request") :
lookup(local.densify_spec,"cur_mem_request")}"
}
limits {
#cpu = "500m"
#memory = "512Mi"
cpu = "${lookup(local.densify_spec,"appr_type") == "all" ?
lookup(local.densify_spec,"rec_cpu_limit") :
lookup(local.densify_spec,"cur_cpu_limit")}"
memory = "${lookup(local.densify_spec,"appr_type") == "all" ?
lookup(local.densify_spec,"rec_mem_limit") :
lookup(local.densify_spec,"cur_mem_limit")}"
}
}
}
}
Ready to try optimization as code for yourself?
Start Optimizing—Free!