A 400 does not mean that the backend is not available. It just means that
a bad request was sent. In addition to what is directly delivered from the
backend
the proxy code itself uses 500 and 503 to signal the balancer code that the
error
it faced (in case there was no response code from the backend for whatever
reason)
was recoverable (503) or not (500)
Regards
Rüdiger
________________________________
From: Jeff Trawick [mailto:[email protected]]
Sent: Dienstag, 31. August 2010 15:26
To: [email protected]
Subject: errors that cause proxy to move worker to error state
It looks like this is just 500 and 503.
Why not 400, for example?
if (access_status == OK)
break;
else if (access_status == HTTP_INTERNAL_SERVER_ERROR) {
/* Unrecoverable server error.
* We can not failover to another worker.
* Mark the worker as unusable if member of load balancer
*/
if (balancer) {
worker->s->status |= PROXY_WORKER_IN_ERROR;
worker->s->error_time = apr_time_now();
}
break;
}
else if (access_status == HTTP_SERVICE_UNAVAILABLE) {
/* Recoverable server error.
* We can failover to another worker
* Mark the worker as unusable if member of load balancer
*/
if (balancer) {
worker->s->status |= PROXY_WORKER_IN_ERROR;
worker->s->error_time = apr_time_now();
}
}
else {
/* Unrecoverable error.
* Return the origin status code to the client.
*/
break;
}