Hai, I configured varnish along with Apache as web server(2 web servers) and Haproxy as load load balancer. Varnish is working when there is only one web server.
The flow of rewuest is: Fist the request hits Varnish from varnish to Haproxy from here any one of the web server (web1 or web2) My varnish configuration is below backend default { # Our default backend, i.e. the web server # You can use more than 1. See docs. set backend.host = "0.0.0.0"; set backend.port = "9999"; } sub vcl_recv { if (req.request != "GET" && req.request != "HEAD") { pipe; } if (req.http.Expect) { pipe; } if (req.http.Authenticate || req.http.Cookie) { pass; } if (req.request == "GET") { lookup; } else { lookup; } } sub vcl_pipe { pipe; } sub vcl_pass { pass; } sub vcl_hash { set req.hash += req.url; set req.hash += req.http.host; hash; } sub vcl_hit { if (!obj.cacheable) { pass; } deliver; } sub vcl_miss { fetch; } sub vcl_fetch { if (!obj.valid) { error; } if (!obj.cacheable) { pass; } insert; } sub vcl_deliver { deliver; } sub vcl_timeout { discard; } sub vcl_discard { discard; } *Shahid*
_______________________________________________ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc