Best Practices - Suggestions Request
anup at iamcool.net
Tue Jun 26 09:40:19 CEST 2007
We have been running varnish for over a month on our production servers now.
We are using the default configuration with a small change, that is to
cache request with Cookies.
We have a number of web servers behind a load balancer, each web server
running varnish + apache.
I understand that running both services on the same server is probably a
bad idea, but due to time constraints i had no option but to go ahead
with the current setup.
The problem is, the varnish process dies every 7 - 10 days, and i have
to manually restart it.
One solution would be to write a script which monitors varnishd and
starts it if not running.
I, however, would like to understand "Why it dies"... I have been
monitoring the servers for long times at a stretch and it seems that a
flood of requests for big files (100+ MB) seems to get varnishd down. I
cannot be very sure about this though.
Is it really a bad idea to run varnishd on the same server with apache?
Another thing is, is it possible to configure varnish such that it adds
a custom header to the response (for example, the ip of the server which
processed the request or any custom value). This would greatly assist in
knowing which server served the request.
Is it possible to make varnish refuse connections from the clients it it
detects that the backend has stopped responding and start servicing
again the moment it detects that the backend is up?
Sorry, if i have asked too many questions at one go.
Any help/pointers would be greatly appreciated.
More information about the varnish-misc