Load Balancing

Hi I am facing an issue with Load Balancing in the target server.

Load balancing between two targets servers is working fine from Main Proxy, but when I intentionally bring down one target down(target1), requests are getting redirected to target2. But when the target1 is brought back redirects are not happening to target1 even though target1 is back and running. Included <HealthMonitor> as well.

But When I redeploy the main Proxy request's are shared between Target1 and Target2. Am I missing something here?

Below is the HTTPTargetConnection code snippet

<HTTPTargetConnection> 
  <Properties> 
    <Property name="connect.timeout.millis">60000</Property> 
  </Properties> 
  <SSLInfo> 
    <Enabled>true</Enabled> 
  </SSLInfo> 
  <LoadBalancer> 
    <Algorithm>RoundRobin</Algorithm> 
    <Server name="targqqq44"/> 
    <Server name="targqqq22"/> 
    <MaxFailures>2</MaxFailures> 
  </LoadBalancer> 
  <Path>/json</Path> 
  <HealthMonitor> 
    <IsEnabled>true</IsEnabled> 
    <IntervalInSec>5</IntervalInSec> 
    <HTTPMonitor> 
      <Request> 
        <ConnectTimeoutInSec>10</ConnectTimeoutInSec> 
        <SocketReadTimeoutInSec>30</SocketReadTimeoutInSec> 
        <Port>80</Port> 
        <Verb>GET</Verb> 
        <Path>/json</Path> 
      </Request> 
      <SuccessResponse> 
        <ResponseCode>200</ResponseCode> 
      </SuccessResponse> 
    </HTTPMonitor> 
  </HealthMonitor> 
</HTTPTargetConnection> 
Solved Solved
0 2 370
1 ACCEPTED SOLUTION

Are you sure you want Port 80 for the HTTPMonitor?

Should it be the same as the targetserver port? (probably 443)

Try omitting the Port element from the HTTPMonitor configuration.

I just tried this with two HTTPS targets and no Port element and it is working for me as expected. I can take a server offline, then bring it back online, and it begins serving load.

I tried it with <Port>80</Port>, and the system always treated the servers as unavailable. (Neither of my servers listen on port 80)

If the port issue is not the problem, then I don't know what to suggest.

View solution in original post

2 REPLIES 2

Are you sure you want Port 80 for the HTTPMonitor?

Should it be the same as the targetserver port? (probably 443)

Try omitting the Port element from the HTTPMonitor configuration.

I just tried this with two HTTPS targets and no Port element and it is working for me as expected. I can take a server offline, then bring it back online, and it begins serving load.

I tried it with <Port>80</Port>, and the system always treated the servers as unavailable. (Neither of my servers listen on port 80)

If the port issue is not the problem, then I don't know what to suggest.

Thanks @Dino-at-Google that helps, if I give <Port>443</Port> or without <Port> configuration also this works.