> ----- Original Message ---- > From: Tom Jackson <[EMAIL PROTECTED]> > To: [email protected] > Sent: Friday, April 11, 2008 5:14:24 PM > Subject: Re: [AOLSERVER] Compression > > On Friday 11 April 2008 16:41, Dossy Shiobara wrote: > > Configuration parameters is too coarse-grained control. Ultimately, the > > compression flag should be conditionally turned "on" in a registered > > filter if you want it at a higher level than in the actual request > > processing code, itself. (IMHO, the decision to compress a request > > should be handled on a per-request basis, as not all requests > > unilaterally benefit from server-side compression ... so this should be > > an _intelligent_ decision that's being made by the developer whether to > > compress the result or not.) > > > > My two cents, anyhow. > > If configuration is done using a trie, like threadpools, you will have very > good control. > > I think the main point is that ns_return is not the place to decide this, it > leads to very brittle code. > > Also, if I remember correctly, the ns_zlib module can be configured to only > compress data which is larger than some minimum number of bytes. So even with > a broad compression filter, you should be able to add parameters. > > For instance, look at Content-Length header, if > than some amount, compress > and rewrite the header and add others. >
Yes, see my earlier post...there is the gzipmin param that controls the minimum length to compress. The Apache folks no doubt have already gone through this analysis/debate. Here is what they have (for Apache 2.0): http://httpd.apache.org/docs/2.0/mod/mod_deflate.html Amoung other things, you can specify the mime type and browser type to decide on compression as well. Ultimately, here is what I would like to see: 1) config param to enable compression (this is already there) 2) config param to set the minimum size (this is already there) 3) config param for file/mime type to compress. Note that this would take care of the *.adp and *tcl pages as well. 4) Have a command (ns_compress) that could override gzip setting per request/page Or, have a separate command (ns_returnz) that does the over riding. Logic would be: 1) check if compression is enabled globally (#1 above) 2) check file type/mime type to see if compression is enabled 3) check content length to see if > gzipmin 4) Override the above if ns_compress is set I think this gives a good control over what you end up compressing. If you are in a high bandwidth, high requests/sec, you might turn off compression, or have gzipmin at a high level. If you are at the other end of the spectrum (me), you will most likely be compressing most things. BTW, one thing I left out in an earlier post. For those interested in the Yahoo performance tips, and for those that use Firefox...there's an extension called YSlow that you can add that will test a web page's response against the 10 performance tips I referred to earlier. It's actually very useful. Thanks, --brett __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.
