[Suggestion] Add support for HPA?
Metaparticle can provide a good story for making "self-deployable" services and with replica count, we can easily make provide higher availability/performance, yet for many scenarios, specifying replica count explicitly is not enough since scale can change and it can lead to frequent code-changes/redeployment. Providing an auto-autoscale policy that the orchestrator respects can solve this problem.
Kubernetes HPA (https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) might be suited for such cases and it should be fairly easy to configure and implement. (at least for cpu-based scaling)
Yes, I think it would be great to do this. The place to start is in the "compiler"
https://github.com/metaparticle-io/metaparticle-ast
And then plumb it into the language implementations.
Makes sense, I'll dig more into that repo. Is there any spec for autoscaling? I thought of something like this:
horizontalAutoscalingSpecification:
type: object
required:
- metricName
- targetValue
properties:
metricName:
type: string
metricSource:
type: string
minReplicas:
type: integer
format: int32
maxReplicas:
type: integer
format: int32
targetValue:
type: integer
format: int32
And add it as a property to serviceSpecification.