Varnish Questions
Jack Tuhman
drupalnut at gmail.com
Wed Jun 25 06:51:56 CEST 2008
Hello list,
I was about to setup another squid install for a drupal site that is going
to be getting some high traffic and I found varnish. I think that product
is really great but I am having some issues.
First hardware.
I have varnish and the web server running on the same quad core dual xeon
box 8gb of ram on debian. I have used the debian package to install varnish
and it installed version1.0.2-2
There is a database for the site running on another box.
Here are my 2 questions, I hope someone out there can point me in the right
direction.
1. connection reset issues
I ran
siege -c 250 -r 1000 -i -d 1 http://<myip>
This is a sample of the output I get
HTTP/1.1 200 0.41 secs: 5548 bytes ==> /
HTTP/1.1 200 0.41 secs: 5548 bytes ==> /
HTTP/1.1 200 0.42 secs: 5548 bytes ==> /
HTTP/1.1 200 0.41 secs: 5548 bytes ==> /
Error: socket: read error Connection reset by peer sock.c:455: Connection
reset by peer
Error: socket: read error Connection reset by peer sock.c:455: Connection
reset by peer
Error: socket: read error Connection reset by peer sock.c:455: Connection
reset by peer
Error: socket: read error Connection reset by peer sock.c:455: Connection
reset by peer
Error: socket: read error Connection reset by peer sock.c:455: Connection
reset by peer
HTTP/1.1 200 1.17 secs: 5548 bytes ==> /
HTTP/1.1 200 1.94 secs: 5548 bytes ==> /
HTTP/1.1 200 0.63 secs: 5548 bytes ==> /
HTTP/1.1 200 0.63 secs: 5548 bytes ==> /
HTTP/1.1 200 0.62 secs: 5548 bytes ==> /
At the end of the run I get Availability of around 45% If I run siege
directly to the webserver, I get an Availability of 98%. (it also takes
longer)
2. caching pages
I have updated content on my main site, and would like to clear the varnish
cache, I telnet into the management interface and run purge * (I also tried
purge *. , purge .* , purge *.*) I then clear my browser cache, and refresh
the page, I get the old page. If I visit the server directly, I get the new
page?
Below is my vcl.conf file I have comment out the cookie part because I would
like it to pass those requests to the webserver. (I guess it could cache
the front page)
backend default {
set backend.host = "10.10.0.10";
set backend.port = "81";
}
sub vcl_recv {
if (req.request == "POST") {
pipe;
}
# force lookup even when cookies are present
# if (req.request == "GET" && req.http.cookie) {
# lookup;
# }
if (req.request == "GET" && req.url ~ "\.(gif|jpg|swf|css|js)$") {
lookup;
}
}
sub vcl_fetch {
# force minimum ttl of 180 seconds
if (obj.ttl < 180s) {
set obj.ttl = 180s;
}
}
Thanks for any help someone can give.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20080625/927dd21b/attachment-0001.html>
More information about the varnish-misc
mailing list