Re: [MERGE] Squid Patch (revision 10487)
On 2014-05-13 11:53, Amos Jeffries wrote: On 13/05/2014 10:52 p.m., Amos Jeffries wrote: On 13/05/2014 4:56 a.m., Michael Pye wrote: On 2014-05-12 16:52, Amos Jeffries wrote: Here is the guts of the original patch as should be relevant to Squid-3.5 (or 3.4). http://master.squid-cache.org/~amosjeffries/patches/Pye_s35.patch Many thanks Amos, I've just tried this and it does indeed query sibling for stale content as we want. I think there is some logic that will need updating however in HttpHeader.cc possibly, as when an object becomes stale and the sibling does not have a fresh copy, the origin is queried but the Age: and X-Cache:HIT from headers are still on the new request, even though it was a fresh check from the origin. I think these headers need to be deleted/updated. Is this a fully new set of headers+object from the server? or a revalidation update/refresh from the server? It's a revalidation, so it sends an if-modified-since to the origin which replies with a 304 not modified. At this point it seems the Age: needs recalculating. Thanks Michael
Re: [MERGE] Squid Patch (revision 10487)
On 2014-05-13 11:53, Amos Jeffries wrote: On 13/05/2014 10:52 p.m., Amos Jeffries wrote: On 13/05/2014 4:56 a.m., Michael Pye wrote: On 2014-05-12 16:52, Amos Jeffries wrote: Here is the guts of the original patch as should be relevant to Squid-3.5 (or 3.4). http://master.squid-cache.org/~amosjeffries/patches/Pye_s35.patch Many thanks Amos, I've just tried this and it does indeed query sibling for stale content as we want. I think there is some logic that will need updating however in HttpHeader.cc possibly, as when an object becomes stale and the sibling does not have a fresh copy, the origin is queried but the Age: and X-Cache:HIT from headers are still on the new request, even though it was a fresh check from the origin. I think these headers need to be deleted/updated. Is this a fully new set of headers+object from the server? or a revalidation update/refresh from the server? On the former Age and X-Cache are correct because it is just a fresher update of the initial cache HIT object. Oops I meant s/former/latter/. Sorry - reread what you said. So if its a revalidation and the content hasn't changed (304 from origin), under normal squid *without* this patch, Age will return to 0 and count up to the max-age again before doing another revalidation. A max-age 60 second object will remain in cache for 60 seconds before revalidation. With the patch applied, if squidA gets a copy of the content from siblingB where Age already has X seconds set, when that object is next revalidated against the origin (now siblingB copy has expired), its Age remains at X seconds, counting up to max-age. The max-age 60 object is now revalidating against the origin every 30 seconds, I would have expected it to return to validating every 60 seconds. Thanks Michael
Re: [MERGE] Squid Patch (revision 10487)
On 2014-05-11 18:40, Amos Jeffries wrote: Not as yet. Henrik pointed out a problem that needed testing: http://www.squid-cache.org/mail-archive/squid-dev/201005/0156.html I dont think we send only-if-cached any longer. Can you confirm that, or answer Henriks question? Sorry - I can't confirm that, I don't know the internals well enough for that. I am still interested in getting this patch to be either included or tested however. If I can help on testing this please let me know. I have compiled a version with the patch on squid 3.4.5 and it appears to do what we want, however it seems to have a bug. When a stale object needs updating, it does query the sibling, and if it has a fresher copy it is returned. If however the sibling does not have a fresher copy the original squid queries the origin, but seems to keep the Age: header from the last stale request, so although it has updated the object it will expire quicker than it should as it has an incorrectly calculated Age: header on it. I assume this is due to the patch introducing something new that is not being considered when refreshing from a sibling. Anyone interested in helping on this ? Many thanks Michael
Re: [MERGE] Squid Patch (revision 10487)
On 2014-05-12 16:52, Amos Jeffries wrote: Here is the guts of the original patch as should be relevant to Squid-3.5 (or 3.4). http://master.squid-cache.org/~amosjeffries/patches/Pye_s35.patch Many thanks Amos, I've just tried this and it does indeed query sibling for stale content as we want. I think there is some logic that will need updating however in HttpHeader.cc possibly, as when an object becomes stale and the sibling does not have a fresh copy, the origin is queried but the Age: and X-Cache:HIT from headers are still on the new request, even though it was a fresh check from the origin. I think these headers need to be deleted/updated. Thanks again Michael
Re: Patch for squid short expiration time
Henrik Nordstrom wrote: I am not very fond of the format. Would prefer refresh_pattern min [unit] pct max [unit] I was about to have a bash at this using strsep instead of strtok to parse the refresh_pattern as strsep allows you to test the next token as well as the current token. This way you can check for optional tokens like the units will be. strsep however is not as portable as strtok, it's not in solaris for example, so we would need to include a test for strsep and provide it if there is no system version. Does this seem reasonable ? The code for calculating the seconds based on unit size is already in cache_cf.c function parseTimeUnits, so this bit should be fairly straight forward. -- Michael
Re: Patch for squid short expiration time
Henrik Nordstrom wrote: Now also backported to Squid-2.6. Thanks for this addition. I had done something similar to Eduards modification in my caches. However this backport doesn't allow you to specifiy the minimum refresh time in seconds. You may have a situation where you want the minimum refresh time to be 20 seconds, but still have some other refresh_patterns that use 40 seconds. Would it be possible to add this ? Eduards patch seems to allow you to add an 's' after the minumum refresh time to indicate secconds so either this or another directive like minimum_refresh_seconds on could be used where seconds is assumed in refresh_pattern min times. I would be happy to submit something for that. As its a new feature however I guess it needs to go into squid3 first? -- Michael
2.6 no u_int8_t
solaris 10, gcc 3.4.3, compiling squid 2.6 RC1. u_int8_t isn't defined in solaris. Should I file a bug report, is that preferable ? wccp2.c: In function `wccp2_update_md5_security': wccp2.c:388: error: `u_int8_t' undeclared (first use in this function) wccp2.c:388: error: (Each undeclared identifier is reported only once wccp2.c:388: error: for each function it appears in.) wccp2.c:388: error: syntax error before md5_digest wccp2.c:416: error: `md5_digest' undeclared (first use in this function) wccp2.c: In function `wccp2_check_security': wccp2.c:430: error: `u_int8_t' undeclared (first use in this function) wccp2.c:430: error: syntax error before md5_digest wccp2.c:453: error: `md5_challenge' undeclared (first use in this function) wccp2.c:458: error: `md5_digest' undeclared (first use in this function) *** Error code 1 make: Fatal error: Command failed for target `wccp2.o' -- Michael
Re: 2.6 no u_int8_t
Michael Pye wrote: u_int8_t isn't defined in solaris. ... but uint8_t is. Adding typedef uint8_t u_int8_t; to typedefs.h fixes it. Or, if u_int8_t and uint8_t are the same, could just replace the use of u_int8_t on lines 388 and 430 of wccp2.c with uint8_t. -- Michael
Re: 2.6, all features merged?
Henrik Nordstrom wrote: All the planned features (plus a little more) have now been merged into the 2.6 release. Individual changesets: Where can I checkout the sources for 2.6 ? Presumably I can check it out of cvs somewhere but I can find a 2_6 branch. 2.5 HEAD seems to have some 2.6 changes in it but not all. I'd like to test 2.6 and start giving feedback. Thanks -- Michael
Re: 2.6, all features merged?
Michael Pye wrote: Where can I checkout the sources for 2.6 ? No matter - I got it, the 2.5 HEAD branch now has all the changes. Thanks, -- Michael
Re: next weekend...
On Tue, Apr 25, 2006 at 07:56:50PM +0800, Adrian Chadd wrote: its on macosx, so it should appear in BSD. On Tue, Apr 25, 2006, Robert Collins wrote: How portable is strtok_r ? Specifically is it available on mingw, BSD systems ? strtok_r has been available in FreeBSD since 3.1. -- Michael Pye
Re: Hi there
Doug Dixon wrote: I've been a user of Squid for a few years now, and am interested in devoting some time to Squid-3.0 development, bugfixing and testing. In terms of features, I'm interested in helping with the reverse proxy stuff, e.g. collapsed forwarding etc. Hi all I'd just like to back up Dougs comments really. Have been using squid for about a year on some heavy traffic sites as an accelerator which has been a great performance booster. We have a load balanced cluster of squids that have peaked at about 5.5k requests per second, and will probably do more. There's no way the backend web servers would have coped with that so squid has been a big plus for us. Thanks to all. The discussion on whether to release a 2.6 has interested me recently, as a squid2.5+rproxy+customlog+collapsed_forwarding would really be useful to me. The current rproxy patch patches against STABLE12, whilst the customlog and collapsed_fowarding patches patch against STABLE13. Would it be possible for the rproxy patch to be updated to patch against STABLE13? I can offer a heavily used accelerator environment for testing squid3/patches etc. One small change we've made in our environment is to allow the specification of the minimum explicit expiry time in seconds rather than minutes as we have some objects that are hit multiple times a second but are updated every 30 seconds or so. Works well for us. Thanks, -- Michael Pye
Re: Hi there
Doug Dixon wrote: I'd like to catch up here if I may - what's rproxy? I gather it's a patch to enhance Squid 2.5's reverse proxy capabilities, but where is it, what does it do, etc? How cool is it? ;) It's a patch by Henrik available at: http://devel.squid-cache.org/old_projects.html#rproxy It had been out of date for a long time, originally written for some pre 2.5 (?) version, but has recently been updated to patch against 2.5-STABLE12. The features in it useful for me are load balancing of back end web servers with healthcheck and sticky sessions. Most of its features have been ported to squid3. -- Michael Pye