Need some help to speed up varnish
Geoff Simmons
geoff at uplex.de
Sun Feb 19 11:03:25 CET 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 2/17/12 10:55 AM, Jewel Nuruddin wrote:
>
> Here I attached my default.vcl file and /etc/sysconfig/varnish
> file I check with varnish and without varnish but found without
> varnish is faster then with varnish.
Just a couple of comments about your vcl_recv(), although I don't know
if these things explain your performance problem.
### To check URL we have jp.test12.com and img/static.test12.com,
if (req.http.host ~ "^(www)?jp.test12.com$") {
set req.backend = web;
}
else {
set req.backend = static;
}
Unless your host might really be named wwwjp.test12.com, then you
probably want that to be "^(www\.)?jp.test12.com$".
### For caching all
if (req.url ~ "^/"){
return (lookup);
}
### Over ried default cache item
if (req.url ~ "\.(png|gif|jpg|swf|css|js|html|htm)$") {
return (lookup);
}
The first regex matches everything (unless you get a malformed request
in which the path doesn't begin with '/', in which case it should be
rejected with 400). The second clause never gets executed, although
the same thing happens with those media types. But if you're trying to
have Varnish handle them differently from other URLs, it isn't happening.
HTH,
Geoff
- --
UPLEX Systemoptimierung
Schwanenwik 24
22087 Hamburg
http://uplex.de/
Mob: +49-176-63690917
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBCAAGBQJPQMjsAAoJEOUwvh9pJNURhEkP/2QUcgBzYHieco4wh0cdR9wx
Qy5Gw99BvqM6PaaqD/f/3gkmuy5EEpqDJN0/AQpD70MvkcVocPlhHueM71FwyJOt
Jq9FhRExWLA+SdkITnekSvB5WNoE8bL9xaHzn1nNaHMnWS6ep23JOfkyDhRLdsUH
+88WxKy3kqsW4HaEIVDeJjiONuk84KpO9AO1csFCKeSll5e3mBrQqw6CIwVXAlSv
pPRcQCAuB6sdZLeGc59zmu+I7+lMwH7ciAl/wzN/8OGpjAd4UXe/RnLNfIpHc08T
2ZnEjWBKZ35IKQVq9/oM96ivpXQiaB+5gju+n6hKrIyA9lkm8APBLfXZBJ4jYRFW
ikX7FIaYQMZatJ+oTIunpcTsVsZ7XMPv16qhA37AdYZQLkzOt4C0OlJ474JX1NFq
VEfaxcH+IXrhx/UcygSgXsRYuzM9XOgf+L67e38s73nHjDGdpMYVl0JBv9SfIr5t
u3T7hBlJiHxhLBLzyiDJtN+lzY+cpooH1vo7Jvv058IA/LoRC1MD437TX71uYUo/
hONGi+ArXI9RH6lns9B85cwrdBs592mtgXa4cR6+fEHR5aEQlR9frmw5B1gmPlPd
phbiGCsHx6H62BbuzCggF1eToGK6M4eAE01BDb+/IDJ4YCwB7CRvu/3KYUFZzDSf
b0GCGp00vGC7SxtxuSHz
=n1is
-----END PGP SIGNATURE-----
More information about the varnish-misc
mailing list