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

support cron + metric based hpa #1

Open
juliantaylor opened this issue Jan 17, 2020 · 1 comment
Open

support cron + metric based hpa #1

juliantaylor opened this issue Jan 17, 2020 · 1 comment

Comments

@juliantaylor
Copy link

juliantaylor commented Jan 17, 2020

The cron hpa is useful for some cases but it lacks the ability to scale deployments higher than the configured target replica count based on metrics like cpu and memory usage.
Using it together with the k8s horizontalpodautoscaler which does that probably produces conflicts as two operators update the same spec.

The purely metric based hpa can be insufficient when the scaling is to slow to react to predictable usage peaks.

To solve this there are two ways:
write your own custom time based metrics and munge them with the normal cpu and memory metrics to get them to scale preemptively.
This requires implementing this munging and have a cluster which support custom metrics to begin with.

The second much easier approach which imo could be added to this project is to combine both hpa objects the cron object and the horizontalautoscaler object into one object.
So you define your metrics on which to autoscale and define time periods where there must be a minimum amount of replicas available.
That way you get the effect of cronhpa and retain the metric based autoscaling should the load be unexpectedly high.

This could be implemented by this operator simply creating and managing the normal k8s autoscaler objects based on its own crd.
So you still just deploy the combined cronhpa object and the operator will create at the right times the right horizontalautoscaler object with an timescale appropriate minimum and maximum replica spec.

@hex108
Copy link
Contributor

hex108 commented Feb 7, 2020

Thanks @juliantaylor for the suggestions! Sorry for later reply.

Yes, we plan to support it in the second way you suggested. It would be very appreciative if you are interested in it.

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