In the documentation on load balancing target servers, there is mention of a setting called MaxFailures. When set, errors are counted until the threshold is met. At that point, the targer server is pulled out of the pool.
1. What is considered a failure? 500 response from target? Timeout? Others?
2. Is there any way to configure what is/is not a failure?
1) 500 response from target is an application error, but Target server is still healthy. by default only timeouts are counted as failures -
2) yes, and this is the better approach - configure the health monitor
http://docs.apigee.com/api-services/content/load-balancing-across-backend-servers#healthmonitoring
Hi Mukundha - Thanks for the reply. Regarding health monitors, we had planned to leverage them. However, our services are all secured with bi-directional SSL. Based on the link you provided, the HealthMonitor does not support bi-directional SSL. We're not certain a TCP health check would be sufficient.
yes, right - I don't think HealthMonitor supports bi-directional SSL, so in this case TCPMonitor would be better than not having it - atleast you would get automatic failover and recovery
it's just going to check for timeouts
I am facing similar issue when using health monitoring.
<HTTPTargetConnection> <LoadBalancer> <Server name="ts_primary"/> <MaxFailures>1</MaxFailures> <Server name="ts_secondary"> <IsFallback>true</IsFallback> </Server> </LoadBalancer> <Path>/v1/user_management</Path> <HealthMonitor> <IsEnabled>true</IsEnabled> <IntervalInSec>5</IntervalInSec> <TCPMonitor> <ConnectTimeoutInSec>10</ConnectTimeoutInSec> <Port>80</Port> </TCPMonitor> </HealthMonitor> </HTTPTargetConnection>
It falls back to secondary server when primary target server is down. If after i bring the primary up, it still goes to secondary. Have you got a solution to it?