Load Balancing Weighted algorithm issue

Hi Team,

We have seen some issues with load balancing in apigee. Traffic is only getting directed/routing to only one target server(target-lb1) and not going at all to other target server(target-lb2) (southbound (MP-->target)). please find the below load balancing configuration. All the target servers are healthy <LoadBalancer> <Algorithm>Weighted</Algorithm> <Server name="target-lb1"> <Weight>1</Weight> </Server> <Server name="target-lb2"> <Weight>1</Weight> </Server> </LoadBalancer> Is there anything that i am missing or doing wrong from my end Thanks In Advacne,
0 3 469
3 REPLIES 3

Not applicable

your configuration looks good. If the traffic is not going to both means at some point the other one responded error and then it expects to redeploy to make it back to flow if the monitoring is not configured.

I would suggest adding monitoring and <MaxFailures>5</MaxFailures> as well.

refer: use below was reference

<TargetEndpoint name="default">
  <HTTPTargetConnection>
      <LoadBalancer>
        <Algorithm>RoundRobin</Algorithm>
        <Server name="target1" />
        <Server name="target2" />
        <MaxFailures>5</MaxFailures>
      </LoadBalancer>
      <Path>/test</Path>
      <HealthMonitor>
        <IsEnabled>true</IsEnabled>
        <IntervalInSec>5</IntervalInSec>
        <TCPMonitor>
            <ConnectTimeoutInSec>10</ConnectTimeoutInSec>
            <Port>80</Port>
        </TCPMonitor>
      </HealthMonitor>
  </HTTPTargetConnection>

Thanks, Monitoring is already in place as part of load balancing configuration.

<HealthMonitor> <IsEnabled>true</IsEnabled> <IntervalInSec>5</IntervalInSec> <HTTPMonitor> <Request> <ConnectTimeoutInSec>2</ConnectTimeoutInSec> <SocketReadTimeoutInSec>5</SocketReadTimeoutInSec> <Port>443</Port> <Verb>GET</Verb> <Path>/</Path> </Request> <SuccessResponse> <ResponseCode>200</ResponseCode> </SuccessResponse> </HTTPMonitor> </HealthMonitor> <Properties> <Property name="success.codes">1xx,2xx,3xx,4xx</Property> </Properties>

<MaxFailures>5</MaxFailures>

This is missing i think

Please try also undeploy and redeploy the proxy.