Hi Imesh, Interesting stuff. Maybe we can compare this with the autoscaling functionality of Stratos. We need to decide on the approach we recommend to users with Kubernetes + Stratos.
Thanks. On Sun, Sep 13, 2015 at 12:51 PM, Imesh Gunaratne <im...@apache.org> wrote: > Hi Devs, > > Kubernetes community is now working on implementing $subject. According to > [1] scaling can be done based on Traffic, Predictive Analysis and Arbitrary > Data. > > Autoscaling policies can be defined to configure min/max values. Compared > to the Autoscaling policy we have in Stratos this has been designed in a > generic way to be able to use with different scaling factors [2]. > > Autoscaling algorithm is as follows: > > > *The autoscaler will be implemented as a control loop. It will > periodically (e.g.: every 1 minute) query pods described by > Status.PodSelector of Scale subresource, and check their average CPU or > memory usage from the last 1 minute (there will be API on master for this > purpose, see #11951. Then, it will compare the current CPU or memory > consumption with the Target, and adjust the count of the Scale if needed to > match the target (preserving condition: MinCount <= Count <= MaxCount).* > > *The target number of pods will be calculated from the following formula:* > *TargetNumOfPods =ceil(sum(CurrentPodsConsumption) / Target)* > > > Read following links for more information: > > [1] > https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/autoscaling.md > [2] > https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/horizontal-pod-autoscaler.md > > Thanks > > -- > Imesh Gunaratne > > Senior Technical Lead, WSO2 > Committer & PMC Member, Apache Stratos > -- -- Lahiru Sandaruwan Committer and PMC member, Apache Stratos, Senior Software Engineer, WSO2 Inc., http://wso2.com lean.enterprise.middleware phone: +94773325954 email: lahi...@wso2.com blog: http://lahiruwrites.blogspot.com/ linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146