fcgi remote backends intelligent availability check
say, i have configured three fcgi-handlers for one URI in lighttpd.
if lighttpd, sees that fcgi backend is unavailable (say, connection refused), it marks it offline (fcgi server disabled). if in case all of them are disabled, it would be neccessary that the fcgi servers are instantly checked for availability again, without the existing timeout. since the servers might have returned. real case: i restarted fcgi backend daemons one by one. and i had to restart lighttpd to make it again serve fcgi requests.
my idea would be that the timeout for checking fcgi backend is lowered for fcgi server, if all of them are unavailable for same URI, and perhaps exponentally increased if the check of all fcgi servers fails (again). and of course initial first check must be done instantly (ie without timeout). and perhaps if the fcgi server becames available, the disabled-timeout is set back to default normal value.
Updated by Anonymous almost 18 years ago
until this above is not implemented, what about improving retry_timeout checks.
when one of the fcgi servers is out (connection refused). then webserver cycles such log entries every $FCGI_RETRY_TIMEOUT seconds:
2005-12-05 20:27:28: (mod_fastcgi.c.2493) fcgi-server re-enabled: 192.168.5.85 3001 2005-12-05 20:27:29: (mod_fastcgi.c.2665) establishing connection failed: Connection refused 2005-12-05 20:27:29: (mod_fastcgi.c.2804) fcgi-server disabled: 192.168.5.85 3001i propose to check the fcgi-server:
- in tcp level (establish tcp connection).
- fcgi protocol level.
and if those succeed, mark fcgi-server online, and send next request there.
i'm not sure, but i think it's possible to do fcgi service check without actually doing FCGI_BEGIN_REQUEST. because sending actual request to fcgi-server to test if it's alive is not very safe operation.
Also available in: Atom