Return-Path: Delivered-To: apmail-synapse-dev-archive@www.apache.org Received: (qmail 68781 invoked from network); 1 Nov 2008 07:10:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Nov 2008 07:10:15 -0000 Received: (qmail 28237 invoked by uid 500); 1 Nov 2008 07:10:20 -0000 Delivered-To: apmail-synapse-dev-archive@synapse.apache.org Received: (qmail 28202 invoked by uid 500); 1 Nov 2008 07:10:20 -0000 Mailing-List: contact dev-help@synapse.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@synapse.apache.org Delivered-To: mailing list dev@synapse.apache.org Received: (qmail 28191 invoked by uid 99); 1 Nov 2008 07:10:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Nov 2008 00:10:20 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of afkham@gmail.com designates 64.233.170.187 as permitted sender) Received: from [64.233.170.187] (HELO rn-out-0910.google.com) (64.233.170.187) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Nov 2008 07:09:05 +0000 Received: by rn-out-0910.google.com with SMTP id j40so1421628rnf.16 for ; Sat, 01 Nov 2008 00:09:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=luvM95x42MiLu1FfjHmCj9lLXAelSJnym8Ac2yKjN6U=; b=v6kRbhjIiPjupruMevkai8BkJs3sE1h65hdQmV7LW1VNndc904bdtMAboL66pEj3Dh VtIJEMCJQaZJpZwjYRe/v7PKoPS4C2Xr1umqbhqv33DmPIqfS0mNVwGmMVvNse5s5MZU dmtFk6IdAIa0N40IBFpsKtnyniyZZY6u476Z4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=TJPEszeA0LtISZAZe6J1+mclTVak6qP6Ri5dp7JU04OEC89OO2VfHnSBWT9KF+6Uwb w2kvzWxIVo1Cv6qbT4v/Ew2U/d+5o3OXXLD2FTvUAyB62sEXf9mKDzUgQnc8SW4tXdLa +7xNgYYYpCW6P2TtHTCeliH2n6UDWyvHGY/Lk= Received: by 10.100.136.18 with SMTP id j18mr2048302and.103.1225523375832; Sat, 01 Nov 2008 00:09:35 -0700 (PDT) Received: by 10.100.211.13 with HTTP; Sat, 1 Nov 2008 00:09:35 -0700 (PDT) Message-ID: <9b85c45f0811010009i33a254a6rf15457355f132454@mail.gmail.com> Date: Sat, 1 Nov 2008 12:39:35 +0530 From: "Afkham Azeez" To: dev@synapse.apache.org Subject: Re: Synapse Dynamic Load Balancer In-Reply-To: <558af1840810262322w78e0f079v704e182bf29b0bc3@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_67630_15320346.1225523375842" References: <558af1840810262322w78e0f079v704e182bf29b0bc3@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_67630_15320346.1225523375842 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Please see my answers inline On Mon, Oct 27, 2008 at 11:52 AM, Hiranya Jayathilaka wrote: > Hi Folks, > > I'm doing some R&D work on dynamic load balancing. While studying the > dynamic load balancing features of Synapse I came across a few questions. > Please help me to get these clarified. > > 1. How would the synapse configuration look like for a dynamic load balance > scenario with multiple clustering groups/domains? The DynamicLoadBalance endpoint will not be aware about the multiple groups. It is the load balance algorithm that should look at the requested URL or addressing headers and decide where to send the message to. i.e. to which member in which group. So you will need to implement a group aware load balancing algorithm > > > 2. Axis2LoadBalanceMembershipHandler can store only one application domain > value. Does that mean it cannot deal with multiple domains? In that case how > does Synapse deals with multiple clustering domains? > I can change this to handle all groups, and the member will have a group attribute. Depending on the group of each member, the load balancing algorithm will categorize the members. This can be used to calculate where the message needs to be sent to. It is the LoadBalanceMembershipHandler that bridges Synpase & the underlying group communications framework's membership mechanism. To bridge with Axis2, we have used Axis2LoadBalanceMembershipHandler. To bridge with some other system, we will need to implement another LoadBalanceMembershipHandler. It should also be possible to define MembershipHandlers at the Synapse level for different groups. I haven't tried this though. e.g in the synapse.xml, > > 3. It seems adding and removing nodes to a cluster under a particular > domain is handled by the LoadBalanceEventHandler. Am I correct? > It is through the LoadBalanceEventHandler that the Axis2 group communications mechanism informs interested parties about membership changes in each group. This is independent of Synapse. We can have multiple of these for each domain. e.g. in the axis2.xml, > 4. In case of the DefaultLoadBalanceEventHandler who notifies the class > when members are needed to be added or removed? In other words who is > responsible for firing off the events? Is this taken care of by the Axis2 > ClusterManager? > DefaultLoadBalanceEventHandler is notified by the relevant Axis2 membership manager when membership changes take place. This is independent of Synapse. > > > Thanks > > Best Regards, > Hiranya > -- Thanks Afkham Azeez Blog: http://afkham.org Developer Portal: http://www.wso2.org WSAS Blog: http://wso2wsas.blogspot.com Company: http://wso2.com GPG Fingerprint: 643F C2AF EB78 F886 40C9 B2A2 4AE2 C887 665E 0760 ------=_Part_67630_15320346.1225523375842 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Please see my answers inline

