Autoscaler takes into account multiple factors; while, also integrating both real-time and rule-based decisions when making scaling decisions. Thereby, this is useful in order to make elasticity decisions in a more accurate and granular manner. The multi-factored auto-scaling process that takes place in Private PaaS has been illustrated in the diagram below:
A Health Publisher is included in each cartridge and it publishes health statistics of each cartridge such as load average of an instance, memory consumption and in-flight request count . Private PaaS uses WSO2 Complex Event Processor (CEP) as its real-time processing engine. Data is published to the real-time processing engine using the Thrift protocol. Load Balancer also publishers statistics (e.g., the failed message count for a particular cluster, serving request count for that cluster and more) to CEP.
CEP will analyze all the data in real-time and publish the respective summarized health stats events, which include the gradients, second derivative and the average of each factor, to the Summarized Health Stats topic in the Message Broker. The following are the summarized health stats events that are sent to the Summarized Health Stats topic:
- Average Load Average Event
- Average Memory Consumption Event
- Average Requests In-flight Event
- Gradient of Load Average Event
- Gradient of Memory Consumption Event
- Gradient of Requests In-flight Event
- Second Derivative of Load Average Event
- Second Derivative of Memory Consumption Event
- Second Derivative of Requests In-flight Event
- Member fault event - This event notifies potential faulty members.
Autoscaler will subscribe to the Summarized Health Stats topic in the Message Broker and receive the latter mentioned summarized health stats events. Thereafter, Autoscaler will use the Drools engine, which is a rule engine, to analyze the summarized health statistics, in order to decide when to scale up or down in a particular cluster. Autoscaler will send its decision to Cloud Controller (CC). In turn, Cloud Controller will act on the Autoscaler decision and create or terminate instances. For more information on Auto-scaling workflows, see Auto-scaling Workflows.