stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sajith Kariyawasam <saj...@wso2.com>
Subject Two LB instances spawned for default.load.balancer=true
Date Fri, 21 Mar 2014 18:57:59 GMT
Hi all,

I have php cartridge's load balancer properties are as below..

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


I subscribed to a PHP twice, with two different aliases using the same
tenant. For second subscription also I got an LB instance spawned, which is
wrong according to the default load balancer category.

Further looking into this, I could see in logs there are two LB clusters
are created

TID: [0] [SCC] [2014-03-21 22:53:34,937]  INFO
{org.apache.stratos.messaging.message.processor.topology.ClusterCreatedMessageProcessor}
-  Cluster created: Cluster [serviceName=lb,
clusterId=lblb-1165195435.lb.domain,
autoscalePolicyName=simpleAutoscalePolicy,
deploymentPolicyName=economyDeploymentPolicy, hostNames=[
lblb-1165195435.apachestratos.org], tenantRange=null, isLbCluster=true,
properties={load.balancer.ref=default.load.balancer, load.balancer=true}]
{org.apache.stratos.messaging.message.processor.topology.ClusterCreatedMessageProcessor}

TID: [0] [SCC] [2014-03-21 23:14:24,169]  INFO
{org.apache.stratos.messaging.message.processor.topology.ClusterCreatedMessageProcessor}
-  Cluster created: Cluster [serviceName=lb,
clusterId=lblb-1683889708.lb.domain,
autoscalePolicyName=simpleAutoscalePolicy,
deploymentPolicyName=economyDeploymentPolicy, hostNames=[
lblb-1683889708.apachestratos.org], tenantRange=null, isLbCluster=false,
properties={}]
{org.apache.stratos.messaging.message.processor.topology.ClusterCreatedMessageProcessor}


Seems that ApplicationManagementUtil's registerService method shouldn't
have invoked for the 2nd subscription, because that will create a new
cluster, or else should we avoid subsribeToLB completely ?
as in CartridgeSubscriptionManager's
          *lbCartridgeSubscription = subscribeToLB (subscriptionData,
lbDataCtxt, cartridgeInfo);*

Thoughts please..

Thanks,
Sajith


-- 
*Sajith Kariyawasam*
*Senior Software Engineer; WSO2, Inc.*
*AMIE (SL)*
*Blog: http://sajithblogs.blogspot.com/ <http://sajithblogs.blogspot.com/>*
*Mobile: +94772269575*

Mime
View raw message