You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pagespeed.apache.org by GitBox <gi...@apache.org> on 2020/06/09 15:53:53 UTC

[GitHub] [incubator-pagespeed-ngx] adrelanos opened a new issue #1692: document gzip, gzip_static, brotli and brotli_static

adrelanos opened a new issue #1692:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1692


   Documentation is at the moment a bit sparse on [nginx gzip](https://nginx.org/en/docs/http/ngx_http_gzip_module.html). Specifically nginx [gzip_static](https://nginx.org/en/docs/http/ngx_http_gzip_static_module.html#gzip_static).
   
   It is my understanding that gzip_static cannot be easily used in conjunction with nginx pagespeed. Source: testing myself and [this blog post](https://www.getpagespeed.com/server-setup/varnish-ssl-brotli-gzip-pagespeed-putting-things-together).
   
   I guess the way the architecture works is that nginx pagespeed needs/fetches the resource without compression, optimizes it and then adds its own dynamic gzip compression? The gzip compression might even be static once nginx pagespeed has cached the resource?
   
   Perhaps worth mentioning in pagespeed documentation that [gzip_static](https://nginx.org/en/docs/http/ngx_http_gzip_static_module.html#gzip_static) is not worth bothering with when using nginx pagespeed?
   
   [This blog post](https://www.getpagespeed.com/server-setup/varnish-ssl-brotli-gzip-pagespeed-putting-things-together) indicates that it's possible to get quasi gzip static. Perhaps you could shed some light on that?
   
   Also can't find any mentions of [brotli](https://github.com/google/brotli) / brotli_static.
   
   related google search terms:
   
   > site:https://www.modpagespeed.com gzip
   > site:https://www.modpagespeed.com gzip_static
   > site:https://www.modpagespeed.com brotli
   > site:https://www.modpagespeed.com brotli_static


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-ngx] oschaaf commented on issue #1692: document gzip, gzip_static, brotli and brotli_static

Posted by GitBox <gi...@apache.org>.
oschaaf commented on issue #1692:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1692#issuecomment-640866476


   For `gzip_static`, I think it matters if the origin involved is low latency and high bandwidth or far off. Concretely, if a hypothetical ngx_pagespeed enabled proxy runs in front of a far-away origin with limited bandwidth and high latency, then gzipping static content could make sense. On the other hand, if both reside in the same datacenter -- or even process, then the extra cycles spent on compressing/decompressing might not make a lot of sense sense.
   
   So given the above, instead of a generic recommendation, I'd be more in favor of describing such scenarios in our docs. 
   
   It's also worth mentioning that regardless of nginx's configuration, pagespeed modules cache compressed versions for serving for resources where that makes sense.So I think `gzip_static` primarily applies to what happens when pagespeed fetches it's input resources. That leaves the case for serving static html. ngx_pagespeed will enable dynamic gzip compression when gzip isn't configured in nginx, as the static html by definition no longer is static when it flows through a pagespeed module.
   
    


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-ngx] Danrancan commented on issue #1692: document gzip, gzip_static, brotli and brotli_static

Posted by GitBox <gi...@apache.org>.
Danrancan commented on issue #1692:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1692#issuecomment-1065956770


   > Also can't find any mentions of [brotli](https://github.com/google/brotli) / brotli_static.
   @Lofesa mentioned and did some explanation of how to get brotli working in nginx with the PS module in [this post](https://github.com/apache/incubator-pagespeed-ngx/issues/1746#issuecomment-1056530317).
   
   @Lofesa
   >About your config:
   >`pagespeed HttpCacheCompressionLevel 9;`
   >This line makes pagespeed to store optimized resources gziped, and serve it as gzip. To serve it with brotli compression you need to set it to 0, then optimized resources are stored w/o compression and brotli compress it on the fly.
   
   So it sounds like to get brotli working, you just need to disable gzip in your pagespeed configuration with
   `pagespeed HttpCacheCompressionLevel 0;`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@pagespeed.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org