Enable cache_html_flow for pagespeed module

19 views
Skip to first unread message

Vovchik

unread,
Mar 21, 2014, 1:37:42 PM3/21/14
to mod-pagesp...@googlegroups.com
I want to enable cache html feature in mod_pagespeed for apache. This feature is used in PageSpeed service. I see 

net/instaweb/automatic/public/cache_html_flow class and cache_html_filter (and other required filters) in the source code for mod_pagespeed. This makes me think that it is possible to get it activated in the module (may probably require code/build changes). Has anyone done this before?  

Joshua Marantz

unread,
Mar 21, 2014, 2:56:00 PM3/21/14
to mod-pagespeed-discuss
mod_pagespeed does indeed support caching HTML, but it does not actually use the code you found, and the feature is not the same as the PSS one.

See this for details:


On Fri, Mar 21, 2014 at 1:37 PM, Vovchik <wmwi...@gmail.com> wrote:
I want to enable cache html feature in mod_pagespeed for apache. This feature is used in PageSpeed service. I see 

net/instaweb/automatic/public/cache_html_flow class and cache_html_filter (and other required filters) in the source code for mod_pagespeed. This makes me think that it is possible to get it activated in the module (may probably require code/build changes). Has anyone done this before?  

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/f17a83d9-a2e9-4279-81ea-83d6d26afdb9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vovchik

unread,
Mar 25, 2014, 11:51:20 AM3/25/14
to mod-pagesp...@googlegroups.com
I don't think that I can implement html caching with non-cacheable parts using a separate downstream cache. The idea is that on the cache hit, the html (with non-cacheables stripped out) is flushed early, and then the cache_html_filter delivers js script with non-cacheable elements generated from the backend fetch. Any help in this direction is highly appreciated.


On Friday, March 21, 2014 12:56:00 PM UTC-6, jmarantz wrote:
mod_pagespeed does indeed support caching HTML, but it does not actually use the code you found, and the feature is not the same as the PSS one.

See this for details:
On Fri, Mar 21, 2014 at 1:37 PM, Vovchik <wmwi...@gmail.com> wrote:
I want to enable cache html feature in mod_pagespeed for apache. This feature is used in PageSpeed service. I see 

net/instaweb/automatic/public/cache_html_flow class and cache_html_filter (and other required filters) in the source code for mod_pagespeed. This makes me think that it is possible to get it activated in the module (may probably require code/build changes). Has anyone done this before?  

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

Joshua Marantz

unread,
Mar 25, 2014, 12:42:13 PM3/25/14
to mod-pagespeed-discuss
That's correct.  The PSS html-caching strategy allows you to specify non-cacheable panels which are punched out of a fast response from the PSS server closest to the client, and then filled in from origin after rendering the cacheable panels.

We have discussed this feature in the context of MPS but don't have anything yet, for two reasons:
  • This feature is most compelling in a reverse proxy where there is a PageSpeed server close to the client and far from the origin.  We don't know how common that is for mod_pagespeed, where the most "natural" path is to put PageSpeed in the origin.
  • We don't know how to implementing this feature in Apache without entirely replacing mod_proxy.  This is possible, but it's a bit of work for us because we'd have to duplicate all of mod_proxy's functionality and convince sites to switch to our implementation. We'd first like to hear more about the detailed deployment model to see whether this feature would help large numbers of sites.
Do you have a proxy setup as I described?
-Josh


To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/b8cbbf43-6e3e-4ccf-ae8a-47d1bef31563%40googlegroups.com.

Vovchik

unread,
Mar 25, 2014, 1:48:53 PM3/25/14
to mod-pagesp...@googlegroups.com
If apache's frame is problematic, can we then build pagespeed and run it as a self-contained proxy (probably relying on proxy_interface in net/instaweb automatic)? 


On Tuesday, March 25, 2014 10:42:13 AM UTC-6, jmarantz wrote:
That's correct.  The PSS html-caching strategy allows you to specify non-cacheable panels which are punched out of a fast response from the PSS server closest to the client, and then filled in from origin after rendering the cacheable panels.

We have discussed this feature in the context of MPS but don't have anything yet, for two reasons:
  • This feature is most compelling in a reverse proxy where there is a PageSpeed server close to the client and far from the origin.  We don't know how common that is for mod_pagespeed, where the most "natural" path is to put PageSpeed in the origin.
  • We don't know how to implementing this feature in Apache without entirely replacing mod_proxy.  This is possible, but it's a bit of work for us because we'd have to duplicate all of mod_proxy's functionality and convince sites to switch to our implementation. We'd first like to hear more about the detailed deployment model to see whether this feature would help large numbers of sites.
Do you have a proxy setup as I described?
-Josh
On Tue, Mar 25, 2014 at 11:51 AM, Vovchik <wmwi...@gmail.com> wrote:
I don't think that I can implement html caching with non-cacheable parts using a separate downstream cache. The idea is that on the cache hit, the html (with non-cacheables stripped out) is flushed early, and then the cache_html_filter delivers js script with non-cacheable elements generated from the backend fetch. Any help in this direction is highly appreciated.


On Friday, March 21, 2014 12:56:00 PM UTC-6, jmarantz wrote:
mod_pagespeed does indeed support caching HTML, but it does not actually use the code you found, and the feature is not the same as the PSS one.

See this for details:
On Fri, Mar 21, 2014 at 1:37 PM, Vovchik <wmwi...@gmail.com> wrote:
I want to enable cache html feature in mod_pagespeed for apache. This feature is used in PageSpeed service. I see 

net/instaweb/automatic/public/cache_html_flow class and cache_html_filter (and other required filters) in the source code for mod_pagespeed. This makes me think that it is possible to get it activated in the module (may probably require code/build changes). Has anyone done this before?  

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsubscri...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

Joshua Marantz

unread,
Mar 25, 2014, 1:53:44 PM3/25/14
to mod-pagespeed-discuss
I would recommend checking out the Apache Traffic Server version of PageSpeed:  http://www.atsspeed.com/.  This will get you a lot of the way there.  I am not sure if they have been able to integrate the partial cache rewriter.  Bu that is probably an easier place to start than Apache HTTPD.

-Josh



To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/7f1bd923-efbc-4bb7-b7cc-3d99f26e4214%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages