stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Imesh Gunaratne <im...@apache.org>
Subject Re: Load Balancer Extension API & HAProxy Reference Implementation
Date Fri, 15 Nov 2013 04:38:33 GMT
Hi Reka,

Yes we have now added an extension point to publish statistics to CEP
in Load Balancer Extension API and currently working on its implementation
for HAProxy.

Exactly, that's the ultimate goal. We will be introducing a feature to
configure the load balancers for Service Aware & Subscription Aware load
balancing.

Thanks
Imesh






On Thu, Nov 14, 2013 at 10:38 PM, Reka Thirunavukkarasu <reka@wso2.com>wrote:

> Hi
>
> Do we have extension point to publish the stats to Complex Event
> Processing Engine in this extension?
>
> In the case of using Apache stratos ELB and HAProxy at once place, then
> both of them will try to add all the members, since both are subscribed to
> the same Topology. So, it would be good that if we could configure service
> aware or cluster aware LB's when we have more than one type of LB's with
> our stratos. So that each LB will add there own members only and also they
> can easily drop messages from other services or clusters.
>
> Thanks,
> Reka
>
>
> On Thu, Nov 14, 2013 at 2:42 AM, Imesh Gunaratne <imesh@apache.org> wrote:
>
>> Great! A good finding Nirmal. Yes it seems to be an issue. I will fix it
>> asap.
>>
>> Thanks!
>> Imesh
>>
>>
>> On Thu, Nov 14, 2013 at 2:21 PM, Imesh Gunaratne <
>> imesh.gunaratne@gmail.com> wrote:
>>
>>> Great! A good finding Nirmal. Yes it seems to be an issue. I will fix it
>>> asap.
>>>
>>> Thanks!
>>>
>>>
>>> On Thu, Nov 14, 2013 at 12:08 PM, Nirmal Fernando <
>>> nirmal070125@gmail.com> wrote:
>>>
>>>> Ok, after going through the code, I've understood the missing pieces.
>>>>
>>>> +1 for the approach, looks good.
>>>>
>>>> However at [1], AFAIU loadbancer.start() would call for each complete
>>>> topology it receives, isn't it? (If so, it's a bug).
>>>>
>>>> [1]
>>>> https://git-wip-us.apache.org/repos/asf?p=incubator-stratos.git;a=blob;f=components/org.apache.stratos.load.balancer.extension.api/src/main/java/org/apache/stratos/load/balancer/extension/api/LoadBalancerExtension.java;h=e3c19df496d4bb48eee59642622a2c48588ff713;hb=HEAD
>>>>
>>>>
>>>> On Thu, Nov 14, 2013 at 9:43 AM, Nirmal Fernando <
>>>> nirmal070125@gmail.com> wrote:
>>>>
>>>>> Imesh,
>>>>>
>>>>> thanks for the information, but I'm sorry, I'm confused here.
>>>>>
>>>>> How would this work when LB is a Cartridge? Who is responsible for
>>>>> loading these extensions?
>>>>>
>>>>>
>>>>> On Wed, Nov 13, 2013 at 12:02 PM, Imesh Gunaratne <imesh@apache.org>wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> This is a brief introduction to Load Balancer Extension API and its
>>>>>> reference implementation for HAProxy.
>>>>>>
>>>>>> The following figure illustrates the Load Balancer Interface which
>>>>>> needs to be implemented for a given load balancer to manage its life-cycle.
>>>>>> Please refer the method comments for details:
>>>>>>
>>>>>> [image: Inline image 2]
>>>>>>
>>>>>> HAProxy implementation of the above interface could be found at:
>>>>>>
>>>>>> https://git-wip-us.apache.org/repos/asf?p=incubator-stratos.git;a=blob;f=extensions/load-balancer/haproxy-extension/src/main/java/org/apache/stratos/haproxy/extension/HAProxy.java;h=cdb8bd36a0ab151b0239d86ccefbc77804777eb8;hb=HEAD
>>>>>>
>>>>>>
>>>>>> The following class: LoadBalancerExtension has been used to execute
>>>>>> the life-cycle of the load balancer.
>>>>>>
>>>>>> Work-Flow:
>>>>>> 1. Wait for the complete topology event. This will initialize the
>>>>>> local topology data structure once the event is received.
>>>>>> 2. Configure and start the load balancer: Invokes
>>>>>> LoadBalancer.configure() and LoadBalancer.start()
>>>>>> 3. Listen to Topology Update Events which update load balancer
>>>>>> configuration.
>>>>>> 4. Once an event is received, reload load balancer configuration:
>>>>>> Invokes LoadBalancer.reload()
>>>>>> 5. When the extension is stopped LoadBalancer.stop() will be invoked.
>>>>>>
>>>>>>
>>>>>> [image: Inline image 1]
>>>>>>
>>>>>>
>>>>>> Thanks
>>>>>> Imesh
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best Regards,
>>>>> Nirmal
>>>>>
>>>>> Nirmal Fernando.
>>>>> PPMC Member & Committer of Apache Stratos,
>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>
>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Best Regards,
>>>> Nirmal
>>>>
>>>> Nirmal Fernando.
>>>> PPMC Member & Committer of Apache Stratos,
>>>> Senior Software Engineer, WSO2 Inc.
>>>>
>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>
>>>
>>>
>>
>
>
> --
> Reka Thirunavukkarasu
> Software Engineer,
> WSO2, Inc.:http://wso2.com,
> Mobile: +94776442007
>
>
>

Mime
View raw message