All projects

Project 01 · Cloud infrastructure · 2026

Intelligent Cluster Optimizer

A Kubernetes-native optimizer that right-sizes workloads from their real usage history — cutting cloud cost without trading away reliability. Published as a research paper on arXiv.

Top-down illustration of a small data-center room: three rows of server racks and a person with a laptop crouching beside one

Overview

Most Kubernetes workloads ask for far more CPU and memory than they ever use, and the cluster pays for that gap every hour. The optimizer watches what each workload actually consumes, forecasts what it will need next, and rewrites its resource requests — but only when a chain of safety checks agrees the change is safe.

In evaluation on Google Kubernetes Engine it cut cost by 20–40%. The approach is published as Safety-Gated Autoscaling (arXiv:2607.26503).

How it works

  1. CollectScrapes CPU and memory usage from the Kubernetes metrics API into an in-memory time-series store.
  2. AnalyseFlags anomalies (Z-score, IQR, moving average), detects memory leaks with regression and forecasts demand with Holt-Winters.
  3. RecommendComputes P95/P99 usage with a 1.2× safety margin and gives every recommendation a 0–100% confidence score.
  4. OptimiseBalances cost, performance, reliability, efficiency and stability with multi-objective (Pareto) optimisation, then applies YAML policies and SLA checks.
  5. GateChecks for HPA/PDB conflicts, OOM risk and the circuit-breaker state before anything changes.
  6. Apply & roll backPatches the deployment and reverts automatically if health checks fail; changes can also be exported as Kustomize/Helm for GitOps.

What’s in the source code

Written entirely in Go. The controller, collector and CLI live in cmd/; each part of the pipeline is its own package under pkg/.

  • cmd/Controller, metrics collector and the optctl CLI
  • pkg/recommendationP95/P99 percentile engine
  • pkg/predictionHolt-Winters forecasting
  • pkg/anomalyZ-score, IQR and moving-average detection
  • pkg/leakdetectorMemory-leak detection via regression
  • pkg/paretoMulti-objective optimisation
  • pkg/policy · pkg/slaPolicy engine and SLA monitoring
  • pkg/safetyOOM checks and circuit breaker
  • pkg/gitopsKustomize / Helm export
  • pkg/costAWS, GCP and Azure pricing models
go build -o bin/optimizer-controller ./cmd/controller/
kubectl apply -f config/crd/
./bin/optimizer-controller

The repository README reports 91 test files with 959 test cases, 83.0% coverage of pkg/, a clean race-detector run and about 50 ms per recommendation.