At 2014-07-20T10:36-0400, Tim Dunphy wrote: > Such that you can do a : > GET http://$(hostname -f):8080/healtcheck.php > And return the contents of that file (which is simply the word 'good'). > I've been googling a while and not found any advice on how to server a > text file locally on the varnish server itself. > Is there any way I can do this easily in my VCL?
You can serve content directly using a synthetic response. Other than that, you'll need to run a local webserver and redirect requests for that file to the appropriate backend. Having said that, if you want proper end to end testing, you're better off either serving the healthcheck file from the backends with a passthrough (so you can ensure that varnish is able to get to at least one backend) or with a very short TTL (tests caching as well as backend availability, but has a longer recovery time if a varnish host is unable to reach any backends). Paul _______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
