Unknown macro: {next_previous_link3}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The Dynamic Load-balance Endpoint is an endpoint that distributes its messages (load) among application members by evaluating the load-balancing policy and any other relevant parameters. These application members will be discovered using the membershipHandler class, which generally uses a group communication mechanism to discover the application members. The class attribute of the membershipHandler element should be an implementation of org.apache.synapse.core.LoadBalanceMembershipHandler. You can specify membershipHandler properties using the property elements. The policy attribute of the dynamicLoadbalance element specifies the load-balancing policy (algorithm) to be used for selecting the next member that will receive the message.

Currently only the roundRobin policy is supported.

The failover attribute determines if the next member should be selected once the currently selected member has failed and defaults to true.

Dynamic Load-balance Endpoint Configuration

Click Source View under Service Bus in the Main  tab of the ESB management console to add a dynamic load balance endpoint. The syntax is as follows.

<dynamicLoadBalance [policy="roundRobin"] [failover="true|false"]>
    <membershipHandler class="impl of org.apache.synapse.core.LoadBalanceMembershipHandler">
      <property name="name" value="value"/>
    </membershipHandler>
  </dynamicLoadBalance>

See Sample 57: Dynamic Load Balancing between Three Nodes for an example.

 

  • No labels