Load Balancers also scale up or down depending on load.
Capability to integrate many third-party Load Balancers that can scale up or down.
Flexibility of defining Load Balancers at run-time.
Simple scenarios have been used in the following diagram to illustrate Load Balancers as a cartridge. The Load Balancer named “Load Load Balancer - PHP”PHP, is for the PHP service cluster and it has been defined by DevOps while deploying the PHP cartridge. This enables the possibility of defining service level load balancing at runtime. The Load Balancer named “Load Load Balancer 1 - myweb”myweb, has been created because a user has requested for a dedicated Load Balancer for his/her application at the time of subscription. As a result, the Load Balancer named “Load Load Balancer 2 - myweb” myweb has been created. The individual Load Balancers can scale up/down by itself, depending on the policies that have been defined.
Load Balancers can be defined at two different stages.
Default Load Balancers, which provide Load Balancing load balancing by default.
Dedicated Load Balancers for the cartridge. For example, if DevOps is going to deploy a PHP cartridge, and they require a separate Load Balancer for their PHP cluster, then they can define the required Load Balancer in the cartridge definition.
Using the existing Load Balancers. For example, if DevOps want to add a MySQL cartridge and they want to use the same Load Balancer that is serving the PHP cartridge.
Some cartridges may not need to have Load Balancers. This too is supported and can be defined.
As all the member information is within the Topology topic, it is very easy to add other Load Balancers to Apache Stratos. The extension API provide an interface that could be implemented for a given Load Balancer in order to get access to the updated configuration events via the Message Broker using the required Topology information. The extension API will also provide interface methods for publishing Load Balancing statistics to the Complex Event Processor (CEP), which is used in Auto-scaling decisions. HAProxy has been integrated with Apache Stratos architecture, as a reference to Load Balancers extension API.