Hi, I have completed the synapse loadbalancing and failover implementation with the addition of session affinity based load balancing.
So in addition to the loadbalancing syntax mentioned the configuration language, load balancing endpoints can have a element named <session type="soap | http | simpleClientSession"/>. The type attribute specifies the session type, to which the load balancing endpoints should be bound. Currently it supports 3 session types as noted above. 1) SOAP sessions based on the service group ID 2) HTTP sessions based on HTTP cookies 3) simpleClientSession based on a SOAP header named "ClientID" set by the client. This is added to demonstrate that loadbalancing logic can bind sessions based on the content of the messages sent by the client. I have also added some samples to demonstrate this new functionality. Sample 200 (synapse_sample_200.xml): configuration for simple load balancing. Sample 201: configuration for failover sending Sample 202: configuration for simpleClientSession based load balancing Sample 203: configuration for simpleClientSession based load balancing with failover Sample 204: configuration for HTTP session based load balancing Sample 205: configuration for HTTP session based load balancing with failover To get a quick feeling of the new functionality, start synapse with one of the above sample configurations and run either simple client or multi threaded client pointing to synapse. Below is a complete procedure for one scenario. Extract synapse-1.0-RC1-SNAPSHOT-bin.tar.gz to a directory. Go to synapse-1.0-RC1-SNAPSHOT/bin directory and run "sh synapse.sh -sample 200" Go to synapse-1.0-RC1-SNAPSHOT/samples/axis2Server/src/LoadbalanceFailoverService directory and run "ant" to build neccessary services. Open synapse-1.0-RC1-SNAPSHOT/samples/axis2Server directory in a seperate terminal and run "sh axis2server.sh -http 9001 -https 9005 -name Server1" This will start a server on http port 9001 and gives it the name Server1 Similarly open two another terminals and run servers using sh axis2server.sh -http 9002 -https 9006 -name Server2 sh axis2server.sh -http 9003 -https 9007 -name Server3 Now go to the synapse-1.0-RC1-SNAPSHOT/samples/axis2Client directory and run "ant loadbalancefailover" You can see how requests are distributed between Server1, Server2 and Server3. The multi threaded client can be used to run clients in multiple threads pointing to the same EPR (e.g. Synapse or Axis2 Server). So it can be used to compare the performance advantage of using the synapse load balancing over directly invoking Axis2 server. I will update the synapse samples documentation with the details of these. Hope you will try this functionality and give ideas for improvement. Thanks, Chathura
