Blog

Breaking the Iron Triangle: Kubernetes App Optimization for Cost, Performance, & Effort


By Rich Bentley | Sep 21, 2021

Iron triangle stock

In the project management world, there is a concept known as the “iron triangle”. You may know it by the phrase, “Good, fast, cheap. Pick two.” The idea is that there are tradeoffs in every project. If you want a project done faster, for example, it will either cost more or you will have to sacrifice quality. 

It turns out, this same concept applies to deploying applications on Kubernetes.

The Kubernetes Optimization Iron Triangle

Similar to the project management example, the three points of the Kubernetes iron triangle are:

  • Cost. How many resources are allocated to run the application? What are you paying in cloud costs?
  • Application performance. How well does the application perform? How reliable is it? Does it meet SLOs?
  • Time and effort. How many person-hours are used to configure and prepare the application for deployment, and how long does it take?

And just like the project management triangle, there are trade-offs that you need to consider. 

Want to reduce the cloud costs involved in running your app? Then you’ll either need to sacrifice application performance, or expect your team to spend a lot more time on trial-and-error tuning of your application so that it can run more efficiently.

Looking to improve application performance? It’s going to cost you more, either in cloud costs or your team’s time and effort to find the right application settings that will maximize performance at a given price point.

Do you want your team to spend less time testing and configuring your app prior to deployment? Then you can expect to pay for it in the form of either higher cloud costs or diminished application performance.

There is No Free Lunch…

You can think of the area inside the iron triangle representing the total cost of running your application, where the total cost includes not only the hard cloud spend, but also your team’s time plus the cost to your business of substandard application performance. 

Because the triangle is made of iron, that area is fixed. There is no free lunch. You can’t have your cake and eat it too. Darn it, now I’m hungry — be right back.

GIF of 'You Can't Skip Lunch' from 'I Think You Should Leave'

…Or is There with Kubernetes and AI?

It turns out there is a way to break the Kubernetes iron triangle, by leveraging Artificial Intelligence (AI) and automation.

AI is key because of the complexity of Kubernetes. Every time you deploy an application, you have to make several resource decisions. This includes Kubernetes resource decisions at the container level — CPU and memory requests and limits, and replicas. Multiply that by the number of containers that make up your app, then add the application-specific configuration settings like JVM heap size, garbage collection, and so on — and you can quickly get into dozens of decisions that need to be made.

These settings all impact the cost of running the app in production, as well as the performance and stability of the app. They’re all interrelated, making it even more complicated. As a human being, all you can do is leverage your experience, make your best guess as to the optimal settings, deploy your application, and see what happens. If your cloud costs are too high, utilization is too low; or performance is not up to snuff. Then you try again. 

But there are billions of possible configurations. Finding the one that results in the right level of performance at the lowest possible cost is like finding a needle in a haystack. But AI, or more specifically machine learning, is perfectly suited to solving this type of optimization problem. Machine learning can do this “trial and error” in a much more efficient and effective way than humans can.

Machine learning also allows this choice of the optimal configuration to happen automatically, so that your engineers don’t have to spend hours, days, or weeks tweaking, tuning and troubleshooting.

Get Started with StormForge

Try StormForge for FREE, and start optimizing your Kubernetes environment now.

Start Trial

Back to the Iron Triangle

Leveraging machine learning and automation, you can now envision a world where:

  • You can find the configuration of your app that will minimize cost, without taking a hit on performance.
  • You can find the configuration that will ensure application performance meets or exceeds SLOs, without spending more than needed.

  • And you can find this optimal configuration without your engineers spending days down in the weeds of Kubernetes.

Remember how we said that the area inside the triangle represents the total cost of running your application? What we’ve now done is minimize the area of the triangle, while still achieving our business goals. The reduction in that area is the waste that we’ve effectively eliminated.

Where to Go From Here

To apply these principles in your own environment, here are some steps you can take, based on the FinOps lifecycle.

  1. Get visibility. The first step to solving a problem is recognizing that you have one. Getting visibility means understanding how efficiently your applications are currently running, how well they’re performing, and how much time and effort are going into the configuration. This can be done with a combination of tools you likely already have in place — application performance monitoring and cloud cost management tools for example — and optimization tools like StormForge, that can help you understand and analyze the tradeoffs.
  2. Optimize. Knowing where you stand, you can now focus on the low hanging fruit and optimize those applications that are least efficient or where you are burning the most cycles of your engineering team. Leverage AI to automate this process and help your team make smart resource decisions without all the trial-and-error. Optimization tools like StormForge are built to drive this process.
  3. Operate. Once you’ve established the tools and practices around visibility and optimization, you can start to build these processes into your normal workflow. This is key for establishing a cost-conscious and resource-efficient culture. With automation, you can build optimization into your CI/CD workflow to ensure that any new releases are optimized before reaching production.

Follow these steps and you are well on your way to that free lunch (or at least a really inexpensive one). After that, feel free to have some cake and eat it too. Happy optimizing!

Latest Posts

We use cookies to provide you with a better website experience and to analyze the site traffic. Please read our "privacy policy" for more information.