package icon indicating copy to clipboard operation
package copied to clipboard

[Suggestion] Add support for HPA?

Open Yshayy opened this issue 7 years ago • 2 comments

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)

Yshayy avatar Feb 11 '18 09:02 Yshayy

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.

brendandburns avatar Feb 13 '18 06:02 brendandburns

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.

Yshayy avatar Feb 15 '18 11:02 Yshayy