Hi Folks, There are some limitations in the current load balancer. e.g. if we have 2 identical services in 2 different worker nodes, which are fronted by a synapse load balancer instance. In such a case, we need to provide 4 endpoints in the synapse.xml file. As can be seen, this is not a very scalable solution. Hence, I'm implementing an Intelligent load balancing mechanism where the application members are discovered at runtime, and the endpoint do not need to be statically specified in the synapse.xml file. So the synapse.xml file will simply look like this:
<definitions xmlns="http://ws.apache.org/ns/synapse"> <sequence name="main" onError="errorHandler"> <in> <send> <endpoint> <intelligentLoadbalance/> </endpoint> </send> <drop/> </in> <out> <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> Currently, the application endpoints are calculated by replacing the IP and port of the incoming request with that of the member to which this request will be forwarded to. I have only tested with HTTP/S for the moment. More details about the design can be found here: http://afkham.org/2008/06/fault-resilient-dynamic-load-balancing.html Please provide your valuable feedback on this approach. -- Thanks Afkham Azeez http://afkham.org http://www.wso2.org GPG Fingerprint: 643F C2AF EB78 F886 40C9 B2A2 4AE2 C887 665E 0760
