synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Afkham Azeez" <>
Subject Re: Synapse Dynamic Load Balancer
Date Sat, 01 Nov 2008 07:09:35 GMT
Please see my answers inline

On Mon, Oct 27, 2008 at 11:52 AM, Hiranya Jayathilaka

> 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,

                <endpoint name="dynamicLB">
                    <dynamicLoadbalance failover="true"


                            <property name="applicationDomain"

                            <property name="applicationDomain"


> 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=""

           <applicationDomain name=""


> 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

Afkham Azeez

Developer Portal:
WSAS Blog:
GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760

View raw message