Inline C and memory allocation

2009-07-06 Thread Laurence Rowe
Hi, Thought my C is rather rusty by now, I'd like to make the mod_auth_tkt [1] signed cookie authentication / authorisation system work with Varnish. The idea would be to encode the acceptable authorisation tokens for a page into it's response header then check the tokens in the user's auth_tkt

Re: Inline C and memory allocation

2009-07-07 Thread Laurence Rowe
can just allocate a large buffer on the stack and test that I won't overrun it. 2009/7/7 Ken Brownfield kb+varn...@slide.com: Isn't VRT_SetHdr() what you're looking for?  Mind its semantics, though. -- Ken. On Jul 6, 2009, at 7:26 AM, Laurence Rowe wrote: Hi, Thought my C is rather rusty

Re: How many simultanious users

2009-08-12 Thread Laurence Rowe
Remember to up the ulimit -n, with http keep-alive you can quickly run into the linux default of 1024 open files/sockets. Laurence 2009/7/16 Lazy lazy...@gmail.com: assuming that each user loads 40 files in 1 minute we get 12000*60/40=18 000 users per minute Is it possible to get half of

Re: varnish redundancy

2009-09-14 Thread Laurence Rowe
2009/9/3 Poul-Henning Kamp p...@phk.freebsd.dk: For it to be really smart you want to use directors for the other_varnish and probes to ascertain health. We do not have a priority_director (we probably should have) but you can get much the same effect with the random director and very

Re: Varnish User Group Meeting 2009-09

2009-09-20 Thread Laurence Rowe
From Cambridge, take the train to London Kings Cross (approximately 50 minutes, runs every half hour). From Kings Cross take the Victoria Line (Underground) to Pimlico. Millbank tower is then a 1km walk. London journey planner: http://www.tfl.gov.uk/ National rail journey planner:

Re: Caching POSTs

2009-11-07 Thread Laurence Rowe
2009/11/6 Rob Ayres quasi...@googlemail.com: 2009/11/6 Tollef Fog Heen tfh...@redpill-linpro.com ]] Rob Ayres | I want to cache POSTs but can't get varnish to do it, is it possible? If it | makes it any easier, all requests through this cache will be of POST type. No, you can't cache

Re: Varnish/Plone css not found

2009-11-18 Thread Laurence Rowe
2009/11/17 Fu Kite (Eric Labelle) eric.a.labe...@gmail.com: Hi I'm a total newb to varnish but here is my problem: When I connect to my plone site directly there is no problem however the moment i use varnish none of the css loads and all that loads is the html... pressing on plone's links

Re: Varnish/Plone css not found

2009-11-18 Thread Laurence Rowe
ahead of time :P On Wed, Nov 18, 2009 at 12:04 PM, Laurence Rowe l...@lrowe.co.uk wrote: 2009/11/17 Fu Kite (Eric Labelle) eric.a.labe...@gmail.com: Hi I'm a total newb to varnish but here is my problem: When I connect to my plone site directly there is no problem however the moment

Re: Varnish/Plone css not found

2009-11-18 Thread Laurence Rowe
for you from the varnish log as a txt file. Thanks! On Wed, Nov 18, 2009 at 12:15 PM, Laurence Rowe l...@lrowe.co.uk wrote: What are the response headers you see in Firebug? varnishlog output is also helpful. Laurence 2009/11/18 Fu Kite (Eric Labelle) eric.a.labe...@gmail.com: Hi

Re: vcl_error synthetic escape chars

2009-12-04 Thread Laurence Rowe
According to http://varnish.projects.linpro.no/wiki/VCLSyntaxStrings you need to use 'basic' strings (not 'long' strings with the curly brackets) for %xx escapes to work. Laurence 2009/12/4 Joe Williams j...@joetify.com: Thanks Poul but I think I'm still doing something incorrectly.

Re: Purging multiple requests

2010-01-15 Thread Laurence Rowe
2010/1/12 John Norman j...@7fff.com: Scenario: -- We would prefer not to leverage checking a lot of paths. -- Many pages are cached for GET's. -- In vcl_recv, we want to remove cookies and check the cache: if (req.request == GET) {     unset req.http.cookie;     unset

Re: Strange different behavior

2010-01-15 Thread Laurence Rowe
2010/1/15 Rob S rtshils...@gmail.com: Poul-Henning Kamp wrote: You really need to find out what bit of user-agent your backend cares about.  We are talking a multiplication factor of 100-1000 here Very slightly off-topic, but is it possible to vary based on a cookie? I'd rather leave one of

Re: Handling of cache-control

2010-01-18 Thread Laurence Rowe
2010/1/18 Tollef Fog Heen tfh...@redpill-linpro.com: Hi all, we are considering changing the defaults on how the cache-control header is handled in Varnish.  Currently, we only look at s-maxage and maxage to decide if and how long an object should be cached.  (We also look at expires, but

Re: Varnish extensions for SSO support

2010-01-26 Thread Laurence Rowe
I keep meaning to look into mod_auth_tkt (http://www.openfusion.com.au/labs/mod_auth_tkt/) support for varnish. It should be fairly easy to implement with inline C and doing so would allow us to cache pages that require authorisation (by matching tokens in the signed cookie to tokens in an obj

Re: Upper and lower case strings in Varnish

2010-02-03 Thread Laurence Rowe
I don't think it's possible to write a regex that will do that in one go. There's a dumb solution though: set obj.http.Location regsuball(obj.http.Location, A, a); set obj.http.Location regsuball(obj.http.Location, B, b); ... Laurence On 3 February 2010 17:15, Richard Chiswell

Re: Not seeing a successful purge

2010-02-12 Thread Laurence Rowe
Hi, Your PURGE request is getting a different hash than your browser requests because there is no Accept-Encoding header on the PURGE. (You see the same problem when using Vary on the response). See http://varnish-cache.org/wiki/Purging. You can either use purge(req.url ~ req.url); in

Re: Connections to backend not closing

2010-02-12 Thread Laurence Rowe
On 12 February 2010 00:12, Thimo E. a...@digithi.de wrote: Hello Poul, hello Michael,  The impact [of sockets in FIN_WAIT2] should be no more than a bit of RAM. I disagree slightly :) The application which is waiting in FIN_WAIT2 has allocated structures, threads which (may or may not)