MPC vs HPA
v0.1.0 · one tracked spike pair

Predict-and-scale, or react-and-scale?

On a tracked 200 rps spike, a short-horizon MPC controller cut p95 latency by 38% against the HPA baseline. On a 30 s burst it lost — new Pods became Ready about 40 s after the decision. Both runs are reproducible from this repository.

Go 1.25 Python 3.11+ Prometheus / Grafana Apache-2.0
One verified pair 200 rps spike, MPC vs HPA, with raw traces. One known failure 30 s burst & ready-lag, documented end to end. Reproducible offline simulation or live Kubernetes cluster.
01Loadstep / spike
02toy-loadGo service
03MetricsPrometheus
04PolicyHPA / MPC
05Evidencefigures / docs

What this repository actually contains

A Go workload (toy-load) with tunable CPU, sleep, jitter, payload, and error-rate; a Python short-horizon MPC controller; one curated MPC-vs-HPA spike pair with raw traces and Grafana figures; and an offline simulator for sweeps without a cluster. Every figure links back to the source path that produced it.

Benchmark matrix · Methodology · Reproducibility

Scope

Useful as a lab. Not a production autoscaler.

Designed to probe knobs, baselines, and failure cases — not to replace the HPA in production.

Use

Tunable workload

toy-load exposes CPU, sleep, jitter, payload, and error-rate knobs plus health, readiness, and Prometheus endpoints.

Compare

Two policies, same trace

Replay a recorded load against the HPA and against the MPC controller; compare p95, p99, success rate, and replica trajectory.

Trust

Claims linked to artifacts

Every published number cites the run that produced it. Missing benchmark cells are kept visible instead of being implied.

Ten-Second Demo

One visual path from traffic spike to evidence.

The demo explains repository value without claiming production readiness.

Ten-second autoscaling loop demo
Traffic profile, workload metrics, HPA and MPC policies, then evidence paths and caveats.
Repository

Complete experiment loop.

Every path supports one research question: what should scale, when, and under which assumptions?

01

Control loop

Follow demand through toy-load, Prometheus metrics, HPA, MPC, and saved analysis artifacts.

Open system view

02

Reproduction tiers

Start local, move to offline simulation, then rebuild saved evidence or live cluster runs.

Run the tiers

03

Evidence policy

Charts point to committed sources and evidence roots; bulky raw artifacts stay out of Git.

View evidence

04

Project infrastructure

Release, CI, security scans, Pages, roadmap, issue templates, and GHCR image are wired as real project infrastructure.

Open project board

05

Feedback wanted

The highest-value input is specific methodology criticism: better baselines, traces, comparators, failure cases, and evidence tables.

Share reproduction feedback

06

First contribution path

Many starter tasks need only one verified documentation, link, metric, setup, or example improvement.

Browse good first issues

Evidence Preview

Evidence with source paths.

Figures summarize live runs, release automation, and reproducibility boundaries. Result claims stay tied to documented evidence paths.

MPC autoscaler architecture diagram
System boundary: traffic generator, workload, Prometheus, reactive HPA, predictive MPC, and analysis pipeline.
Spike experiment sample chart
Tuned Hybrid-SA control trace: burst detection, safety scale-up, solver status, and controlled downscale from one curated spike run.
release

v0.1.0 shipped

Checksums, binaries, Helm package, GHCR image, SBOM, and provenance are published.

Open release