[
https://wso2.org/jira/browse/ESBJAVA-439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16009#action_16009
]
indika kumara commented on ESBJAVA-439:
---------------------------------------
I have committed the required implementation and do a simple test using
existing samples.
To test this , need synapse current svn
Note : To work load balancing in a clustered environment , it is mandatory to
give the name of each endpoints (all child endpoints... ).This is need ,
because synapse itself doesn't provide clustering capability and if any
component need to be cluster aware , then all dynamic states of it must keep in
the axis2 configuration context as a property so that those can be replicated
across all instances in a cluster.
The name is needed because it will be the unique id for states of the that
endpoint and it is used for storing and picking up corresponding states from
axis2 configuration context.
To improve performances , each single states is replicated only when it's value
is changed. Therefore , only value with Java primitive types are replicated.
For these , name is mandatory for each child endpoints.
One example for check cluster aware load balancing
<!-- Session less load balancing between 3 endpoints -->
<definitions xmlns="http://ws.apache.org/ns/synapse">
<sequence name="main" onError="errorHandler">
<in>
<send>
<endpoint name="root">
<loadbalance>
<endpoint name="one">
<address
uri="http://localhost:9001/soap/LBService1">
<enableAddressing/>
<suspendDurationOnFailure>60</suspendDurationOnFailure>
</address>
</endpoint>
<endpoint name="two">
<address
uri="http://localhost:9002/soap/LBService1">
<enableAddressing/>
<suspendDurationOnFailure>60</suspendDurationOnFailure>
</address>
</endpoint>
<endpoint name="three">
<address
uri="http://localhost:9003/soap/LBService1">
<enableAddressing/>
<suspendDurationOnFailure>60</suspendDurationOnFailure>
</address>
</endpoint>
</loadbalance>
</endpoint>
</send>
<drop/>
</in>
<out>
<!-- Send the messages where they have been sent (i.e. implicit To
EPR) -->
<send/>
</out>
</sequence>
<sequence name="errorHandler">
<makefault>
<code value="tns:Receiver"
xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/>
<reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/>
</makefault>
<header name="To" action="remove"/>
<property name="RESPONSE" value="true"/>
<send/>
</sequence>
</definitions>
I have checked the load balance with session affinity (sample 54) and it works.
But Needs more testing ... I will do it and resolve this issue at later (as
soon as possible)
Thanks
Indika
> Now with support for clustering, Load balanced endpoints should handle
> sessions with awareness of the cluster
> -------------------------------------------------------------------------------------------------------------
>
> Key: ESBJAVA-439
> URL: https://wso2.org/jira/browse/ESBJAVA-439
> Project: WSO2 ESB
> Issue Type: Improvement
> Affects Versions: 1.6
> Reporter: Asankha Perera
> Assignee: indika kumara
> Fix For: 1.7
>
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://wso2.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
Esb-java-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev