Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Help accounting for number of bytes served pre and post-optimization #333

Open
GoogleCodeExporter opened this issue Apr 6, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

I'm using mod_deflate for some time now. I require knowledge of original size 
of webpage before compression per every request. I achive this with mod_logio 
and something like that:

LogFormat "%h %l %u %t \"%r\" %>s |axxa| \"%{Referer}i\"
\"%{User-Agent}i\"|move%I|%O|%{outstream}n|%{instream}n" combined

<VirtualHost * >
...
DeflateFilterNote Input instream
DeflateFilterNote Output outstream

CustomLog /home/domlogs/file combined
...
</virtualhost>

That works fine. I can check original size before compression on every request. 
However mod_pagespeed uses some internal directives to deflate and I'm unable 
to DeflateFilterNote 


<VirtualHost * >
...
CustomLog /home/domlogs/file combined
<IfModule pagespeed_module>
DeflateFilterNote Input instream
DeflateFilterNote Output outstream
    ModPagespeed on
    ModPagespeedFileCachePath            "/home/mod_pagespeed/naox/cache/"
    ModPagespeedGeneratedFilePrefix      "/home/mod_pagespeed/naox/files/"
    ModPagespeedRewriteLevel PassThrough
    ModPagespeedEnableFilters extend_cache
    <Location /mod_pagespeed_beacon>
          SetHandler mod_pagespeed_beacon
    </Location>
</IfModule>
...
</virtualhost>

logging works fine, but %{outstream}n|%{instream} are empty. Compression 
however takes place (which I see sniffing packets and on the size in %I|%O).

Original issue reported on code.google.com by krz...@gmail.com on 8 Aug 2011 at 3:27

@GoogleCodeExporter
Copy link
Author

Hi -- what is the goal of your usage of DeflateFilterNote?  Why do you need the 
original size of the web-page before compression?

What's different about your site as opposed to the generic usage of mod_deflate?

Original comment by jmara...@google.com on 8 Aug 2011 at 3:36

@GoogleCodeExporter
Copy link
Author

mod_pagespeed offers more optimalizations than pure deflate (which currenty I 
dont use all, but maybe later).

I need original size of webpage, request in fact, so I continue to account 
bandwidth for customers on same level even with compression. This days 
bandwidth limitations are (over) simplified markers for resource use (like 
processing power, io, memory). Those resources are much much harder to monitor, 
and also are not simple or transparent to customers. So most hosting providers 
base differenting their services on bandwidth calulation, even if actual 
bandwidth might not be issue at all (!)

Original comment by krz...@gmail.com on 8 Aug 2011 at 3:41

@GoogleCodeExporter
Copy link
Author

I know that many other filters od mod_pagespeed save bandwidth, so that is also 
bad, but compression (deflate) does most of it - so DeflateFilterNote would be 
priority.

Original comment by krz...@gmail.com on 8 Aug 2011 at 3:44

@GoogleCodeExporter
Copy link
Author

summary was: not compatibile with DeflateFilterNote


This could be accomplished via logging, response-headers, or statistics.

Original comment by jmara...@google.com on 24 May 2012 at 7:41

  • Changed title: Help accounting for number of bytes served pre and post-optimization
  • Changed state: Accepted

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant