Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] Add support for HPA? #95

Open
Yshayy opened this issue Feb 11, 2018 · 2 comments
Open

[Suggestion] Add support for HPA? #95

Yshayy opened this issue Feb 11, 2018 · 2 comments

Comments

@Yshayy
Copy link

Yshayy commented Feb 11, 2018

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 Yshayy changed the title Add support for HPA? [Suggestion] Add support for HPA? Feb 11, 2018
@brendandburns
Copy link
Contributor

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.

@Yshayy
Copy link
Author

Yshayy commented Feb 15, 2018

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.

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

No branches or pull requests

2 participants