All,

Here's a sample Cartridge definition [1]. Note the loadbalancer section,
where you add a reference to an existing load balancer. You can have any
one of following properties there;

*"service.aware.load.balancer" : (true|false)* - If 'true' you will get a
dedicated load balancer in each network bounded partition for your
cartridge.

*"default.load.balancer" : (true|false)* - Each network bounded partition
will get a default load balancer.

*"no.load.balancer" : (true|false) *: Instances of this cartridge would not
join to any load balancer.

*"existing.load.balancers" : (<set of existing LB cluster ids>)* : You
specify set of existing lb cluster ids, and instances of this Cartridge
would join to those.

Also, Auto-scaler would derived the lb cluster ids (based on above
properties) that the member should join when it decides to start a new
member, and that is passed to the Cartridge instance via payload by Cloud
Controller. When the member is activated, it advertizes the lb cluster ids
it could join and LBs would pick the member if it's belong to respective LB
cluster.

Let me know your thoughts.

[1]

{ "cartridgeDefinitionBean": {
      "type": "php",
      "provider": "apache",
      "displayName": "PHP",
      "description": "PHP Cartridge",
      "version": "7",
      "multiTenant": "false",
      "portMapping": [
         {
            "protocol": "http",
            "port": "80",
            "proxyPort": "8280"
         },
         {
            "protocol": "https",
            "port": "443",
            "proxyPort": "8243"
         }
       ],
      "deployment": {
        },
       "iaasProvider": [
        {
          "type": "ec2",
          "imageId": "ap-southeast-1/ami-b6aefae4",
          "maxInstanceLimit": "4",
          "property": [
            {
             "name": "instanceType",
             "value": "m1.medium"
            }
          ]
        }
      ],






*"loadBalancer": {        "type": "lb",        "property": {
"name": "default.load.balancer",            "value": "true"        }      }*
,
      "property": [

      ]
    }
 }

-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Reply via email to