From chris.read at gmail.com Mon Dec 3 13:51:52 2012 From: chris.read at gmail.com (Chris Read) Date: Mon, 3 Dec 2012 13:51:52 +0000 Subject: Conditional Backend Requests Message-ID: Greetings all... Is there any update on when the proposed "Backend Conditional Requests" feature will make it into Varnish? ( https://www.varnish-cache.org/trac/wiki/BackendConditionalRequests ) The last official word I could find on it was that it would be revisited once 3.0 was completed. I've experimented with the branch and it looks pretty good, my concern though is that it was last merged with master in February, and a lot of work has been done since then. Thanks, Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From geoff at uplex.de Mon Dec 3 18:52:04 2012 From: geoff at uplex.de (Geoff Simmons) Date: Mon, 03 Dec 2012 19:52:04 +0100 Subject: Conditional Backend Requests In-Reply-To: References: Message-ID: <50BCF4D4.7080800@uplex.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 12/03/2012 02:51 PM, Chris Read wrote: > > Is there any update on when the proposed "Backend Conditional Requests" > feature will make it into Varnish? ( > https://www.varnish-cache.org/trac/wiki/BackendConditionalRequests ) > > The last official word I could find on it was that it would be revisited > once 3.0 was completed. > > I've experimented with the branch and it looks pretty good, my concern > though is that it was last merged with master in February, and a lot of > work has been done since then. Unfortunately at the moment there is little to add to what you've already found out. On the developer day at VUG in early October, we talked about plans for upcoming releases, and I would guess that the feature will make it into a 3.1 or 4.0 release. But it wasn't possible to set a timetable. Realistically, I doubt that there will be any new releases before the end of the year. And yes, the experimental-ims branch needs some catching up with the master branch. I'm sorry I can't be more specific. At any rate, the feature will be integrated, everyone's sure of that. Best, Geoff - -- ** * * UPLEX - Nils Goroll Systemoptimierung Scheffelstra?e 32 (ACHTUNG: neue Adresse) 22301 Hamburg Tel +49 40 2880 5731 Mob +49 176 636 90917 Fax +49 40 42949753 http://uplex.de -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBCAAGBQJQvPTUAAoJEOUwvh9pJNUROhIP/iA/7UdQkaaD0bjjzWC3EhH1 KkThUjzp1XVL/VEEg6MCmWIqdfuC6L2nGvYnpM+JdBhQQmJN61cBXiCX7mFh6dLv xqHlM3SbNXfSRCMM+lgJQmaST3r4G/94cPqnponkpYXa4Yx3TFWiDFQMkLv5/y08 ZhSl+1Lo1ZJg+2TyojWpIAGJV189Epc8dJK0F+cV8DPhZpUP6m48HQItlzVMlS9X PCSgG8Q9BsCHEOxqUr/8fjJCcM9//akn/yV7KUAD5zhkoDTfaSg7dkPMchYkmAxu bqjZfUsyPgy5Trmh/7K8hEIWUJl1w9nvOUO9S46irYaaWasYprvsbd5Rn5S2sS1X 7tzywQoZyJHBf/LvMji+/UaiTPMPTtQ7Zri3Jqjck3HaMjnLxmPLsRim+bzxayiD jQNvV+MzwcO1qI+QqyFJ3T5cdIFCekpIF/yHz/XGC5GbmDEiJ96+FCmpViHvUs1x dM+/JP+3mz3lGVjN0RbpCeRksTpFLmey0vyMIG9rFEvk4BauHD4OgzaLHEB0FXSo wOSkmjH8yH27SDN00PNnqlmjt9ZO/IyuVkxTuVAFkgOSQBX8Rg0V4F4duwzb+PDq 0rtvtX6oXSzKKV1fgxumz+67FPXSkdEO+T9bE5maWNv/sbi3QGgtE5VOQLYsvyC2 Q7vd1A0/Te3y9buDSEqw =aFWX -----END PGP SIGNATURE----- From nicksnels at yahoo.com Tue Dec 4 09:19:54 2012 From: nicksnels at yahoo.com (Snels Nick) Date: Tue, 4 Dec 2012 01:19:54 -0800 (PST) Subject: Varnish keeps on crashing on Centos 6 Message-ID: <1354612794.60902.YahooMailNeo@web110006.mail.gq1.yahoo.com> Hi, sorry for the double posting. I already posted my problem to the forum, but didn't get any replies. So I'm trying on the mailing list now. As it is a very annoying little problem that wont go away. My Varnish (3.0.3 revision 9e6a70f) installation crashes regularly on a Centos 6 64bit machine with 8GB RAM (Linux 2.6.32-279.2.1.e16.x86_64) taking down all my websites. I get the following error in /var/log/messages: Nov 30 04:26:07 mail varnishd[31995]: Child (16991) not responding to CLI, killing it. Nov 30 04:26:17 mail varnishd[31995]: Child (16991) not responding to CLI, killing it. Nov 30 04:26:27 mail varnishd[31995]: Child (16991) not responding to CLI, killing it. Nov 30 04:26:37 mail varnishd[31995]: Child (16991) not responding to CLI, killing it. Nov 30 04:26:47 mail varnishd[31995]: Child (16991) not responding to CLI, killing it. Nov 30 04:26:53 mail abrt[26160]: File '/usr/sbin/varnishd' seems to be deleted Nov 30 04:26:53 mail varnishd[31995]: Child (16991) not responding to CLI, killing it. Nov 30 04:26:53 mail varnishd[31995]: Child (16991) not responding to CLI, killing it. Nov 30 04:26:53 mail varnishd[31995]: Child (16991) died signal=3 (core dumped) Nov 30 04:27:07 mail varnishd[31995]: child (26167) Started Nov 30 04:27:09 mail varnishd[31995]: Child (26167) said Child starts Nov 30 04:27:09 mail varnishd[31995]: Child (26167) said SMF.s0 mmap'ed 12884901888 bytes of 12884901888 Nov 30 04:28:33 mail clamd[1289]: SelfCheck: Database status OK. Nov 30 04:29:30 mail varnishd[31995]: Child (26167) not responding to CLI, killing it. Nov 30 04:29:40 mail varnishd[31995]: Child (26167) not responding to CLI, killing it. Nov 30 04:29:50 mail varnishd[31995]: Child (26167) not responding to CLI, killing it. Nov 30 04:30:00 mail varnishd[31995]: Child (26167) not responding to CLI, killing it. Nov 30 04:30:10 mail varnishd[31995]: Child (26167) not responding to CLI, killing it. Nov 30 04:30:20 mail varnishd[31995]: Child (26167) not responding to CLI, killing it. Nov 30 04:30:30 mail varnishd[31995]: Child (26167) not responding to CLI, killing it. Nov 30 04:30:33 mail abrt[26219]: File '/usr/sbin/varnishd' seems to be deleted Nov 30 04:30:33 mail varnishd[31995]: Child (26167) not responding to CLI, killing it. Nov 30 04:30:33 mail varnishd[31995]: Child (26167) died signal=3 (core dumped) Nov 30 04:30:34 mail varnishd[31995]: child (26220) Started Nov 30 04:30:44 mail varnishd[31995]: Pushing vcls failed:#012CLI communication error (hdr) Nov 30 04:30:44 mail varnishd[31995]: Child (26220) said Child starts Nov 30 04:30:49 mail varnishd[31995]: Child (26220) said SMF.s0 mmap'ed 12884901888 bytes of 12884901888 Nov 30 04:30:49 mail varnishd[31995]: Child (26220) said Child dies Nov 30 04:30:49 mail varnishd[31995]: Child (26220) died status=1 I need to manually restart Varnish to get everything up and running again. I have already issued the command: echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled But the same crashes keep on happening. -------- /etc/sysconfig/varnish ------------ NFILES=131072 MEMLOCK=82000 VARNISH_VCL_CONF=/etc/varnish/default.vcl VARNISH_LISTEN_PORT=80 VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1 VARNISH_ADMIN_LISTEN_PORT=8888 VARNISH_SECRET_FILE=/etc/varnish/secret VARNISH_MIN_THREADS=2 VARNISH_MAX_THREADS=1000 VARNISH_THREAD_TIMEOUT=120 VARNISH_STORAGE_FILE=/var/lib/varnish/varnish_storage.bin VARNISH_STORAGE_SIZE=12G VARNISH_STORAGE="file,${VARNISH_STORAGE_FILE},${VARNISH_STORAGE_SIZE}" VARNISH_TTL=120 DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \ ???????????? -f ${VARNISH_VCL_CONF} \ ???????????? -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \ ???????????? -t ${VARNISH_TTL} \ ???????????? -w ${VARNISH_MIN_THREADS},${VARNISH_MAX_THREADS},${VARNISH_THREAD_TIMEOUT} \ ???????????? -u varnish -g varnish \ ???????????? -S ${VARNISH_SECRET_FILE} \ ???????????? -s ${VARNISH_STORAGE}" -------- /etc/varnish/default.vcl ------------ backend default { ? .host = "127.0.0.1"; ? .port = "4040"; } #Enable compression sub vcl_recv { ? if (req.http.Accept-Encoding) { ??? if (req.url ~ "\.(jpg|jpeg|png|gif|gz|tgz|bz2|tbz|mp3|ogg)$") { ????? # No point in compressing these ????? remove req.http.Accept-Encoding; ??? } elsif (req.http.Accept-Encoding ~ "gzip") { ????? set req.http.Accept-Encoding = "gzip"; ??? } elsif (req.http.Accept-Encoding ~ "deflate" && req.http.user-agent !~ "MSIE") { ????? set req.http.Accept-Encoding = "deflate"; ??? } else { ????? # unknown algorithm ????? remove req.http.Accept-Encoding; ??? } ? } } Any ideas how I can solve these crashes? Thanks. Kind regards, Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: From konrad.rzentarzewski at artegence.com Tue Dec 4 14:11:24 2012 From: konrad.rzentarzewski at artegence.com (konrad rzentarzewski) Date: Tue, 4 Dec 2012 15:11:24 +0100 Subject: multiple purge/ban in one http request Message-ID: <20121204141124.GD23068@k2.non.3dart.com> hi guys, does anybody has experiences abt. injecting many purge/bans in 1 connection (ie. 50-100)? ie. i have several X-Ban headers that i want to process. i think it needs to be done with inline-c and vrt. ie. BAN / HTTP/1.0 Host: example.com X-Ban: /article2702/esi8018 X-Ban: /article26502/esi8701 X-Ban: /article3941/esi15132 X-Ban: /article12592/esi31280 X-Ban: /article27284/esi22575 X-Ban: /article3135/esi2347 X-Ban: /article1741/esi12561 X-Ban: /article29293/esi21765 X-Ban: /article18734/esi4797 X-Ban: /article16097/esi20119 basically we need to invalidate some ESI parts for some articles on updates. application server talks with varnish with HTTP (not varnishadm). -- konrad rzentarzewski - Senior SA, Artegence sp. z o.o. Office: +48.223801313 NOC: +48.222961020 ARTE42-RIPE Ten mail nie stanowi pisma i zam?wienia handlowego wg. Kodeksu sp??ek handlowych (Dz.U. 2000 nr 94 poz. 1037) Sp??ka wpisana do rejestru przedsi?biorc?w prowadzonego przez S?d Rejonowy dla m.st. Warszawy Wydzia? XIII Gospodarczy Krajowego Rejestru S?dowego pod numerem KRS 0000066610 NIP: 521-30-18-541 wysoko?? kapita?u zak?adowego: 51 500,00 PLN From thierry.magnien at sfr.com Tue Dec 4 15:05:30 2012 From: thierry.magnien at sfr.com (MAGNIEN, Thierry) Date: Tue, 4 Dec 2012 15:05:30 +0000 Subject: Varnish keeps on crashing on Centos 6 In-Reply-To: <1354612794.60902.YahooMailNeo@web110006.mail.gq1.yahoo.com> References: <1354612794.60902.YahooMailNeo@web110006.mail.gq1.yahoo.com> Message-ID: <5D103CE839D50E4CBC62C9FD7B83287C213D62@EXCN015.encara.local.ads> Hi, Try issuing a "varnishadm panic.show" command and see if it gives you a hint ? Regards, Thierry De : varnish-misc-bounces at varnish-cache.org [mailto:varnish-misc-bounces at varnish-cache.org] De la part de Snels Nick Envoy? : mardi 4 d?cembre 2012 10:20 ? : varnish-misc at varnish-cache.org Objet : Varnish keeps on crashing on Centos 6 Hi, sorry for the double posting. I already posted my problem to the forum, but didn't get any replies. So I'm trying on the mailing list now. As it is a very annoying little problem that wont go away. My Varnish (3.0.3 revision 9e6a70f) installation crashes regularly on a Centos 6 64bit machine with 8GB RAM (Linux 2.6.32-279.2.1.e16.x86_64) taking down all my websites. I get the following error in /var/log/messages: Nov 30 04:26:07 mail varnishd[31995]: Child (16991) not responding to CLI, killing it. Nov 30 04:26:17 mail varnishd[31995]: Child (16991) not responding to CLI, killing it. Nov 30 04:26:27 mail varnishd[31995]: Child (16991) not responding to CLI, killing it. Nov 30 04:26:37 mail varnishd[31995]: Child (16991) not responding to CLI, killing it. Nov 30 04:26:47 mail varnishd[31995]: Child (16991) not responding to CLI, killing it. Nov 30 04:26:53 mail abrt[26160]: File '/usr/sbin/varnishd' seems to be deleted Nov 30 04:26:53 mail varnishd[31995]: Child (16991) not responding to CLI, killing it. Nov 30 04:26:53 mail varnishd[31995]: Child (16991) not responding to CLI, killing it. Nov 30 04:26:53 mail varnishd[31995]: Child (16991) died signal=3 (core dumped) Nov 30 04:27:07 mail varnishd[31995]: child (26167) Started Nov 30 04:27:09 mail varnishd[31995]: Child (26167) said Child starts Nov 30 04:27:09 mail varnishd[31995]: Child (26167) said SMF.s0 mmap'ed 12884901888 bytes of 12884901888 Nov 30 04:28:33 mail clamd[1289]: SelfCheck: Database status OK. Nov 30 04:29:30 mail varnishd[31995]: Child (26167) not responding to CLI, killing it. Nov 30 04:29:40 mail varnishd[31995]: Child (26167) not responding to CLI, killing it. Nov 30 04:29:50 mail varnishd[31995]: Child (26167) not responding to CLI, killing it. Nov 30 04:30:00 mail varnishd[31995]: Child (26167) not responding to CLI, killing it. Nov 30 04:30:10 mail varnishd[31995]: Child (26167) not responding to CLI, killing it. Nov 30 04:30:20 mail varnishd[31995]: Child (26167) not responding to CLI, killing it. Nov 30 04:30:30 mail varnishd[31995]: Child (26167) not responding to CLI, killing it. Nov 30 04:30:33 mail abrt[26219]: File '/usr/sbin/varnishd' seems to be deleted Nov 30 04:30:33 mail varnishd[31995]: Child (26167) not responding to CLI, killing it. Nov 30 04:30:33 mail varnishd[31995]: Child (26167) died signal=3 (core dumped) Nov 30 04:30:34 mail varnishd[31995]: child (26220) Started Nov 30 04:30:44 mail varnishd[31995]: Pushing vcls failed:#012CLI communication error (hdr) Nov 30 04:30:44 mail varnishd[31995]: Child (26220) said Child starts Nov 30 04:30:49 mail varnishd[31995]: Child (26220) said SMF.s0 mmap'ed 12884901888 bytes of 12884901888 Nov 30 04:30:49 mail varnishd[31995]: Child (26220) said Child dies Nov 30 04:30:49 mail varnishd[31995]: Child (26220) died status=1 I need to manually restart Varnish to get everything up and running again. I have already issued the command: echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled But the same crashes keep on happening. -------- /etc/sysconfig/varnish ------------ NFILES=131072 MEMLOCK=82000 VARNISH_VCL_CONF=/etc/varnish/default.vcl VARNISH_LISTEN_PORT=80 VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1 VARNISH_ADMIN_LISTEN_PORT=8888 VARNISH_SECRET_FILE=/etc/varnish/secret VARNISH_MIN_THREADS=2 VARNISH_MAX_THREADS=1000 VARNISH_THREAD_TIMEOUT=120 VARNISH_STORAGE_FILE=/var/lib/varnish/varnish_storage.bin VARNISH_STORAGE_SIZE=12G VARNISH_STORAGE="file,${VARNISH_STORAGE_FILE},${VARNISH_STORAGE_SIZE}" VARNISH_TTL=120 DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \ -f ${VARNISH_VCL_CONF} \ -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \ -t ${VARNISH_TTL} \ -w ${VARNISH_MIN_THREADS},${VARNISH_MAX_THREADS},${VARNISH_THREAD_TIMEOUT} \ -u varnish -g varnish \ -S ${VARNISH_SECRET_FILE} \ -s ${VARNISH_STORAGE}" -------- /etc/varnish/default.vcl ------------ backend default { .host = "127.0.0.1"; .port = "4040"; } #Enable compression sub vcl_recv { if (req.http.Accept-Encoding) { if (req.url ~ "\.(jpg|jpeg|png|gif|gz|tgz|bz2|tbz|mp3|ogg)$") { # No point in compressing these remove req.http.Accept-Encoding; } elsif (req.http.Accept-Encoding ~ "gzip") { set req.http.Accept-Encoding = "gzip"; } elsif (req.http.Accept-Encoding ~ "deflate" && req.http.user-agent !~ "MSIE") { set req.http.Accept-Encoding = "deflate"; } else { # unknown algorithm remove req.http.Accept-Encoding; } } } Any ideas how I can solve these crashes? Thanks. Kind regards, Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: From lampe at hauke-lampe.de Tue Dec 4 22:24:29 2012 From: lampe at hauke-lampe.de (Hauke Lampe) Date: Tue, 04 Dec 2012 23:24:29 +0100 Subject: multiple purge/ban in one http request In-Reply-To: <20121204141124.GD23068@k2.non.3dart.com> References: <20121204141124.GD23068@k2.non.3dart.com> Message-ID: <50BE781D.5080100@hauke-lampe.de> On 04.12.2012 15:11, konrad rzentarzewski wrote: > does anybody has experiences abt. injecting many purge/bans in > 1 connection (ie. 50-100)? No, never tried it yet. > ie. i have several X-Ban headers that i want to process. > > BAN / HTTP/1.0 > Host: example.com > X-Ban: /article2702/esi8018 > X-Ban: /article26502/esi8701 You can transform the X-Ban headers into a ban expression with std.collect and regsuball: | if (req.request == "BAN") { // && auth | std.collect(req.http.X-Ban); // Combine X-Ban headers, separated by ", " | std.log("banning URLs: " + req.http.X-Ban); | ban("obj.X-Purge-URL ~ (" + regsuball(req.http.X-Ban, ", ", "|") + ")"); | error 200 "Added to ban-list"; | } A very large number of X-Ban headers in a single request could exceed workspace limits and require changes to runtime parameters (sess_workspace, http_max_hdr, http_req_hdr_len, http_req_size) > i think it needs to be done with inline-c and vrt. Indeed, it might be better to iterate over the headers in an Inline-C loop. Hauke. From tfheen at varnish-software.com Wed Dec 5 13:38:11 2012 From: tfheen at varnish-software.com (Tollef Fog Heen) Date: Wed, 5 Dec 2012 14:38:11 +0100 Subject: varnishd question In-Reply-To: <50B5474C.8070601@tango.me> References: <50B5474C.8070601@tango.me> Message-ID: <20121205133811.GE1446@err.no> ]] Tom Rioux > Is it possible to run varnishd not as root (Ubuntu)? > This is for our automation test environments, not live production. > > I'm getting this message when I try to run under my id: > Failed to create ./vcl.uOZIGcgD.c: Permission denied > VCL compilation failed > > I've tried changing permissions on varnishd. Yes, but you typically need to pass an -n argument in that case. For test environments, you might be interested in looking at varnishtest too. -- Tollef Fog Heen Technical lead | Varnish Software AS t: +47 21 98 92 64 We Make Websites Fly! From james at ifixit.com Thu Dec 6 23:58:11 2012 From: james at ifixit.com (James Pearson) Date: Thu, 06 Dec 2012 15:58:11 -0800 Subject: Including an HTML file for vcl_error Message-ID: <1354838093-sup-1070@geror.local> In vcl_error, I can use the synthetic keyword to construct a nice HTML error page. For consistency reasons, I'd like this to use the same error page we use in a few other parts of the stack. Is there any way to pull in another file as a value? I know I can include other VCL files, but if it's valid VCL, then I can't serve it from e.g. Apache. ;) Side note: searching for 'varnish synthetic' gets terrible results. From perbu at varnish-software.com Fri Dec 7 07:51:46 2012 From: perbu at varnish-software.com (Per Buer) Date: Fri, 7 Dec 2012 08:51:46 +0100 Subject: Including an HTML file for vcl_error In-Reply-To: <1354838093-sup-1070@geror.local> References: <1354838093-sup-1070@geror.local> Message-ID: Hi James, On Fri, Dec 7, 2012 at 12:58 AM, James Pearson wrote: > In vcl_error, I can use the synthetic keyword to construct a nice HTML > error > page. For consistency reasons, I'd like this to use the same error page > we use > in a few other parts of the stack. Is there any way to pull in another > file as > a value? import std; and then use std.fileread See man vmod_std for details. -- *Per Buer* CEO | Varnish Software AS Phone: +47 958 39 117 | Skype: per.buer We Make Websites Fly! -------------- next part -------------- An HTML attachment was scrubbed... URL: From somsaks at gmail.com Fri Dec 7 09:58:21 2012 From: somsaks at gmail.com (Somsak Sriprayoonsakul) Date: Fri, 7 Dec 2012 16:58:21 +0700 Subject: Low performance in Pipe-only mode Message-ID: Hello, We were trying to use Varnish as L7 HTTP request router with absolutely NO cache. We created very minimal VCL rules to select correct backend and return PIPE for all requests. Below are the snippet taken from the VCL. sub vcl_recv { # if X-Forwarded-For has been set by CDN, leave it if (! req.http.X-Forwarded-For) { set req.http.X-Forwarded-For = client.ip; } if (req.http.host ~ "desired.domain.com" && (req.request == "GET" && ! ( (req.url ~ ".*\?.*[&]?.*") || (req.url ~ ".*/$") || (req.url ~ ".*/\?.*") || (req.url ~ ".*\?.*[&]?upload.*") )) ) { set req.backend = tier1; } elsif (req.request == "PUT") { set req.backend = tier2; } elsif (req.http.host ~ "another.domain.com") { set req.backend = tier_console; } else { set req.backend = default_tier; } return (pipe); } sub vcl_pipe { set bereq.http.connection = "close"; return (pipe); } With this, Varnish work as expected, but however the performance is much lower than in "lookup" mode. We tested performance by using Tsung, had 3 servers simulated 15000 clients. Backends cosists of 2 servers running NGINX. We got the following results. - Have TSUNG did the load balancing to 2 servers (TSUNG can do round-robin load balance by itself). We got around 4500-4800 request/sec - TSUNG point to Varnish with above VCL. request/sec drop to around 900-1000 request/sec. - If we change the last line to "return (lookup);" instead of "return (pipe);", we got around 3300 request/sec. I tried to play around with thread_pool, thread_pool_min, and thread_pool_max as suggested on various web sites. Even with -p thread_pool_min=100, -p thread_pool_max=5000, -p thread_pools=8, -p session_linger=50, -p cli_timeout=25, -p listen_depth=8192 the performance didn't improve much (NOTE: Varnish server has 8 core) Is there anyway to increase performance of PIPE only mode to be, at the least, in the same level as Lookup mode? What could we do to debug the performance? Best Regards, Somsak somsaks at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.david.lists at gmail.com Mon Dec 10 01:47:32 2012 From: j.david.lists at gmail.com (J David) Date: Sun, 9 Dec 2012 20:47:32 -0500 Subject: How to select a backend from a vmod? Message-ID: We currently use Squid as a reverse proxy. We have a moderately elaborate url_rewrite_program that maps a large set of frontend hostnames to a medium-size set of backend hosts that are configured to handle them. The frontend hostnames are dynamically created by site visitors, and the front-to-back mapping changes due to load balancing. Changes to both are frequent so there is no way to do this statically or manually. The Squid solution is good and works well, but we would like to switch to Varnish to get better scalability (having 8-core machines sit 87.5% idle is kinda sad) and good dual-stack IPv4/IPv6 support. However, I am having trouble figuring out how to adapt our URL rewriter. I was able to do a proof-of-concept VCL that statically does this in vcl_miss: sub vcl_miss { if (req.http.host) == "debug-1.example.com") { set req.backend = back_1; } elsif (req.http.host) == "debug-2.example.com") { set req.backend = back_2; } elsif (req.http.host) == "debug-3.example.com") { set req.backend = back_3; } else { set req.backend = default; } } This seems to work, so what I'd like to do is code up a vmod that allows this to be done dynamically. I.e. import magic; sub vcl_miss { set req.backend = magic.map(req.http.host); # Or: set req.backend.host = magic.map(req.http.host); } I wrote a rudimentary "magic" vmod from which magic.map returns a string, but that's unacceptable because VCL wants a backend object there, not a string. And even this approach requires all the backends to be predefined, which seems like a hassle as we add more to handle growth. Is there an efficient way to approach this? Thanks in advance for any help or suggestions! From perbu at varnish-software.com Mon Dec 10 09:50:47 2012 From: perbu at varnish-software.com (Per Buer) Date: Mon, 10 Dec 2012 10:50:47 +0100 Subject: How to select a backend from a vmod? In-Reply-To: References: Message-ID: Hi David, On Mon, Dec 10, 2012 at 2:47 AM, J David wrote: > > I wrote a rudimentary "magic" vmod from which magic.map returns a > string, but that's unacceptable because VCL wants a backend object > there, not a string. And even this approach requires all the backends > to be predefined, which seems like a hassle as we add more to handle > growth. > > Is there an efficient way to approach this? > Currently I think the most efficient approach would be the DNS director. -- *Per Buer* CEO | Varnish Software AS Phone: +47 958 39 117 | Skype: per.buer We Make Websites Fly! -------------- next part -------------- An HTML attachment was scrubbed... URL: From somsaks at gmail.com Mon Dec 10 15:24:56 2012 From: somsaks at gmail.com (Somsak Sriprayoonsakul) Date: Mon, 10 Dec 2012 22:24:56 +0700 Subject: Low performance in Pipe-only mode In-Reply-To: References: Message-ID: Please ignore this. Seems that I misinterpreted my test result. Actually Pipe performance is not that bad. BR, Somsak somsaks at gmail.com On Fri, Dec 7, 2012 at 4:58 PM, Somsak Sriprayoonsakul wrote: > Hello, > > We were trying to use Varnish as L7 HTTP request router with absolutely NO > cache. > > We created very minimal VCL rules to select correct backend and return > PIPE for all requests. Below are the snippet taken from the VCL. > > sub vcl_recv { > # if X-Forwarded-For has been set by CDN, leave it > if (! req.http.X-Forwarded-For) { > set req.http.X-Forwarded-For = client.ip; > } > > if (req.http.host ~ "desired.domain.com" && > (req.request == "GET" && > ! ( (req.url ~ ".*\?.*[&]?.*") || > (req.url ~ ".*/$") || > (req.url ~ ".*/\?.*") || > (req.url ~ ".*\?.*[&]?upload.*") > )) > ) { > set req.backend = tier1; > } elsif (req.request == "PUT") { > set req.backend = tier2; > } elsif (req.http.host ~ "another.domain.com") { > set req.backend = tier_console; > } else { > set req.backend = default_tier; > } > return (pipe); > } > > sub vcl_pipe { > set bereq.http.connection = "close"; > > return (pipe); > } > > With this, Varnish work as expected, but however the performance is much > lower than in "lookup" mode. > > We tested performance by using Tsung, had 3 servers simulated 15000 > clients. Backends cosists of 2 servers running NGINX. We got the following > results. > > - Have TSUNG did the load balancing to 2 servers (TSUNG can do round-robin > load balance by itself). We got around 4500-4800 request/sec > - TSUNG point to Varnish with above VCL. request/sec drop to around > 900-1000 request/sec. > - If we change the last line to "return (lookup);" instead of "return > (pipe);", we got around 3300 request/sec. > > I tried to play around with thread_pool, thread_pool_min, and > thread_pool_max as suggested on various web sites. Even with -p > thread_pool_min=100, -p thread_pool_max=5000, -p thread_pools=8, -p > session_linger=50, -p cli_timeout=25, -p listen_depth=8192 the performance > didn't improve much (NOTE: Varnish server has 8 core) > > Is there anyway to increase performance of PIPE only mode to be, at the > least, in the same level as Lookup mode? What could we do to debug the > performance? > > Best Regards, > > Somsak > > somsaks at gmail.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From erasmu at gmail.com Tue Dec 11 08:39:27 2012 From: erasmu at gmail.com (eras mus) Date: Tue, 11 Dec 2012 14:09:27 +0530 Subject: varnish with plone Message-ID: Dear all, i have plone zeoclients in ports 8081 and 8082. I ve configured with directors. varnih is serving the pages only when 8081 is up . when it is down getting 503 error. in browser. it does the same for random as well as round-robin. http://pastebin.com/xrTbEuQR it is fetching from only the first defined backend. when the first backend is unhealthy nit getting output. From cooltechemail at gmail.com Wed Dec 12 22:10:19 2012 From: cooltechemail at gmail.com (Vince) Date: Thu, 13 Dec 2012 06:10:19 +0800 Subject: varnish takes 30 seconds to return item in cache Message-ID: Hi, When I try to get an item from Varnish, sometimes it takes about 20-30 seconds to respond even though I get a cache hit. For example [root at localhost]# wget 127.0.0.1:8083/news/818341 --2012-12-12 17:35:11-- http://127.0.0.1:8083/news/818341 Connecting to 127.0.0.1:8083... connected. HTTP request sent, awaiting response... 200 OK *----> varnishlog shows cache hit, but this step waits about 30 seconds* Is this a varnish problem or there is something wrong with my server network? Thanks, Vince -------------- next part -------------- An HTML attachment was scrubbed... URL: From r at roze.lv Thu Dec 13 01:07:41 2012 From: r at roze.lv (Reinis Rozitis) Date: Thu, 13 Dec 2012 03:07:41 +0200 Subject: varnish takes 30 seconds to return item in cache In-Reply-To: References: Message-ID: <63477EBE87EF4CD887D1D72BA59B579C@NeiRoze> > Connecting to 127.0.0.1:8083... connected. > HTTP request sent, awaiting response... 200 OK ----> varnishlog shows > cache hit, but this step waits about 30 seconds I'm afraid that provided information isnt enough - you should post the full varnishlog for that particular request (also 'varnishstat -1' output could help to indicate the issue). p.s. a simple step for more easy debuging would be to add a cache hit header. For example: sub vcl_deliver { if (obj.hits > 0) { set resp.http.X-Cache = "HIT"; } return (deliver); } this way you can run 'wget -S yoururl' and see if the cache is a hit on the fly. rr From j.david.lists at gmail.com Thu Dec 13 17:26:02 2012 From: j.david.lists at gmail.com (J David) Date: Thu, 13 Dec 2012 12:26:02 -0500 Subject: How to select a backend from a vmod? In-Reply-To: References: Message-ID: On Mon, Dec 10, 2012 at 4:50 AM, Per Buer wrote: > Is there an efficient way to approach this? >> > > Currently I think the most efficient approach would be the DNS director. > Unfortunately, we used to use a DNS-based approach with squid. It's efficient enough on the proxy-cache side, but maintaining the zone files in BIND is problematic as the number of records involved becomes large and the frequency of updated becomes high. Thanks for the response! -------------- next part -------------- An HTML attachment was scrubbed... URL: From bedis9 at gmail.com Thu Dec 13 17:57:36 2012 From: bedis9 at gmail.com (Baptiste) Date: Thu, 13 Dec 2012 18:57:36 +0100 Subject: How to select a backend from a vmod? In-Reply-To: References: Message-ID: Hey, Why not chaining Varnish with HAProxy? Your varnish has a single way out, HAProxy. Then in HAProxy you can either use_backend or use-server that can be combined with any type of layer 7 information to take routing decision. This routing decision can take their logic from a raw text file you can update with a basic script (needs a haproxy reload of course) my 2 cents :) Baptiste On Thu, Dec 13, 2012 at 6:26 PM, J David wrote: > > > On Mon, Dec 10, 2012 at 4:50 AM, Per Buer > wrote: >>> >>> Is there an efficient way to approach this? >> >> >> Currently I think the most efficient approach would be the DNS director. > > > Unfortunately, we used to use a DNS-based approach with squid. It's > efficient enough on the proxy-cache side, but maintaining the zone files in > BIND is problematic as the number of records involved becomes large and the > frequency of updated becomes high. > > Thanks for the response! > > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc From moseleymark at gmail.com Thu Dec 13 18:59:51 2012 From: moseleymark at gmail.com (Mark Moseley) Date: Thu, 13 Dec 2012 10:59:51 -0800 Subject: Switch/Case statement? Message-ID: Just want to make sure I'm not missing something obvious... Is there an equivalent of a switch/case statement for VCL? I've not been able to find one, nor a VMOD that implements one. I've got a backend selection chunk of VCL code that is turning into a very long if/elsif/elsif/elsif/..../else. Before I try to optimizing the if/elsif's a bit, I went in search of a VCL equiv for 'case' but came up empty-handed. As a bit of background, it's doing the backend selection based on the incoming IP address on a dummy interface, so it looks like: if ( server.ip == "192.168.1.1" ) { set req.backend = backend1; } elsif ( server.ip == "192.168.1.2" ) { set req.backend = backend2; and so on all the way up to 192.168.1.49 but growing by a few every year. I figure I can restructure it into something like (in pseudo-code): if ( server.ip is in 192.168.1.0-.31 ) { if ( server.ip is in 192.168.1.0-.15 ) { ..... } elsif ( server.ip is in 192.168.1.0-.15 ) { ..... and so on, though I'll re-order things a bit to get the most-used first. But obviously a 'case'-equiv would be much more efficient (I'm guessing, unless it internally compiled to if/elsif/elsif/.../else). Failing a 'case'/'switch' statement, being able to map the incoming IP->backend via an associative array would be cool too, but I didn't see anything remotely like that. From konrad.rzentarzewski at artegence.com Thu Dec 13 20:47:04 2012 From: konrad.rzentarzewski at artegence.com (konrad rzentarzewski) Date: Thu, 13 Dec 2012 21:47:04 +0100 Subject: PURGE as MISS Message-ID: <20121213204704.GA9651@k2.non.3dart.com> hi, as i wrote in my last email, we use a lot of bans and purges. so many, that they're affecting our hitratio, ie: https://gist.github.com/07f6280ae9345dc315b7#file-log-L10-L49 basically, everything that gets function error called, ends in miss, just as a call to a backend. i need to find a way to graph our real hit ratio, and being able to use varnishstat. ideas? -- konrad rzentarzewski - Senior SA, Artegence sp. z o.o. Office: +48.223801313 NOC: +48.222961020 ARTE42-RIPE Ten mail nie stanowi pisma i zam?wienia handlowego wg. Kodeksu sp??ek handlowych (Dz.U. 2000 nr 94 poz. 1037) Sp??ka wpisana do rejestru przedsi?biorc?w prowadzonego przez S?d Rejonowy dla m.st. Warszawy Wydzia? XIII Gospodarczy Krajowego Rejestru S?dowego pod numerem KRS 0000066610 NIP: 521-30-18-541 wysoko?? kapita?u zak?adowego: 51 500,00 PLN From pprocacci at datapipe.com Fri Dec 14 01:29:02 2012 From: pprocacci at datapipe.com (Paul A. Procacci) Date: Thu, 13 Dec 2012 19:29:02 -0600 Subject: Switch/Case statement? In-Reply-To: References: Message-ID: <20121214012902.GA10551@nat.myhome> There is no switch/case in vcl. Only if/elseif/else as you've already explained. VCL gets compiled to machine code via gcc. The difference between switch/case and if/elseif/else is only visual. Both require branching. In the optimization manual for intel cpu's it explains that you should extract the case that is most likely going to be hit most often from the switch statement, preceding the switch statement to avoid heavy branching. This isn't any different than if/elseif/else. In either case, this is neither here nor there. Currently to my knowledge, you cannot dynamically assign backends. This has been discussed numerous times already on this list. There are plans from my reading to introduce such a thing, but isn't yet completed. What you're currently doing is the only way atm to accomplish what you want. I'll beg others to correct this if there have been updates that I am not aware of. I would keep what you currently have: > if ( server.ip == "192.168.1.1" ) { > set req.backend = backend1; > > } elsif ( server.ip == "192.168.1.2" ) { > set req.backend = backend2; .... until a better alternative gets introduced. ~Paul ________________________________ This message may contain confidential or privileged information. If you are not the intended recipient, please advise us immediately and delete this message. See http://www.datapipe.com/legal/email_disclaimer/ for further information on confidentiality and the risks of non-secure electronic communication. If you cannot access these links, please notify us by reply message and we will send the contents to you. From j.david.lists at gmail.com Sat Dec 15 03:06:33 2012 From: j.david.lists at gmail.com (J David) Date: Fri, 14 Dec 2012 22:06:33 -0500 Subject: How to select a backend from a vmod? In-Reply-To: References: Message-ID: On Thu, Dec 13, 2012 at 12:57 PM, Baptiste wrote: > Why not chaining Varnish with HAProxy? That basically substitutes HAProxy for BIND, with the added disadvantage of making an extra socket copy of every byte that is proxied. Nothing that takes a static configuration and reloads works in an environment where the configuration changes at intervals measured in (sometimes fractions of) seconds. Our backend routing decisions really have to be done from C++, which is why we use Squid now and why I was looking at doing a varnish+vmod solution. But I guess it isn't possible yet. :( We did solve the immediate problem (IPv6 support) by upgrading squid. It still doesn't use SMP properly, but that's less of an issue. I will keep checking from time to time as I think varnish is great and would like to see us give it a real shot. Thanks! From footplus at gmail.com Sat Dec 15 09:53:01 2012 From: footplus at gmail.com (=?UTF-8?B?QXVyw6lsaWVu?=) Date: Sat, 15 Dec 2012 10:53:01 +0100 Subject: How to select a backend from a vmod? In-Reply-To: References: Message-ID: On Thu, Dec 13, 2012 at 6:26 PM, J David wrote: > Unfortunately, we used to use a DNS-based approach with squid. It's > efficient enough on the proxy-cache side, but maintaining the zone files in > BIND is problematic as the number of records involved becomes large and the > frequency of updated becomes high. > If the functional side of the DNS approach was working, I may suggest using PowerDNS, with a custom backend that dynamically computes the response you need (http://doc.powerdns.com/backends-detail.html). You might also try to write a VCL generator which would generate the required backend switching code, but it might not be efficient if you have really many backends. -- Aur?lien Guillaume From simon at darkmere.gen.nz Sat Dec 15 10:25:41 2012 From: simon at darkmere.gen.nz (Simon Lyall) Date: Sat, 15 Dec 2012 23:25:41 +1300 (NZDT) Subject: Reducing CPU usage Message-ID: I wrote a little article on reducing CPU usage in my varnish cache that some may find useful: http://blog.darkmere.gen.nz/2012/12/speeding-up-varnish-cache/ The TLDR is that my vcl_recv was poorly structured and every request went though around 32 "if" statements (some with huge regex matches). I was seeing my CPU maxed out at just 4-5000 hits/second. I restructured vcl_recv to reduce the average amount number of tests on each request and halved the CPU used. -- Simon Lyall | Very Busy | Web: http://www.darkmere.gen.nz/ "To stay awake all night adds a day to your life" - Stilgar | eMT. From luis.sanmartin at unix.cl Sun Dec 16 21:10:38 2012 From: luis.sanmartin at unix.cl (Luis San Martin) Date: Sun, 16 Dec 2012 18:10:38 -0300 Subject: PURGE as MISS In-Reply-To: <20121213204704.GA9651@k2.non.3dart.com> References: <20121213204704.GA9651@k2.non.3dart.com> Message-ID: varnishstat && snmpd && rrdtool On 13 Dec 2012 17:49, "konrad rzentarzewski" < konrad.rzentarzewski at artegence.com> wrote: > hi, > > as i wrote in my last email, we use a lot of bans and purges. > so many, that they're affecting our hitratio, ie: > > https://gist.github.com/07f6280ae9345dc315b7#file-log-L10-L49 > > basically, everything that gets function error called, ends in miss, > just as a call to a backend. > > i need to find a way to graph our real hit ratio, and being able to use > varnishstat. > > ideas? > > -- > konrad rzentarzewski - Senior SA, Artegence sp. z o.o. > Office: +48.223801313 NOC: +48.222961020 ARTE42-RIPE > Ten mail nie stanowi pisma i zam?wienia handlowego wg. > Kodeksu sp??ek handlowych (Dz.U. 2000 nr 94 poz. 1037) > > > Sp??ka wpisana do rejestru przedsi?biorc?w prowadzonego przez S?d Rejonowy > dla m.st. Warszawy Wydzia? XIII Gospodarczy Krajowego Rejestru S?dowego > pod > numerem KRS 0000066610 > NIP: 521-30-18-541 > wysoko?? kapita?u zak?adowego: 51 500,00 PLN > > > _______________________________________________ > varnish-misc mailing list > varnish-misc at varnish-cache.org > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc -------------- next part -------------- An HTML attachment was scrubbed... URL: From radecki.rafal at gmail.com Tue Dec 18 11:03:44 2012 From: radecki.rafal at gmail.com (=?ISO-8859-2?Q?Rafa=B3_Radecki?=) Date: Tue, 18 Dec 2012 12:03:44 +0100 Subject: Sticky sessions based on source IP always on the same backend. Message-ID: Hi all. I am using configuration from attachement. I use client director and sticky sessions based on source IP. I am curious about how does the client director compute the hash for every source IP and makes a decision from which backend to fetch the content. Could you please provide some details about it? Is it possible to always fetch the content for an IP from the same backend? What about a situation when I have two varnish servers in active/passive configuration and one of them dies and the other takes its place? Would the hash fo an IP be the same on the second server? Would the request be fetched from the same backend after varnish failover? Best regards, Rafal. -------------- next part -------------- A non-text attachment was scrubbed... Name: default.vcl Type: application/octet-stream Size: 2332 bytes Desc: not available URL: From james at ifixit.com Tue Dec 18 21:12:37 2012 From: james at ifixit.com (James Pearson) Date: Tue, 18 Dec 2012 13:12:37 -0800 Subject: Reducing CPU usage In-Reply-To: References: Message-ID: <1355864930-sup-8737@geror.local> Excerpts from Simon Lyall's message of 2012-12-15 02:25:41 -0800: > > I wrote a little article on reducing CPU usage in my varnish cache that > some may find useful: > > http://blog.darkmere.gen.nz/2012/12/speeding-up-varnish-cache/ > > The TLDR is that my vcl_recv was poorly structured and every request went > though around 32 "if" statements (some with huge regex matches). I was > seeing my CPU maxed out at just 4-5000 hits/second. I restructured > vcl_recv to reduce the average amount number of tests on each request and > halved the CPU used. Towards the end, you mention moving a rule from being of the form if ((a || b ) && c) { to if (a || b) { if (c) { , where c is an expensive check and (a || b) rules out most pages, and seeing a CPU usage decrease. This seems odd to me, since I'd expect short-circuiting to cut out the check for c if (a || b) is false. Did I perhaps misunderstand what you were saying? From simon at darkmere.gen.nz Tue Dec 18 22:10:37 2012 From: simon at darkmere.gen.nz (Simon Lyall) Date: Wed, 19 Dec 2012 11:10:37 +1300 (NZDT) Subject: Reducing CPU usage In-Reply-To: <1355864930-sup-8737@geror.local> References: <1355864930-sup-8737@geror.local> Message-ID: On Tue, 18 Dec 2012, James Pearson wrote: > Towards the end, you mention moving a rule from being of the form > > if ((a || b ) && c) { > > to > > if (a || b) { > if (c) { > > , where c is an expensive check and (a || b) rules out most pages, and seeing a > CPU usage decrease. This seems odd to me, since I'd expect short-circuiting to > cut out the check for c if (a || b) is false. In reality what I did was closer to changing: if ((a || b ) && c) { } if ((a || b ) && d) { } if ((a || b ) && e) { } to: if (a || b) { if (c) { } if (d) { } if (e) { } } where c,d & e were large regex functions. The test ( a || b ) was matched about 14% of the time. I don't think I would see as large a drop in CPU usage if "c" wasn't being checked in the original code when even when (a || b) failed. -- Simon Lyall | Very Busy | Web: http://www.darkmere.gen.nz/ "To stay awake all night adds a day to your life" - Stilgar | eMT. From james at ifixit.com Tue Dec 18 22:17:36 2012 From: james at ifixit.com (James Pearson) Date: Tue, 18 Dec 2012 14:17:36 -0800 Subject: Reducing CPU usage In-Reply-To: References: <1355864930-sup-8737@geror.local> Message-ID: <1355869019-sup-259@geror.local> Excerpts from Simon Lyall's message of 2012-12-18 14:10:37 -0800: > On Tue, 18 Dec 2012, James Pearson wrote: > > Towards the end, you mention moving a rule from being of the form > > > > if ((a || b ) && c) { > > > > to > > > > if (a || b) { > > if (c) { > > > > , where c is an expensive check and (a || b) rules out most pages, and seeing a > > CPU usage decrease. This seems odd to me, since I'd expect short-circuiting to > > cut out the check for c if (a || b) is false. > > In reality what I did was closer to changing: > > if ((a || b ) && c) { } > if ((a || b ) && d) { } > if ((a || b ) && e) { } > > to: > > if (a || b) { > if (c) { } > if (d) { } > if (e) { } > } > > where c,d & e were large regex functions. The test ( a || b ) was matched > about 14% of the time. Ok, that makes more sense. Thanks for the clarification. From kuba at ovh.net Thu Dec 20 14:12:05 2012 From: kuba at ovh.net (Jakub =?utf-8?B?U8WCb2NpxYRza2k=?=) Date: Thu, 20 Dec 2012 15:12:05 +0100 Subject: hit_for_pass vs restart + pass and huge files Message-ID: <20121220141205.GX27633@kuba.local.lp> Hello guys, I'm curious how to play with huge files that we don't want to cache, but to stream. The idea is to play with multiple simu downloads (pass, streaming) when file > 4GB for example. I'm testing configuration pasted below, but have pbms with hit_for_pass vs pass. I want varnish to force NOT to cache files based on Content-Length. When I simply do check and hit_for_pass then, varnish tries to cache it (even with beresp.ttl set to 0s). That makes even HEAD requests terribly long. Configuration below is some way of trick-fix. Is there any other way doing that ? Using 3.0.3-streaming for tests with hash_ignore_busy and do_stream. PS. you have bug in std.integer which is 32bit long only and for huge files shows values < 0. -- CUT -- sub vcl_recv { set req.hash_ignore_busy = true; if(req.http.BIG){ return (pass); } return(lookup); } sub vcl_fetch { set beresp.do_stream = true; if(! req.http.BIG && ((std.integer(beresp.http.Content-Length,0) > 4294967296 || std.integer(beresp.http.Content-Length,0) < 0))){ set req.http.BIG = "1"; return (restart); } # do not cache files > 4GB if (req.http.BIG) { remove req.http.BIG; set beresp.ttl = 0s; return (hit_for_pass); } return(deliver); } -- CUT -- -- Jakub From ruben at varnish-software.com Fri Dec 21 16:21:03 2012 From: ruben at varnish-software.com (=?UTF-8?Q?Rub=C3=A9n_Romero?=) Date: Fri, 21 Dec 2012 17:21:03 +0100 Subject: A little Christmas gift (VUG6 Videos and some stats) Message-ID: Hello everyone, Just in time before Christmas we have a little gift (yay!): = VUG6 Videos = Thanks to the BBC (for hosting the event and editing the videos) we managed to upload the videos from the Varnish User Group meeting @ in London, UK to YouTube. All sessions from the Varnish User Day are in this playlist (Make sure to subscribe to our YouTube channel, once you are at it): https://www.youtube.com/playlist?list=PLZr7OWfYMtbHOHJxO4fW-NBe7abCBrMPi = Varnish Growth 2012 = In other news, Built With's trends show that Varnish usage has seen quite a bit of growth the last year, being the Web Server (is it or is it not?) with most growth the last twelve months: http://trends.builtwith.com/Web%20Server/growth#!oneYear So have a great holiday everyone and let's keep further web Varnishing in 2013! Cheers, -- *Rub?n Romero* Community Cheerleader | Varnish Software AS Cell: +47 95964088 / Office: +47 21989260 Skype & Twitter: ruben_varnish We Make Websites Fly! -------------- next part -------------- An HTML attachment was scrubbed... URL: From james at ifixit.com Fri Dec 21 21:48:40 2012 From: james at ifixit.com (James Pearson) Date: Fri, 21 Dec 2012 13:48:40 -0800 Subject: Why use status code 750 for redirects? Message-ID: <1356126336-sup-9448@geror.local> In the Varnish book (and every site reposting the same example), we are shown how to make a redirect in VCL by using 'error 750'.[1] This seems more roundabout than necessary - why not just use 'error 302'? It'll end up being the same to the users, but is more clear in its intention. The only reason I can think of for not doing that is if you have any cases where you want to display an error page with a 302 status code, but *not* redirect. But why would you want to do that? [1]: https://www.varnish-software.com/static/book/VCL_functions.html#example-redirecting-users-with-vcl-error From bjorn at ruberg.no Fri Dec 21 22:15:57 2012 From: bjorn at ruberg.no (=?ISO-8859-1?Q?Bj=F8rn_Ruberg?=) Date: Fri, 21 Dec 2012 23:15:57 +0100 Subject: Why use status code 750 for redirects? In-Reply-To: <1356126336-sup-9448@geror.local> References: <1356126336-sup-9448@geror.local> Message-ID: <50D4DF9D.2020405@ruberg.no> On 12/21/2012 10:48 PM, James Pearson wrote: > In the Varnish book (and every site reposting the same example), we are shown > how to make a redirect in VCL by using 'error 750'.[1] This seems more > roundabout than necessary - why not just use 'error 302'? It'll end up being > the same to the users, but is more clear in its intention. > > The only reason I can think of for not doing that is if you have any cases > where you want to display an error page with a 302 status code, but *not* > redirect. But why would you want to do that? > > [1]: https://www.varnish-software.com/static/book/VCL_functions.html#example-redirecting-users-with-vcl-error > As you can see from the example you're referring to, the error 750 defined in vcl_recv is later handled in vcl_error and "translated" to a 301. Inside the VCL, it's often useful to define internal error codes that may be referred to several times, and then they are picked up in vcl_error where the error code is translated into something that the end user (or rather the browser) understands. Error codes used for internal handling within the VCL should not be within the numerical range where you'd find normal error codes. Let's say you have a lot of situations in your VCL where you need to redirect to a login URL - then it's easy and efficient to define that redirect *once*, label it e.g. error 751, and then return "error 751;" where applicable in the VCL. Of course, if you don't want or need any special handling of errors, you're at liberty to return a regular error code whenever you want to. -- Bj?rn From tim at ainfach.de Mon Dec 17 21:10:39 2012 From: tim at ainfach.de (Tim Glabisch) Date: Mon, 17 Dec 2012 21:10:39 -0000 Subject: set req.http.Connection varnish Message-ID: <001501cddc9a$f57963a0$e06c2ae0$@ainfach.de> Hello, i try to set the connection setting (having some trouble with cutted content using iis) to disable keep-alive. my main Problem is that varnish doesnt allow me to overwrite the Connection Header. set req.http.Connection = "foo"; // nothing changed set req.http.Connection2 = "foo"; // works great everytime i try to set the req.http.Connection, varnish (3.0.0 / 3.0.4) just ignores it. example: sub vcl_recv { set req.http.host = "google.de"; set req.http.Connection = "foo"; set req.http.Connection2 = "foo"; return(lookup); . using wireshark i realized that the first set is ignored. i have the same issue with accept-Encoding. hope you can hep me :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Anish.B.Kumar at ril.com Wed Dec 19 07:31:32 2012 From: Anish.B.Kumar at ril.com (Anish.B.Kumar at ril.com) Date: Wed, 19 Dec 2012 07:31:32 -0000 Subject: Configuration of varnish for HTTP streaming of Audio Message-ID: Dear Team, Please provide some help or document regarding configuration of varnish for http streaming of audio. Warm Regards, Anish Kumar Phone : 022-447-73233 "Confidentiality Warning: This message and any attachments are intended only for the use of the intended recipient(s). are confidential and may be privileged. If you are not the intended recipient. you are hereby notified that any review. re-transmission. conversion to hard copy. copying. circulation or other use of this message and any attachments is strictly prohibited. If you are not the intended recipient. please notify the sender immediately by return email. and delete this message and any attachments from your system. Virus Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email. The company cannot accept responsibility for any loss or damage arising from the use of this email or attachment." -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 1089 bytes Desc: image001.gif URL: