Hi Zhang, Welcome to the Stratos community!
There are several tasks (based on Drools rules engine) that run in the background to take scaling decisions. You can find those Drools files at [1]. mincheck.drl - is responsible for spawning minimum number of instances defined in the cartridge definition. It will make sure at least minimum number of instances are available at all times. scaling.drl - is responsible for scaling up or down, based on RIF (Request In-Flight), memory consumption, load average values, up to max count defined in the cartridge definition. It also takes into account the max number defined in the network partition definition. The reason for having Drools files is that you can plugin your own scaling logic into Stratos without modifying the code. [1] https://github.com/apache/stratos/tree/stratos-4.1.x/products/stratos/modules/distribution/src/main/conf/drools Thanks. On Wed, Nov 18, 2015 at 12:31 AM, Fan ZHANG <zf19830...@gmail.com> wrote: > To whom it may concern, > > I am new and a big fan in the Apache Stratos community. Just downloaded > the source code and learning it. I found it supports various ways to define > scaling policy, application policy, etc., but I can't find anywhere in the > code base that actually does the scaling action. For example, calculating > the CPU or memory usage, calculating how busy a machine or container is, > and based off of this observation to scale a cluster by adding/removing > members. If I didn't miss anything, would you mind pointing me to the code > base? > > Thanks. > > -- > Best Regards, > Fan > -- Akila Ravihansa Perera WSO2 Inc.; http://wso2.com/ Blog: http://ravihansa3000.blogspot.com