Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

Nginx HTTP/2 patch disabled or breaks ngx_pagespeed under SSL #1004

Closed
centminmod opened this issue Aug 12, 2015 · 14 comments
Closed

Nginx HTTP/2 patch disabled or breaks ngx_pagespeed under SSL #1004

centminmod opened this issue Aug 12, 2015 · 14 comments

Comments

@centminmod
Copy link

Nginx has released first HTTP/2 alpha patch https://www.nginx.com/blog/early-alpha-patch-http2/ and that seems to break ngx_pagespeed for HTTP/2 SSL based sites https://community.centminmod.com/posts/17342/

I get in ngx_pagespeed message log for https://sslspdy.com site which is using Nginx 1.9.3 patched with HTTP/2

I[Wed, 12 Aug 2015 03:55:45 GMT] [Info] [14047] Cannot fetch url 'https://192.1
84.89.66/img/110814/ssllabs_ecc_ssl_comodo_trial_02.png': as https is not suppo
rted
I[Wed, 12 Aug 2015 03:55:45 GMT] [Info] [14047] Cannot fetch url 'https://192.1
84.89.66/img/021014/browser_ecc_ssl_comodo_ssl_chacha20_poly1305_cipher_00.png'
: as https is not supported
I[Wed, 12 Aug 2015 03:55:45 GMT] [Info] [14047] Cannot fetch url 'https://192.1
84.89.66/img/021014/ssllabs_ecc_ssl_comodo_chacha20_poly1305ciphers_00.png': as
 https is not supported
@centminmod
Copy link
Author

Looks like HTTP/2 + ngx_pagespeed also causes webpagetest.org first view tests to timeout too - results at http://www.webpagetest.org/result/150814_8Y_3baf06f884a7d89a38dd4e71e2fced9c/

@jeffkaufman
Copy link
Contributor

What happens if you set pagespeed FetchHttps enable; ?

@jeffkaufman
Copy link
Contributor

(It looks like by "broken" you mean "optimizations that require fetching no longer work?)

@centminmod
Copy link
Author

pagespeed FetchHttps enable; still results in broken = mean optimisations and page elements are no longer rewritten - probably due to failed fetching.

You can see in webpagetest results I posted http://www.webpagetest.org/video/view.php?id=150814_d7da92402b5099925a448e3018ad683ca920bfe0&data=1

@centminmod
Copy link
Author

Added Nginx SPDY/3.1 results too https://centminmod.com/http2-versus-spdy-nginx.html

Nginx SPDY/31 + ngx_pagespeed works fine. Nginx HTTP/2 + ngx_pagespeed doesn't as pagespeed doesn't get to rewrite resources and optimise them

@centminmod
Copy link
Author

Nginx released HTTP/2 version 2 patch http://nginx.org/patches/http2/ and it seems to have fixed ngx_pagespeed issue !

nghttp -nas https://centminmod.com:443 
***** Statistics *****

Request timing:
  responseEnd: the  time  when  last  byte of  response  was  received
               relative to connectEnd
 requestStart: the time  just before  first byte  of request  was sent
               relative  to connectEnd.   If  '*' is  shown, this  was
               pushed by server.
      process: responseEnd - requestStart
         code: HTTP status code
         size: number  of  bytes  received as  response  body  without
               inflation.
          URI: request URI

see http://www.w3.org/TR/resource-timing/#processing-model

sorted by 'complete'

id  responseEnd requestStart  process code size request path
 13    +80.22ms       +532us  79.69ms  200  29K /
 15    +91.08ms     +66.98ms  24.10ms  200   9K /img/favicon.ico
 17   +125.17ms     +66.99ms  58.18ms  200  60K /css/A.localfonts.css+font-awesome.min.css+bootstrap.min.css+hover-dropdown-menu.css+icons-set8.css+animate.min.css+style.css+responsive.css+color.css,Mcc.FHj-    r4A0cI.css.pagespeed.cf.YOn5Xvomna.css
 21   +141.41ms     +66.99ms  74.42ms  200   7K /js/hover-dropdown-menu.js+jquery.hover-dropdown-menu-addon.js+jquery.easing.1.3.js.pagespeed.jc.vy5S6wKQse.js
 25   +156.83ms     +67.03ms  89.81ms  200   6K /js/custom.js.pagespeed.jm.q-StvNlmtR.js
 19   +157.11ms     +66.99ms  90.11ms  200  38K /js/jquery.min.js+bootstrap.min.js.pagespeed.jc.Cd39AMnoIp.js
 23   +157.12ms     +67.02ms  90.09ms  200  24K /js/bootstrapValidator.min.js.pagespeed.jm.YU3KUlvaHb.js   

changes

2015-08-14 Version 2 (NGINX 1.9.3)
- Introduced NPN support for HTTP/2 negotiation (this reduces OpenSSL version
   requirement to 1.0.1+);
- Various fixes in the prioritization mechanism;
- Fixed missing "Location" response header in some configurations;
- Fixed processing of the ":authority" pseudo-header (the HTTP/2 analog of
   the "Host" header).

2015-08-05 Version 1 (NGINX 1.9.3)
The first public alpha release.

@jeffkaufman
Copy link
Contributor

Great! Glad it's working now!

When the patch gets closer to ready we'll start testing against it here.

@skynet
Copy link

skynet commented Sep 25, 2015

How about the official version https://www.nginx.com/blog/nginx-1-9-5/ Did it fix this problem?

@arfaWong
Copy link

@centminmod nginx-1.9.5 fix it?

@skynet
Copy link

skynet commented Oct 24, 2015

@ranbokun We got this version installed but didn't get as far as trying to reproduce this particular bug.

@centminmod
Copy link
Author

@ranbokun was fixed in nginx http/2 alpha patch ver 2 onwards, so final 1.9.5 already works fine - running nginx 1.9.5 + nginx pagespeed + http/2 for my forums https://community.centminmod.com/ :)

@skynet
Copy link

skynet commented Oct 27, 2015

@centminmod excellent thank you!

@HomeTriangle
Copy link

@centminmod We are also using the same combo.
nginx 1.9.5 + nginx pagespeed + http/2 . Working smooth. Getting 100ms improvement in page rendering

@skynet
Copy link

skynet commented Dec 2, 2015

@HomeTriangle Nginx is already at 1.9.7: http://nginx.org/en/CHANGES

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

No branches or pull requests

4 participants