Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
A cartridge is a pluggable component that can scale with respect to on demand load. Load Balancers are also considered as cartridges in Apache Stratos. This has brought about several advantages which are as follows:
  • 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.

 

Dynamic Load Balancers

Load Balancers can be defined at two different stages.

  • The first stage is when DevOps deploy a cartridge into Apache Stratos, where Load Balancers can be defined for those cartridges. At the latter mentioned stage Load Balancers can be defined based on any one of the following four scenarios:
    1. Default Load Balancers, which provide Load Balancing load balancing by default.

    2. 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.

    3. 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.

    4. Some cartridges may not need to have Load Balancers. This too is supported and can be defined.

  •  The second stage is when the user can request a dedicated Load Balancer for his/her subscription. In this scenario, it will only route traffic to members that belong to a particular subscription.

Load Balancers extension API

Image Modified

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.