user3129056
user3129056

Reputation: 447

Load Balancing endpoint in wso2esb 4.7.0

I'm using wso2esb 4.7.0 and wso2dss 3.0.0. Their are multiple services on server i wish to use load balancing endpoint.For that i went through documents.I have cleared my concept but in littlebit confusion that how to implement that in actual proxy service.I have created a load balance endpoint as :

<endpoint xmlns="http://ws.apache.org/ns/synapse" name="TestAddressEndpoint">
   <session type="http">
      <sessionTimeout>0</sessionTimeout>
   </session>
   <loadbalance algorithm="org.apache.synapse.endpoints.algorithms.RoundRobin">
      <endpoint name="Addressdetail_endp">
         <address uri="http://localhost:9764/services/maddress_Dataservice/">
            <suspendOnFailure>
               <progressionFactor>1.0</progressionFactor>
            </suspendOnFailure>
            <markForSuspension>
               <retriesBeforeSuspension>0</retriesBeforeSuspension>
               <retryDelay>0</retryDelay>
            </markForSuspension>
         </address>
      </endpoint>
      <endpoint name="Addressdetail_endp2.0">
         <address uri="http://localhost:9764/services/maddress_Dataservice2.0/">
            <suspendOnFailure>
               <progressionFactor>1.0</progressionFactor>
            </suspendOnFailure>
            <markForSuspension>
               <retriesBeforeSuspension>0</retriesBeforeSuspension>
               <retryDelay>0</retryDelay>
            </markForSuspension>
         </address>
      </endpoint>
      <endpoint name="Addressdetail_endp3.0">
         <address uri="http://localhost:9764/services/maddress_Dataservice3.0/">
            <suspendOnFailure>
               <progressionFactor>1.0</progressionFactor>
            </suspendOnFailure>
            <markForSuspension>
               <retriesBeforeSuspension>0</retriesBeforeSuspension>
               <retryDelay>0</retryDelay>
            </markForSuspension>
         </address>
      </endpoint>
   </loadbalance>
</endpoint>

Now i wanted to ask that how can i used this endpoint in actual proxy service? Should i make changes in axis2.xml file?

Upvotes: 0

Views: 159

Answers (1)

Sumedha Kodithuwakku
Sumedha Kodithuwakku

Reputation: 612

Have a look at this sample. Or else if you can refer to a saved endpoint as below;

<target endpoint="TestAddressEndpoint"/>

Using this is a proxy service;

<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="MyProxy"
       transports="https,http"
       statistics="disable"
       trace="disable"
       startOnLoad="true">
   <target endpoint="TestAddressEndpoint"/>
   <description/>
   ...
</proxy>

Upvotes: 1

Related Questions