On Mon, Oct 27, 2008 at 11:52 AM, Hiranya Jayathilaka <hiranya911@gmail.com> wrote:
Hi Folks,

I'm doing some R&D work on dynamic load balancing. While studying the dynamic load balancing features of Synapse I came across a few questions. Please help me to get these clarified.

1. How would the synapse configuration look like for a dynamic load balance scenario with multiple clustering groups/domains?

The DynamicLoadBalance endpoint will not be aware about the multiple groups. It is the load balance algorithm that should look at the requested URL or addressing headers and decide where to send the message to. i.e. to which member in which group. So you will need to implement a group aware load balancing algorithm


2. Axis2LoadBalanceMembershipHandler can store only one application domain value. Does that mean it cannot deal with multiple domains? In that case how does Synapse deals with multiple clustering domains?

I can change this to handle all groups, and the member will have a group attribute. Depending on the group of each member, the load balancing algorithm will categorize the members. This can be used to calculate where the message needs to be sent to. It is the LoadBalanceMembershipHandler that bridges Synpase & the underlying group communications framework's membership mechanism. To bridge with Axis2, we have used Axis2LoadBalanceMembershipHandler. To bridge with some other system, we will need to implement another LoadBalanceMembershipHandler.

It should also be possible to define MembershipHandlers at the Synapse level for different groups. I haven't tried this though. e.g in the synapse.xml,

          <send>
                <endpoint name="dynamicLB">
                    <dynamicLoadbalance failover="true"
                                        algorithm="org.apache.synapse.endpoints.algorithms.RoundRobin">
                        <membershipHandler
                                class="org.apache.synapse.core.axis2.Axis2LoadBalanceMembershipHandler">
                            <property name="applicationDomain" value="apache.axis2.app.domain1"/>
                        </membershipHandler>
                        <membershipHandler
                                class="org.apache.synapse.core.axis2.Axis2LoadBalanceMembershipHandler">
                            <property name="applicationDomain" value="apache.axis2.app.domain2"/>
                        </membershipHandler>
                    </dynamicLoadbalance>
                </endpoint>
            </send>


3. It seems adding and removing nodes to a cluster under a particular domain is handled by the LoadBalanceEventHandler. Am I correct?

It is through the  LoadBalanceEventHandler that the Axis2 group communications mechanism informs interested parties about membership changes in each group. This is independent of Synapse. We can have multiple of these for each domain. e.g. in the axis2.xml,

      <loadBalancer enable="true">
            <applicationDomain name="apache.axis2.app.domain1"
                               handler="org.apache.axis2.clustering.DefaultLoadBalanceEventHandler"/>
           <applicationDomain name="apache.axis2.app.domain2"
                               handler="org.apache.axis2.clustering.DefaultLoadBalanceEventHandler"/>
        </loadBalancer>


4. In case of the DefaultLoadBalanceEventHandler who notifies the class when members are needed to be added or removed? In other words who is responsible for firing off the events? Is this taken care of by the Axis2 ClusterManager?

 DefaultLoadBalanceEventHandler is notified by the relevant Axis2 membership manager when membership changes take place. This is independent of Synapse.


Thanks

Best Regards,
Hiranya



--
Thanks
Afkham Azeez

Blog: http://afkham.org
Developer Portal: http://www.wso2.org
WSAS Blog: http://wso2wsas.blogspot.com
Company: http://wso2.com
GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760
------=_Part_67630_15320346.1225523375842--