Welcome to Centmin Mod Community
Register Now

Nginx Nginx - Support for HTTP/2 Server Push

Discussion in 'Nginx and PHP-FPM news & discussions' started by buik, Apr 29, 2016.

  1. eva2000

    eva2000 Administrator Staff Member

    45,182
    10,276
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,925
    Local Time:
    11:40 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    they actually have just didn't put emphasis on it i.e. nginx plus sticky sessions was exclusive but they back ported it into open source nginx version but a lot of the documentation which is dated now still says it's a exclusive nginx plus feature.

    Glass half full vs half empty I guess. I can also see if as nginx plus features getting paid development + beta testing and fine tuning by paid companies. By the time it trickles down to nginx open source (of course if it trickles down), it's tried and proven in terms of features, stability and usefulness :D
     
  2. buik

    buik “A winner never stops trying.” Premium Member

    1,302
    358
    83
    Apr 29, 2016
    Ratings:
    +1,067
    Local Time:
    3:40 AM
    I don't have anything against any capitalistic kind of doing business but I'm more fan of the Red Hat model.
    They have 100's of millions profitable net income.
    So you can run a healthy business without joking like Nginx.

    If you want support you can buy it.
    If you don't want support then just compile your own software from there fully featured source.
     
  3. eva2000

    eva2000 Administrator Staff Member

    45,182
    10,276
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,925
    Local Time:
    11:40 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Yeah true that's why has nginx.com has commercial support plans too. But I don't think anyone using Centmin Mod's Nginx will be looking to pay for nginx.com commercial support Buy NGINX Plus Subscription Online | NGINX :)

    upload_2016-5-3_23-40-18.png
     
  4. buik

    buik “A winner never stops trying.” Premium Member

    1,302
    358
    83
    Apr 29, 2016
    Ratings:
    +1,067
    Local Time:
    3:40 AM
    Prices are peanuts if your services heavily depends on Nginx with millions and millions of website (content) visitors.
    Nginx could do both, ask money for support but also release the full source of there product.
     
  5. eva2000

    eva2000 Administrator Staff Member

    45,182
    10,276
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,925
    Local Time:
    11:40 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Problem with that approach is then less companies will pay for nginx plus for the development of the nginx as they'd use the nginx open source version instead
     
  6. eva2000

    eva2000 Administrator Staff Member

    45,182
    10,276
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,925
    Local Time:
    11:40 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    thanks to @Xon for heads up for updated article by Cloudflare on HTTP/2 server push implementation Using HTTP/2 Server Push with PHP

    Working Cloudflare HTTP/2 server push example

    Code (Text):
      add_header Link "</js/jquery/jquery-1.11.0.min.js>; rel=preload; false";
      add_header Link "</styles/default/xenforo/avatars/avatar_s.png>; rel=preload; false";
    

    Link rel preload headers will be removed by HTTP/2 client calls
    Code (Text):
    curl -I https://CLOUDFLARE_HTTP2SITE.COM
    HTTP/2.0 200
    date: Wed, 18 May 2016 01:42:29 GMT
    content-type: text/html; charset=UTF-8
    set-cookie: __cfduid=dd435749; expires=Thu, 18-May-17 01:42:29 GMT; path=/; domain=.CLOUDFLARE_HTTP2SITE.COM; HttpOnly
    expires: Thu, 19 Nov 1981 08:52:00 GMT
    cache-control: private, max-age=0
    set-cookie: xf_session=0046d69bf8; path=/; secure; httponly
    x-frame-options: SAMEORIGIN
    last-modified: Wed, 18 May 2016 01:42:29 GMT
    vary: Accept-Encoding
    x-powered-by: centminmod
    x-robots-tag: noindex, nofollow, nosnippet, noarchive
    server: cloudflare-nginx
    cf-ray: 2a4b9ce3fd4c245c-IAD

    nghttp2 HTTP/2 client check for PUSH_PROMISE frames for Link rel preload pushed assets
    Code (Text):
    nghttp -nasv https://CLOUDFLARE_HTTP2SITE.COM
    [  0.071] Connected
    The negotiated protocol: h2
    [  0.288] recv SETTINGS frame <length=18, flags=0x00, stream_id=0>
              (niv=3)
              [SETTINGS_MAX_CONCURRENT_STREAMS(0x03):128]
              [SETTINGS_INITIAL_WINDOW_SIZE(0x04):2147483647]
              [SETTINGS_MAX_FRAME_SIZE(0x05):16777215]
    [  0.288] recv WINDOW_UPDATE frame <length=4, flags=0x00, stream_id=0>
              (window_size_increment=2147418112)
    [  0.288] send SETTINGS frame <length=12, flags=0x00, stream_id=0>
              (niv=2)
              [SETTINGS_MAX_CONCURRENT_STREAMS(0x03):100]
              [SETTINGS_INITIAL_WINDOW_SIZE(0x04):65535]
    [  0.288] send SETTINGS frame <length=0, flags=0x01, stream_id=0>
              ; ACK
              (niv=0)
    [  0.288] send PRIORITY frame <length=5, flags=0x00, stream_id=3>
              (dep_stream_id=0, weight=201, exclusive=0)
    [  0.288] send PRIORITY frame <length=5, flags=0x00, stream_id=5>
              (dep_stream_id=0, weight=101, exclusive=0)
    [  0.288] send PRIORITY frame <length=5, flags=0x00, stream_id=7>
              (dep_stream_id=0, weight=1, exclusive=0)
    [  0.288] send PRIORITY frame <length=5, flags=0x00, stream_id=9>
              (dep_stream_id=7, weight=1, exclusive=0)
    [  0.288] send PRIORITY frame <length=5, flags=0x00, stream_id=11>
              (dep_stream_id=3, weight=1, exclusive=0)
    [  0.288] send HEADERS frame <length=43, flags=0x25, stream_id=13>
              ; END_STREAM | END_HEADERS | PRIORITY
              (padlen=0, dep_stream_id=11, weight=16, exclusive=0)
              ; Open new stream
              :method: GET
              :path: /
              :scheme: https
              :authority: CLOUDFLARE_HTTP2SITE.COM
              accept: */*
              accept-encoding: gzip, deflate
              user-agent: nghttp2/1.11.0-DEV
    [  0.330] recv SETTINGS frame <length=0, flags=0x01, stream_id=0>
              ; ACK
              (niv=0)
    [  0.483] recv (stream_id=13) :status: 200
    [  0.483] recv (stream_id=13) date: Wed, 18 May 2016 01:44:01 GMT
    [  0.483] recv (stream_id=13) content-type: text/html; charset=UTF-8
    [  0.483] recv (stream_id=13) set-cookie: __cfduid=df286c3cf84c338f742449c0f7242fdd11463535840; expires=Thu, 18-May-17 01:44:00 GMT; path=/; domain=.CLOUDFLARE_HTTP2SITE.COM; HttpOnly
    [  0.483] recv (stream_id=13) expires: Thu, 19 Nov 1981 08:52:00 GMT
    [  0.483] recv (stream_id=13) cache-control: private, max-age=0
    [  0.483] recv (stream_id=13) set-cookie: xf_session=280d5678838243848907162a564b852c; path=/; secure; httponly
    [  0.483] recv (stream_id=13) x-frame-options: SAMEORIGIN
    [  0.483] recv (stream_id=13) last-modified: Wed, 18 May 2016 01:44:01 GMT
    [  0.483] recv (stream_id=13) vary: Accept-Encoding
    [  0.483] recv (stream_id=13) x-powered-by: centminmod
    [  0.483] recv (stream_id=13) x-robots-tag: noindex, nofollow, nosnippet, noarchive
    [  0.483] recv (stream_id=13) server: cloudflare-nginx
    [  0.483] recv (stream_id=13) cf-ray: 2a4b9f1d98a923ae-IAD
    [  0.483] recv (stream_id=13) content-encoding: gzip
    [  0.483] recv HEADERS frame <length=459, flags=0x04, stream_id=13>
              ; END_HEADERS
              (padlen=0)
              ; First response header
    [  0.483] recv (stream_id=13) :authority: CLOUDFLARE_HTTP2SITE.COM
    [  0.483] recv (stream_id=13) :method: GET
    [  0.483] recv (stream_id=13) :path: /js/jquery/jquery-1.11.0.min.js
    [  0.483] recv (stream_id=13) :scheme: https
    [  0.483] recv (stream_id=13, sensitive) accept-encoding: gzip, deflate
    [  0.483] recv PUSH_PROMISE frame <length=59, flags=0x04, stream_id=13>
              ; END_HEADERS
              (padlen=0, promised_stream_id=2)
    [  0.483] recv (stream_id=13) :authority: CLOUDFLARE_HTTP2SITE.COM
    [  0.484] recv (stream_id=13) :method: GET
    [  0.484] recv (stream_id=13) :path: /css.php?css=xenforo,form,public&style=1&dir=LTR&d=1462721700
    [  0.484] recv (stream_id=13) :scheme: https
    [  0.484] recv (stream_id=13, sensitive) accept-encoding: gzip, deflate
    [  0.484] recv PUSH_PROMISE frame <length=81, flags=0x04, stream_id=13>
              ; END_HEADERS
              (padlen=0, promised_stream_id=4)
    [  0.484] recv (stream_id=13) :authority: CLOUDFLARE_HTTP2SITE.COM
    [  0.484] recv (stream_id=13) :method: GET
    [  0.484] recv (stream_id=13) :path: /csstest/test.css
    [  0.484] recv (stream_id=13) :scheme: https
    [  0.484] recv (stream_id=13, sensitive) accept-encoding: gzip, deflate
    [  0.484] recv PUSH_PROMISE frame <length=46, flags=0x04, stream_id=13>
              ; END_HEADERS
              (padlen=0, promised_stream_id=6)
    [  0.484] recv (stream_id=13) :authority: CLOUDFLARE_HTTP2SITE.COM
    [  0.484] recv (stream_id=13) :method: GET
    [  0.484] recv (stream_id=13) :path: /styles/default/xenforo/avatars/avatar_s.png
    [  0.484] recv (stream_id=13) :scheme: https
    [  0.484] recv (stream_id=13, sensitive) accept-encoding: gzip, deflate
    [  0.484] recv PUSH_PROMISE frame <length=66, flags=0x04, stream_id=13>
              ; END_HEADERS
              (padlen=0, promised_stream_id=8)
    [  0.484] recv DATA frame <length=6032, flags=0x00, stream_id=13>
    [  0.484] recv DATA frame <length=10, flags=0x00, stream_id=13>
    [  0.484] recv DATA frame <length=0, flags=0x01, stream_id=13>
              ; END_STREAM
    [  0.484] send HEADERS frame <length=59, flags=0x25, stream_id=15>
              ; END_STREAM | END_HEADERS | PRIORITY
              (padlen=0, dep_stream_id=3, weight=2, exclusive=0)
              ; Open new stream
              :method: GET
              :path: /css.php?css=xenforo,form,public&style=1&dir=LTR&d=1462726142
              :scheme: https
              :authority: CLOUDFLARE_HTTP2SITE.COM
              accept: */*
              accept-encoding: gzip, deflate
              user-agent: nghttp2/1.11.0-DEV
    [  0.485] send HEADERS frame <length=103, flags=0x25, stream_id=17>
              ; END_STREAM | END_HEADERS | PRIORITY
              (padlen=0, dep_stream_id=3, weight=2, exclusive=0)
              ; Open new stream
              :method: GET
              :path: /css.php?css=login_bar,node_category,node_forum,node_list,sidebar_share_page,thread_list_simple&style=1&dir=LTR&d=1462726142
              :scheme: https
              :authority: CLOUDFLARE_HTTP2SITE.COM
              accept: */*
              accept-encoding: gzip, deflate
              user-agent: nghttp2/1.11.0-DEV
    [  0.485] send HEADERS frame <length=39, flags=0x25, stream_id=19>
              ; END_STREAM | END_HEADERS | PRIORITY
              (padlen=0, dep_stream_id=3, weight=2, exclusive=0)
              ; Open new stream
              :method: GET
              :path: /js/xenforo/xenforo.js?_v=9d599e1e
              :scheme: https
              :authority: CLOUDFLARE_HTTP2SITE.COM
              accept: */*
              accept-encoding: gzip, deflate
              user-agent: nghttp2/1.11.0-DEV
    [  0.485] send HEADERS frame <length=36, flags=0x25, stream_id=21>
              ; END_STREAM | END_HEADERS | PRIORITY
              (padlen=0, dep_stream_id=11, weight=12, exclusive=0)
              ; Open new stream
              :method: GET
              :path: /styles/default/xenforo/logo.png
              :scheme: https
              :authority: CLOUDFLARE_HTTP2SITE.COM
              accept: */*
              accept-encoding: gzip, deflate
              user-agent: nghttp2/1.11.0-DEV
    [  0.485] recv (stream_id=2) :status: 200
    [  0.485] recv (stream_id=2) date: Wed, 18 May 2016 01:44:01 GMT
    [  0.485] recv (stream_id=2) content-type: application/javascript; charset=utf-8
    [  0.485] recv (stream_id=2) set-cookie: __cfduid=d928364ef2d5c40d95ade907f0cbbe7ef1463535841; expires=Thu, 18-May-17 01:44:01 GMT; path=/; domain=.CLOUDFLARE_HTTP2SITE.COM; HttpOnly
    [  0.485] recv (stream_id=2) last-modified: Thu, 21 Apr 2016 10:20:49 GMT
    [  0.485] recv (stream_id=2) vary: Accept-Encoding
    [  0.485] recv (stream_id=2) etag: W/"5718a981-1787d"
    [  0.485] recv (stream_id=2) x-powered-by: centminmod
    [  0.485] recv (stream_id=2) expires: Sat, 18 Jun 2016 01:44:01 GMT
    [  0.485] recv (stream_id=2) cache-control: public, max-age=2678400
    [  0.485] recv (stream_id=2) access-control-allow-origin: *
    [  0.485] recv (stream_id=2) content-encoding: gzip
    [  0.485] recv (stream_id=2) cf-cache-status: HIT
    [  0.485] recv (stream_id=2) server: cloudflare-nginx
    [  0.485] recv (stream_id=2) cf-ray: 2a4b9f1e98c323ae-IAD
    [  0.485] recv HEADERS frame <length=407, flags=0x04, stream_id=2>
              ; END_HEADERS
              (padlen=0)
              ; First push response header
    [  0.510] recv DATA frame <length=7549, flags=0x00, stream_id=2>
    [  0.514] recv DATA frame <length=8192, flags=0x00, stream_id=2>
    [  0.519] recv DATA frame <length=8192, flags=0x00, stream_id=2>
    [  0.521] send WINDOW_UPDATE frame <length=4, flags=0x00, stream_id=0>
              (window_size_increment=34073)
    [  0.531] recv DATA frame <length=8192, flags=0x00, stream_id=2>
    [  0.532] recv DATA frame <length=1509, flags=0x00, stream_id=2>
    [  0.532] recv DATA frame <length=0, flags=0x01, stream_id=2>
              ; END_STREAM
    [  0.532] recv (stream_id=6) :status: 200
    [  0.532] recv (stream_id=6) date: Wed, 18 May 2016 01:44:01 GMT
    [  0.532] recv (stream_id=6) content-type: text/css
    [  0.532] recv (stream_id=6) set-cookie: __cfduid=d928364ef2d5c40d95ade907f0cbbe7ef1463535841; expires=Thu, 18-May-17 01:44:01 GMT; path=/; domain=.CLOUDFLARE_HTTP2SITE.COM; HttpOnly
    [  0.532] recv (stream_id=6) last-modified: Sun, 08 May 2016 16:33:40 GMT
    [  0.532] recv (stream_id=6) vary: Accept-Encoding
    [  0.532] recv (stream_id=6) etag: W/"572f6a64-1a439"
    [  0.532] recv (stream_id=6) x-powered-by: centminmod
    [  0.532] recv (stream_id=6) expires: Sat, 18 Jun 2016 01:44:01 GMT
    [  0.532] recv (stream_id=6) cache-control: public, max-age=2678400
    [  0.532] recv (stream_id=6) access-control-allow-origin: *
    [  0.532] recv (stream_id=6) content-encoding: gzip
    [  0.532] recv (stream_id=6) cf-cache-status: HIT
    [  0.532] recv (stream_id=6) server: cloudflare-nginx
    [  0.532] recv (stream_id=6) cf-ray: 2a4b9f1e98c523ae-IAD
    [  0.532] recv HEADERS frame <length=388, flags=0x04, stream_id=6>
              ; END_HEADERS
              (padlen=0)
              ; First push response header
    [  0.536] recv DATA frame <length=7578, flags=0x00, stream_id=6>
    [  0.539] recv DATA frame <length=8192, flags=0x00, stream_id=6>
    [  0.541] recv DATA frame <length=5532, flags=0x00, stream_id=6>
    [  0.541] recv DATA frame <length=0, flags=0x01, stream_id=6>
              ; END_STREAM
    [  0.542] recv (stream_id=8) :status: 200
    [  0.542] recv (stream_id=8) date: Wed, 18 May 2016 01:44:01 GMT
    [  0.542] recv (stream_id=8) content-type: image/png
    [  0.542] recv (stream_id=8) content-length: 905
    [  0.542] recv (stream_id=8) set-cookie: __cfduid=d928364ef2d5c40d95ade907f0cbbe7ef1463535841; expires=Thu, 18-May-17 01:44:01 GMT; path=/; domain=.CLOUDFLARE_HTTP2SITE.COM; HttpOnly
    [  0.542] recv (stream_id=8) last-modified: Thu, 21 Apr 2016 10:20:49 GMT
    [  0.542] recv (stream_id=8) etag: "5718a981-389"
    [  0.542] recv (stream_id=8) x-powered-by: centminmod
    [  0.542] recv (stream_id=8) expires: Sat, 18 Jun 2016 01:44:01 GMT
    [  0.542] recv (stream_id=8) cache-control: public, max-age=2678400
    [  0.542] recv (stream_id=8) access-control-allow-origin: *
    [  0.542] recv (stream_id=8) cf-cache-status: HIT
    [  0.542] recv (stream_id=8) vary: Accept-Encoding
    [  0.542] recv (stream_id=8) accept-ranges: bytes
    [  0.542] recv (stream_id=8) server: cloudflare-nginx
    [  0.542] recv (stream_id=8) cf-ray: 2a4b9f1e98c623ae-IAD
    [  0.542] recv HEADERS frame <length=389, flags=0x04, stream_id=8>
              ; END_HEADERS
              (padlen=0)
              ; First push response header
    [  0.542] recv DATA frame <length=905, flags=0x00, stream_id=8>
    [  0.542] recv DATA frame <length=0, flags=0x01, stream_id=8>
              ; END_STREAM
    [  0.542] recv (stream_id=19) :status: 200
    [  0.542] recv (stream_id=19) date: Wed, 18 May 2016 01:44:01 GMT
    [  0.542] recv (stream_id=19) content-type: application/javascript; charset=utf-8
    [  0.542] recv (stream_id=19) set-cookie: __cfduid=dc0590ca6a724eb1b276be1911dd354f51463535841; expires=Thu, 18-May-17 01:44:01 GMT; path=/; domain=.CLOUDFLARE_HTTP2SITE.COM; HttpOnly
    [  0.542] recv (stream_id=19) last-modified: Thu, 21 Apr 2016 10:20:49 GMT
    [  0.542] recv (stream_id=19) vary: Accept-Encoding
    [  0.542] recv (stream_id=19) etag: W/"5718a981-28fd3"
    [  0.542] recv (stream_id=19) x-powered-by: centminmod
    [  0.542] recv (stream_id=19) expires: Sat, 18 Jun 2016 01:44:01 GMT
    [  0.542] recv (stream_id=19) cache-control: public, max-age=2678400
    [  0.542] recv (stream_id=19) access-control-allow-origin: *
    [  0.542] recv (stream_id=19) content-encoding: gzip
    [  0.542] recv (stream_id=19) cf-cache-status: HIT
    [  0.542] recv (stream_id=19) server: cloudflare-nginx
    [  0.542] recv (stream_id=19) cf-ray: 2a4b9f1ec8cf23ae-IAD
    [  0.542] recv HEADERS frame <length=406, flags=0x04, stream_id=19>
              ; END_HEADERS
              (padlen=0)
              ; First response header
    [  0.542] recv DATA frame <length=3652, flags=0x00, stream_id=19>
    [  0.545] recv (stream_id=21) :status: 200
    [  0.545] recv (stream_id=21) date: Wed, 18 May 2016 01:44:01 GMT
    [  0.545] recv (stream_id=21) content-type: image/png
    [  0.545] recv (stream_id=21) content-length: 1999
    [  0.545] recv (stream_id=21) set-cookie: __cfduid=dc0590ca6a724eb1b276be1911dd354f51463535841; expires=Thu, 18-May-17 01:44:01 GMT; path=/; domain=.CLOUDFLARE_HTTP2SITE.COM; HttpOnly
    [  0.545] recv (stream_id=21) last-modified: Thu, 21 Apr 2016 10:20:49 GMT
    [  0.545] recv (stream_id=21) etag: "5718a981-7cf"
    [  0.545] recv (stream_id=21) x-powered-by: centminmod
    [  0.545] recv (stream_id=21) expires: Sat, 18 Jun 2016 01:44:01 GMT
    [  0.545] recv (stream_id=21) cache-control: public, max-age=2678400
    [  0.545] recv (stream_id=21) access-control-allow-origin: *
    [  0.545] recv (stream_id=21) cf-cache-status: HIT
    [  0.545] recv (stream_id=21) vary: Accept-Encoding
    [  0.545] recv (stream_id=21) accept-ranges: bytes
    [  0.545] recv (stream_id=21) server: cloudflare-nginx
    [  0.545] recv (stream_id=21) cf-ray: 2a4b9f1ec8d023ae-IAD
    [  0.545] recv HEADERS frame <length=388, flags=0x04, stream_id=21>
              ; END_HEADERS
              (padlen=0)
              ; First response header
    [  0.545] recv DATA frame <length=3897, flags=0x00, stream_id=19>
    [  0.545] send WINDOW_UPDATE frame <length=4, flags=0x00, stream_id=0>
              (window_size_increment=35285)
    [  0.547] recv DATA frame <length=8184, flags=0x00, stream_id=19>
    [  0.550] recv DATA frame <length=8192, flags=0x00, stream_id=19>
    [  0.555] recv DATA frame <length=8184, flags=0x00, stream_id=19>
    [  0.557] recv DATA frame <length=5616, flags=0x00, stream_id=19>
    [  0.557] send WINDOW_UPDATE frame <length=4, flags=0x00, stream_id=19>
              (window_size_increment=36329)
    [  0.569] recv DATA frame <length=2576, flags=0x00, stream_id=19>
    [  0.569] send WINDOW_UPDATE frame <length=4, flags=0x00, stream_id=0>
              (window_size_increment=32826)
    [  0.571] recv DATA frame <length=8192, flags=0x00, stream_id=19>
    [  0.571] recv DATA frame <length=4482, flags=0x00, stream_id=19>
    [  0.571] recv DATA frame <length=0, flags=0x01, stream_id=19>
              ; END_STREAM
    [  0.572] recv DATA frame <length=1999, flags=0x00, stream_id=21>
    [  0.572] recv DATA frame <length=0, flags=0x01, stream_id=21>
              ; END_STREAM
    [  0.629] recv (stream_id=4) :status: 200
    [  0.629] recv (stream_id=4) date: Wed, 18 May 2016 01:44:01 GMT
    [  0.629] recv (stream_id=4) content-type: text/css; charset=utf-8
    [  0.629] recv (stream_id=4) content-length: 27167
    [  0.629] recv (stream_id=4) set-cookie: __cfduid=d928364ef2d5c40d95ade907f0cbbe7ef1463535841; expires=Thu, 18-May-17 01:44:01 GMT; path=/; domain=.CLOUDFLARE_HTTP2SITE.COM; HttpOnly
    [  0.629] recv (stream_id=4) expires: Wed, 01 Jan 2020 00:00:00 GMT
    [  0.629] recv (stream_id=4) last-modified: Sun, 08 May 2016 16:49:02 GMT
    [  0.629] recv (stream_id=4) cache-control: public
    [  0.629] recv (stream_id=4) content-encoding: gzip
    [  0.629] recv (stream_id=4) vary: Accept-Encoding
    [  0.629] recv (stream_id=4) x-powered-by: centminmod
    [  0.629] recv (stream_id=4) link: </js/jquery/jquery-1.11.0.min.js>; rel=preload; false
    [  0.629] recv (stream_id=4) link: </css.php?css=xenforo,form,public&style=1&dir=LTR&d=1462721700>; rel=preload; as=style; false
    [  0.629] recv (stream_id=4) link: </csstest/test.css>; rel=preload; as=style; false
    [  0.629] recv (stream_id=4) link: </styles/default/xenforo/avatars/avatar_s.png>; rel=preload; false
    [  0.629] recv (stream_id=4) x-robots-tag: noindex, nofollow, nosnippet, noarchive
    [  0.629] recv (stream_id=4) server: cloudflare-nginx
    [  0.629] recv (stream_id=4) cf-ray: 2a4b9f1e98c423ae-IAD
    [  0.629] recv HEADERS frame <length=597, flags=0x04, stream_id=4>
              ; END_HEADERS
              (padlen=0)
              ; First push response header
    [  0.629] recv DATA frame <length=7323, flags=0x00, stream_id=4>
    [  0.630] recv DATA frame <length=739, flags=0x00, stream_id=4>
    [  0.630] recv DATA frame <length=5840, flags=0x00, stream_id=4>
    [  0.652] recv (stream_id=17) :status: 200
    [  0.652] recv (stream_id=17) date: Wed, 18 May 2016 01:44:01 GMT
    [  0.652] recv (stream_id=17) content-type: text/css; charset=utf-8
    [  0.652] recv (stream_id=17) content-length: 3454
    [  0.652] recv (stream_id=17) set-cookie: __cfduid=dc0590ca6a724eb1b276be1911dd354f51463535841; expires=Thu, 18-May-17 01:44:01 GMT; path=/; domain=.CLOUDFLARE_HTTP2SITE.COM; HttpOnly
    [  0.652] recv (stream_id=17) expires: Wed, 01 Jan 2020 00:00:00 GMT
    [  0.652] recv (stream_id=17) last-modified: Sun, 08 May 2016 16:49:02 GMT
    [  0.652] recv (stream_id=17) cache-control: public
    [  0.652] recv (stream_id=17) content-encoding: gzip
    [  0.652] recv (stream_id=17) vary: Accept-Encoding
    [  0.652] recv (stream_id=17) x-powered-by: centminmod
    [  0.652] recv (stream_id=17) x-robots-tag: noindex, nofollow, nosnippet, noarchive
    [  0.652] recv (stream_id=17) server: cloudflare-nginx
    [  0.652] recv (stream_id=17) cf-ray: 2a4b9f1ec8ce23ae-IAD
    [  0.652] recv HEADERS frame <length=371, flags=0x04, stream_id=17>
              ; END_HEADERS
              (padlen=0)
              ; First response header
    [  0.652] recv (stream_id=17) :authority: CLOUDFLARE_HTTP2SITE.COM
    [  0.652] recv (stream_id=17) :method: GET
    [  0.652] recv (stream_id=17) :path: /js/jquery/jquery-1.11.0.min.js
    [  0.652] recv (stream_id=17) :scheme: https
    [  0.652] recv (stream_id=17, sensitive) accept-encoding: gzip, deflate
    [  0.652] recv PUSH_PROMISE frame <length=59, flags=0x04, stream_id=17>
              ; END_HEADERS
              (padlen=0, promised_stream_id=10)
    [  0.652] recv (stream_id=17) :authority: CLOUDFLARE_HTTP2SITE.COM
    [  0.652] recv (stream_id=17) :method: GET
    [  0.652] recv (stream_id=17) :path: /css.php?css=xenforo,form,public&style=1&dir=LTR&d=1462721700
    [  0.652] recv (stream_id=17) :scheme: https
    [  0.652] recv (stream_id=17, sensitive) accept-encoding: gzip, deflate
    [  0.652] recv PUSH_PROMISE frame <length=81, flags=0x04, stream_id=17>
              ; END_HEADERS
              (padlen=0, promised_stream_id=12)
    [  0.652] recv (stream_id=17) :authority: CLOUDFLARE_HTTP2SITE.COM
    [  0.652] recv (stream_id=17) :method: GET
    [  0.652] recv (stream_id=17) :path: /csstest/test.css
    [  0.652] recv (stream_id=17) :scheme: https
    [  0.652] recv (stream_id=17, sensitive) accept-encoding: gzip, deflate
    [  0.652] recv PUSH_PROMISE frame <length=46, flags=0x04, stream_id=17>
              ; END_HEADERS
              (padlen=0, promised_stream_id=14)
    [  0.652] recv (stream_id=17) :authority: CLOUDFLARE_HTTP2SITE.COM
    [  0.652] recv (stream_id=17) :method: GET
    [  0.652] recv (stream_id=17) :path: /styles/default/xenforo/avatars/avatar_s.png
    [  0.652] recv (stream_id=17) :scheme: https
    [  0.652] recv (stream_id=17, sensitive) accept-encoding: gzip, deflate
    [  0.652] recv PUSH_PROMISE frame <length=66, flags=0x04, stream_id=17>
              ; END_HEADERS
              (padlen=0, promised_stream_id=16)
    [  0.652] recv DATA frame <length=3454, flags=0x00, stream_id=17>
    [  0.652] recv DATA frame <length=0, flags=0x01, stream_id=17>
              ; END_STREAM
    [  0.652] send RST_STREAM frame <length=4, flags=0x00, stream_id=10>
              (error_code=CANCEL(0x08))
    [  0.652] send RST_STREAM frame <length=4, flags=0x00, stream_id=12>
              (error_code=CANCEL(0x08))
    [  0.652] send RST_STREAM frame <length=4, flags=0x00, stream_id=14>
              (error_code=CANCEL(0x08))
    [  0.652] send RST_STREAM frame <length=4, flags=0x00, stream_id=16>
              (error_code=CANCEL(0x08))
    [  0.653] recv (stream_id=15) :status: 200
    [  0.653] recv (stream_id=15) date: Wed, 18 May 2016 01:44:01 GMT
    [  0.653] recv (stream_id=15) content-type: text/css; charset=utf-8
    [  0.653] recv (stream_id=15) content-length: 27167
    [  0.653] recv (stream_id=15) set-cookie: __cfduid=dc0590ca6a724eb1b276be1911dd354f51463535841; expires=Thu, 18-May-17 01:44:01 GMT; path=/; domain=.CLOUDFLARE_HTTP2SITE.COM; HttpOnly
    [  0.653] recv (stream_id=15) expires: Wed, 01 Jan 2020 00:00:00 GMT
    [  0.653] recv (stream_id=15) last-modified: Sun, 08 May 2016 16:49:02 GMT
    [  0.653] recv (stream_id=15) cache-control: public
    [  0.653] recv (stream_id=15) content-encoding: gzip
    [  0.653] recv (stream_id=15) vary: Accept-Encoding
    [  0.653] recv (stream_id=15) x-powered-by: centminmod
    [  0.653] recv (stream_id=15) x-robots-tag: noindex, nofollow, nosnippet, noarchive
    [  0.653] recv (stream_id=15) server: cloudflare-nginx
    [  0.653] recv (stream_id=15) cf-ray: 2a4b9f1ec8cd23ae-IAD
    [  0.653] recv HEADERS frame <length=373, flags=0x04, stream_id=15>
              ; END_HEADERS
              (padlen=0)
              ; First response header
    [  0.653] recv (stream_id=15) :authority: CLOUDFLARE_HTTP2SITE.COM
    [  0.653] recv (stream_id=15) :method: GET
    [  0.653] recv (stream_id=15) :path: /js/jquery/jquery-1.11.0.min.js
    [  0.653] recv (stream_id=15) :scheme: https
    [  0.653] recv (stream_id=15, sensitive) accept-encoding: gzip, deflate
    [  0.653] recv PUSH_PROMISE frame <length=59, flags=0x04, stream_id=15>
              ; END_HEADERS
              (padlen=0, promised_stream_id=18)
    [  0.653] recv (stream_id=15) :authority: CLOUDFLARE_HTTP2SITE.COM
    [  0.653] recv (stream_id=15) :method: GET
    [  0.653] recv (stream_id=15) :path: /css.php?css=xenforo,form,public&style=1&dir=LTR&d=1462721700
    [  0.653] recv (stream_id=15) :scheme: https
    [  0.653] recv (stream_id=15, sensitive) accept-encoding: gzip, deflate
    [  0.653] recv PUSH_PROMISE frame <length=81, flags=0x04, stream_id=15>
              ; END_HEADERS
              (padlen=0, promised_stream_id=20)
    [  0.653] recv (stream_id=15) :authority: CLOUDFLARE_HTTP2SITE.COM
    [  0.653] recv (stream_id=15) :method: GET
    [  0.653] recv (stream_id=15) :path: /csstest/test.css
    [  0.653] recv (stream_id=15) :scheme: https
    [  0.653] recv (stream_id=15, sensitive) accept-encoding: gzip, deflate
    [  0.653] recv PUSH_PROMISE frame <length=46, flags=0x04, stream_id=15>
              ; END_HEADERS
              (padlen=0, promised_stream_id=22)
    [  0.653] recv (stream_id=15) :authority: CLOUDFLARE_HTTP2SITE.COM
    [  0.653] recv (stream_id=15) :method: GET
    [  0.653] recv (stream_id=15) :path: /styles/default/xenforo/avatars/avatar_s.png
    [  0.653] recv (stream_id=15) :scheme: https
    [  0.653] recv (stream_id=15, sensitive) accept-encoding: gzip, deflate
    [  0.653] recv PUSH_PROMISE frame <length=66, flags=0x04, stream_id=15>
              ; END_HEADERS
              (padlen=0, promised_stream_id=24)
    [  0.653] send RST_STREAM frame <length=4, flags=0x00, stream_id=18>
              (error_code=CANCEL(0x08))
    [  0.653] send RST_STREAM frame <length=4, flags=0x00, stream_id=20>
              (error_code=CANCEL(0x08))
    [  0.653] send RST_STREAM frame <length=4, flags=0x00, stream_id=22>
              (error_code=CANCEL(0x08))
    [  0.653] send RST_STREAM frame <length=4, flags=0x00, stream_id=24>
              (error_code=CANCEL(0x08))
    [  0.653] send WINDOW_UPDATE frame <length=4, flags=0x00, stream_id=0>
              (window_size_increment=35579)
    [  0.653] recv DATA frame <length=7323, flags=0x00, stream_id=15>
    [  0.655] recv DATA frame <length=6579, flags=0x00, stream_id=15>
    [  0.683] send WINDOW_UPDATE frame <length=4, flags=0x00, stream_id=0>
              (window_size_increment=38610)
    [  0.708] send WINDOW_UPDATE frame <length=4, flags=0x00, stream_id=0>
              (window_size_increment=33916)
    [  0.733] recv DATA frame <length=8192, flags=0x00, stream_id=15>
    [  0.733] send WINDOW_UPDATE frame <length=4, flags=0x00, stream_id=0>
              (window_size_increment=39802)
    [  0.734] recv DATA frame <length=5073, flags=0x00, stream_id=15>
    [  0.734] recv DATA frame <length=0, flags=0x01, stream_id=15>
              ; END_STREAM
    [  0.737] recv DATA frame <length=2762, flags=0x00, stream_id=4>
    [  0.757] recv DATA frame <length=5430, flags=0x00, stream_id=4>
    [  0.758] recv DATA frame <length=5073, flags=0x00, stream_id=4>
    [  0.758] recv DATA frame <length=0, flags=0x01, stream_id=4>
              ; END_STREAM
    [  0.759] send GOAWAY frame <length=8, flags=0x00, stream_id=0>
              (last_stream_id=24, error_code=NO_ERROR(0x00), opaque_data(0)=[])
    Some requests were not processed. total=17, processed=9
    ***** 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   +196.37ms       +140us 196.22ms  200   5K /
      2   +244.05ms *  +195.37ms  48.69ms  200  32K /js/jquery/jquery-1.11.0.min.js
      6   +253.25ms *  +195.41ms  57.84ms  200  20K /csstest/test.css
      8   +253.78ms *  +195.44ms  58.34ms  200  905 /styles/default/xenforo/avatars/avatar_s.png
    19   +283.29ms    +196.41ms  86.88ms  200  51K /js/xenforo/xenforo.js?_v=9d599e1e
    21   +283.68ms    +196.42ms  87.26ms  200   1K /styles/default/xenforo/logo.png
    17   +364.35ms    +196.39ms 167.96ms  200   3K /css.php?css=login_bar,node_category,node_forum,node_list,sidebar_share_page,thread_list_simple&style=1&dir=LTR&d=1462726142
    15   +445.41ms    +196.38ms 249.04ms  200  26K /css.php?css=xenforo,form,public&style=1&dir=LTR&d=1462726142
      4   +469.91ms *  +195.39ms 274.52ms  200  26K /css.php?css=xenforo,form,public&style=1&dir=LTR&d=1462721700
     
    Last edited: May 18, 2016
  7. buik

    buik “A winner never stops trying.” Premium Member

    1,302
    358
    83
    Apr 29, 2016
    Ratings:
    +1,067
    Local Time:
    3:40 AM
    Did you benchmark http/2 server push v.s. http/2 without server push?
    I'm very curious about your results.
     
  8. eva2000

    eva2000 Administrator Staff Member

    45,182
    10,276
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,925
    Local Time:
    11:40 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    not recently yet - not much free time right now but server push done on the right assets has always been beneficial from past tests and never been worse off - expect to see at least 200ms faster visual page render times if the rest of your asset delivery and order is optimal
     
  9. buik

    buik “A winner never stops trying.” Premium Member

    1,302
    358
    83
    Apr 29, 2016
    Ratings:
    +1,067
    Local Time:
    3:40 AM
    200 ms is a big improvement.
    It is possible to load simple entirety webpages + content in 200 ms without server push.
    So server push should optimize it further. :)
    There is only one problem and thats the Nginx development team :muted:
     
  10. Xon

    Xon Active Member

    170
    61
    28
    Nov 16, 2015
    Ratings:
    +223
    Local Time:
    9:40 AM
    1.15.x
    MariaDB 10.3.x
    For a few days, I tried running Cloudflare HTTP/2 server push support on my XenForo site, and had a number of complaints from people with older or mobile browsers that it caused assets to fail to load such as styling and such.
     
  11. buik

    buik “A winner never stops trying.” Premium Member

    1,302
    358
    83
    Apr 29, 2016
    Ratings:
    +1,067
    Local Time:
    3:40 AM
    Thanks for sharing your experience.
    So if i am correctly Cloudflare's HTTP/2 server push implementation forces the server push rules that are set via headers (by mistake) even if the client doesn't support it? Rather then switching back to HTTP/1* or SPDY without those server push headers?
     
  12. eva2000

    eva2000 Administrator Staff Member

    45,182
    10,276
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,925
    Local Time:
    11:40 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    wonder if that is just old browsers not support link preload itself as it's also used in non-HTTP/2 server push for supported browsers
     
  13. Xon

    Xon Active Member

    170
    61
    28
    Nov 16, 2015
    Ratings:
    +223
    Local Time:
    9:40 AM
    1.15.x
    MariaDB 10.3.x
    Likely, I saw some weird browser behaviour when chrome was getting the preload link headers directly if they weren't formatted how Chrome expected them.

    I wish there was some way to only send the link header if the client was using http/2 but ClouldFlare doesn't tell you that.
     
  14. eva2000

    eva2000 Administrator Staff Member

    45,182
    10,276
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,925
    Local Time:
    11:40 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    indeed if it was within nginx, there is a http2 variable
     
  15. anthony parsons

    anthony parsons Member

    77
    20
    8
    Feb 12, 2017
    Ratings:
    +24
    Local Time:
    11:40 AM
    Current yum stable
    10.1
    Eva, is this the actual code placed in the server to make push work for the specific files when using cloudflare?

    Why the "false" at the end?
     
  16. eva2000

    eva2000 Administrator Staff Member

    45,182
    10,276
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,925
    Local Time:
    11:40 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    yeah for cloudflare but no one i know including myself has gotten it to work consistently with cloudflare LOL

    as to false flag read above post #26 linked article Using HTTP/2 Server Push with PHP

     
  17. anthony parsons

    anthony parsons Member

    77
    20
    8
    Feb 12, 2017
    Ratings:
    +24
    Local Time:
    11:40 AM
    Current yum stable
    10.1
    Ok... now even more confused. So do you have to do this in the page header (i.e. template header) or can you do this in the nginx server conf?
     
  18. eva2000

    eva2000 Administrator Staff Member

    45,182
    10,276
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,925
    Local Time:
    11:40 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    IIRC from nginx server config header
     
  19. anthony parsons

    anthony parsons Member

    77
    20
    8
    Feb 12, 2017
    Ratings:
    +24
    Local Time:
    11:40 AM
    Current yum stable
    10.1
    Ok, worked it out. Notice the beginning / which is important and is why it was failing to work.

    Code:
    add_header Link "</wp-content/plugins/wp-rocket/inc/front/js/lazyload.1.0.5.min.js>; rel=preload; as=script";
    Sits within...

    server {
    add_header....
    }
     
    Last edited: Feb 13, 2017
  20. buik

    buik “A winner never stops trying.” Premium Member

    1,302
    358
    83
    Apr 29, 2016
    Ratings:
    +1,067
    Local Time:
    3:40 AM
    It's been a while since Cloudflare released their latest patch.
    It's time to release a new one. ;)

    My preference is for http2 server push.
     
    Last edited: Feb 14, 2017