Skip to content

doc: add an initial compute autoscaling RFC - #197

Open
savme wants to merge 1 commit into
mainfrom
doc/rfc-compute-load-autoscaling
Open

doc: add an initial compute autoscaling RFC#197
savme wants to merge 1 commit into
mainfrom
doc/rfc-compute-load-autoscaling

Conversation

@savme

@savme savme commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Proposes adding load-driven horizontal autoscaling for Compute workloads.

The autoscaler would read CPU/memory usage, compare it to the workload's configured targets, and update the desired replica target through the WorkloadDeployment scale subresource. It follows Kubernetes HPA's basic ratio formula, but uses faster scale-up and shorter scale-down smoothing because Compute instances start in milliseconds.

Scaling decisions happen per deployment/location. The autoscaler only sets the desired target; existing instance management policy still controls how instances are created or deleted.

Scale-to-zero, wake-on-traffic, and the concrete metrics source integration are left for separate work.

Related to datum-cloud/enhancements#799

@savme
savme requested review from 0xmc and scotwells July 28, 2026 15:34
@scotwells

Copy link
Copy Markdown
Contributor

@savme what's it look like to leverage the HPA controller? We would just need to run a small prometheus deployment in the cluster for instance metrics?

@savme

savme commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

@scotwells assuming we'd run stock HPA at the edge, I think Prometheus would only be one piece. We'd also need to:

  • implement the WorkloadDeployment scale subresource (including a selector that maps each deployment to its backing pods)
  • make sure Karmada doesn't fight autoscaling decisions by adding custom retention for HPA-owned fields on WorkloadDeployment
  • run a metrics adapter HPA can query for kraftlet-managed Pods, likely Prometheus + prometheus-adapter via custom metrics
  • create an HPA per WorkloadDeployment scaling policy

@scotwells

Copy link
Copy Markdown
Contributor

@savme nice! That seems like a pretty clean path.

Thoughts on trying that before we reach to re-implementing the capabilities HPA gives us?

@savme

savme commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

@scotwells good call! The RFC is close enough to HPA, so this is definitely worth prototyping first. I think most of the timing defaults that may not work well for us are probably tunable anyway. I'll try an HPA-based approach so we can see what the integration looks like and whether we're happy with the scaling latency/behavior. I'll update the doc based on what we find

@savme

savme commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

Linking related work here: datum-cloud/unikraft-provider#54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants