You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Reka Thirunavukkarasu <re...@wso2.com> on 2014/01/17 10:31:48 UTC

Adding subsequent members after first member become Activated in LB using MemberActivatedEvent

Hi Imesh,

Have we done $subject in the load balancher? Or are we adding the members
to load balancher in a different manner?

As i checked the code
org.apache.stratos.load.balancer.LoadBalancerTopologyReceiver does add the
cluster to Load Balancher when the first member gets activated. After that
when a second or the next member gets activated, how will the load
balancher knows about the member in order to route the request to any of
the member in the cluster?

Thanks,
Reka

-- 
Reka Thirunavukkarasu
Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007

Re: Adding subsequent members after first member become Activated in LB using MemberActivatedEvent

Posted by Reka Thirunavukkarasu <re...@wso2.com>.
Thanks Imesh for the brief. Sorry..I missed the point that TopologyManager
will build the complete topology from each events it received. Now it is
clear.

Thanks,
Reka


On Sun, Jan 19, 2014 at 8:33 PM, Imesh Gunaratne <im...@apache.org> wrote:

> Hi Reka,
>
> I'm sorry for the confusion, this is how it works:
>
> 1. TopologyManager builds the topology data structure irrespective of the
> logic in the LoadBalancerTopologyReceiver. Which means TopologyManager has
> the complete topology model (Service -> Clusters -> Members) built after
> applying message filters.
> 2. We have used LoadBalancerTopologyReceiver to build the cluster maps in
> LoadBalancerContext.
> Here what we do is we store references to Cluster objects found in
> TopologyManager in LoadBalancerContext for faster access.
> 4. Since we use references to existing data model we do not need to copy
> the Members. They are automatically referenced.
>
> Does this answer your question?
>
> Thanks
>  Imesh
>
>
> On Fri, Jan 17, 2014 at 4:31 AM, Reka Thirunavukkarasu <re...@wso2.com>wrote:
>
>> Hi Imesh,
>>
>> Have we done $subject in the load balancher? Or are we adding the members
>> to load balancher in a different manner?
>>
>> As i checked the code
>> org.apache.stratos.load.balancer.LoadBalancerTopologyReceiver does add the
>> cluster to Load Balancher when the first member gets activated. After that
>> when a second or the next member gets activated, how will the load
>> balancher knows about the member in order to route the request to any of
>> the member in the cluster?
>>
>> Thanks,
>> Reka
>>
>> --
>> Reka Thirunavukkarasu
>> Software Engineer,
>> WSO2, Inc.:http://wso2.com,
>> Mobile: +94776442007
>>
>>
>>
>


-- 
Reka Thirunavukkarasu
Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007

Re: Adding subsequent members after first member become Activated in LB using MemberActivatedEvent

Posted by Imesh Gunaratne <im...@apache.org>.
Hi Reka,

I'm sorry for the confusion, this is how it works:

1. TopologyManager builds the topology data structure irrespective of the
logic in the LoadBalancerTopologyReceiver. Which means TopologyManager has
the complete topology model (Service -> Clusters -> Members) built after
applying message filters.
2. We have used LoadBalancerTopologyReceiver to build the cluster maps in
LoadBalancerContext.
Here what we do is we store references to Cluster objects found in
TopologyManager in LoadBalancerContext for faster access.
4. Since we use references to existing data model we do not need to copy
the Members. They are automatically referenced.

Does this answer your question?

Thanks
Imesh


On Fri, Jan 17, 2014 at 4:31 AM, Reka Thirunavukkarasu <re...@wso2.com>wrote:

> Hi Imesh,
>
> Have we done $subject in the load balancher? Or are we adding the members
> to load balancher in a different manner?
>
> As i checked the code
> org.apache.stratos.load.balancer.LoadBalancerTopologyReceiver does add the
> cluster to Load Balancher when the first member gets activated. After that
> when a second or the next member gets activated, how will the load
> balancher knows about the member in order to route the request to any of
> the member in the cluster?
>
> Thanks,
> Reka
>
> --
> Reka Thirunavukkarasu
> Software Engineer,
> WSO2, Inc.:http://wso2.com,
> Mobile: +94776442007
>
>
>