Upping Your FinOps and DevOps Game: Scheduled Node Optimization Use Cases

Recently, we shared our research on spot instance pricing hikes and ideas on mitigating this challenge with a feature called Scheduled Rebalancing. Today, I’d like to present more real-life use cases of automated node optimization helpful for FinOps and DevOps workflows. These ideas come from CAST AI users who have benefitted from different rebalancing schedules. 

Upping Your FinOps and DevOps Game: Scheduled Node Optimization Use Cases

Node optimization directly impacts your Kubernetes performance, stability, and costs. Automating tasks related to node upgrades and updates can support and accelerate both FinOps and DevOps processes. 

Here’s how CAST AI’s Scheduled Rebalancing can come in handy. 

Node optimization: a recap 

Optimizing nodes in a Kubernetes cluster is crucial for more efficient resource utilization, high application performance, and savings. 

Frequent node optimization ensures that your workloads run smoothly and scale without generating too much waste. It also boosts cluster reliability by preventing failures and simplifying maintenance.

In CAST AI, we call the process of automated node optimization rebalancing. It allows you to optimize the cluster by removing and replacing suboptimal nodes with more efficient ones. 

With Scheduled Rebalancing, you can create specific node optimization plans, which start automatically when your preset requirements are met. 

Here’s what you can set in Scheduled Rebalancing 

First, CAST AI lets you decide on the batch size to limit the number of target nodes to, for example, just one most expensive instance per cycle. You can also specify node lifecycle to only pick spot instances and use labels to target nodes based on specific key-value pairs and logic.

Adding the savings threshold ensures that rebalancing only runs if the game is worth the candle. You can also set specific times using the timezone and crontab expressions for your node optimization to start automatically, even when there are no savings to reap. 

Scheduled Node Optimization Use Cases

There’s also an option to target instances based on their age, delete newly created nodes if minimum savings aren’t reached, and more. 

All these settings enable multiple node optimization use cases for FinOps and DevOps processes – and here’s how.

FinOps: node optimization for cost reduction 

Spot instances have long been an essential weapon in the FinOps game. Allowing teams to get cloud capacity at much lower rates than on-demand instances, combined with automation, they promised to slash your cloud bill. 

However, more and more signs indicate that the era of cheap compute is over. If you’ve used spot instances, you may have noticed how your savings start to dry up. For example, starting with AWS c5’s in 2022, you now pay 24% more than if you had moved elsewhere when prices increased.

AWS adjusts spot rates gradually following long-term supply and demand trends –  and rebalancing schedules mitigate the adverse effects of such changes. 

Here are examples of node optimization schedules for cost reduction:

Scheduled Node Optimization Use Cases 
for FinOps

1. Rebalance the N-most expensive nodes every hour

This schedule checks for alternatives for the specified number of the most expensive spot nodes in your cluster. The rebalancer starts when the possible level of savings reaches 20% and more. 

The example comes from a client who uses it across 20 clusters, a scale that would never be feasible manually. 

2. Rebalance the N-most expensive nodes every four hours

This schedule follows a similar logic but kicks off less frequently to match the cyclical needs of your client’s team. 

3. Rebalance every hour except for specific time periods

This schedule ensures regular rebalancing outside the specific periods to reduce the odds of potential interruptions or downtime. 

By regularly checking for more affordable spot nodes, you can avoid the trap of gradual spot-pricing increases and save more in the long run.

DevOps: smoother node upgrades and management 

The never-ending list of node optimization tasks, including patches and upgrades, would make DevOps engineers toss and turn if not for automation. 

Scheduling these DevOps jobs adds to improved performance, stability, and security.  

For example, regularly replacing nodes older than N-days can enhance K8s cluster security, keep it up-to-date and patched, and boost performance. This step, in turn, reduces the odds of failures and helps to keep costs in check. 

Here are examples of node optimization schedules for DevOps:

1. Replace nodes every N-days

One of CAST AI users has an organizational policy of replacing all nodes older than 30 days across all its clusters. 

You can easily set this requirement in Scheduled Rebalancing using a crontab expression like this. Moreover, setting the target savings value to 0 ensures node optimization takes place even when no cost reduction is possible. 

 Scheduled Node Optimization Use Cases for DevOps

2. Node upgrades after upgrading the control plane 

Upgrading the K8s control plane is vital to enhancing security, optimizing performance, and ensuring a robust and up-to-date cluster. 

Once you upgrade your control plane, you also need to upgrade nodes. This step is simple with CAST AI, as you can add a schedule that runs with target savings set to zero. 

Alternatively, you can also insert label-based constraints to ensure that CAST AI only replaces the nodes with matching labels. 

3. Schedule security patches and reconfigure nodes 

While essential for security, patch management has never been IT folks’ favorite pastime. Nobody wants to be the “patch person”, but some tasks must be done to protect the system.  

When it comes to security patching, CAST AI’s node configuration lets you set the parameters the platform uses when provisioning nodes, including a new image.

Once you specify a new image, CAST AI will use it for all new nodes it provisions from now on. 

Nodes added earlier will continue running according to your previous node configuration. You can reconfigure them manually or create a rebalancing schedule – and here’s how:

  1. Set the savings threshold to 0 to ensure all nodes get rebalanced even if cost reduction isn’t possible.  
  2. Apply a label like “provisioner.cast.ai/node-configuration-version=2” to target nodes to pick up the new configuration after your patches.
  3. Set a cron job to enable custom configurations matching your requirements.

Smoother node optimization for FinOps and DevOps 

Scheduled Rebalancing can benefit both FinOps and DevOps workflows by automating node optimization. 

In FinOps processes, it supports cost optimization by tackling the negative effects of spot instance price hikes and continuously checking for more cost-efficient nodes. In DevOps, scheduled node optimization can relieve engineers of tedious and repetitive patches and upgrades. 

Schedule a technical demo call and discover how CAST AI’s rebalancing can support FinOps and DevOps processes in your team. 

CAST AI clients save an average of 63%
on their Kubernetes bills

Book a technical demo and see what CAST AI can do for your FinOps and DevOps processes. 

  • Blog
  • Upping Your FinOps and DevOps Game: Scheduled Node Optimization Use Cases

Leave a reply

Notify of
Inline Feedbacks
View all comments

Recent posts