Get the most out of your Centmin Mod LEMP stack
Become a Member

Nginx HTTP/2 + SPDY PATCH for NGINX 1.10 + NGINX 1.11

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by bassie, Jun 2, 2016.

  1. bassie

    bassie Active Member

    498
    104
    43
    Apr 29, 2016
    Ratings:
    +316
    Local Time:
    11:46 PM
    Despite the fact that Google has stopped there SPDY support in Chrome,
    I still get a lot of visitors with HTTP/2 non supported browsers.

    For example small Apple devices as iPhone, iPad, a lot fragmented Android's.

    And also Windows systems < 10 with Internet Explorer etc.
    These legacy devices can't use HTTP/2 but are SPDY supported.

    Unfortunately the patch of Cloudflare is only usable with Nginx 1.9.7.
    Nginx 1.9.7. is outdated, insecure and not updated since 17 Nov 2015.

    The simplest solution would be support for both protocols in a transitional situation.
    Using an up-to-date Nginx application.

    And it might not be today, no no its gonna be tonight.
    Thanks to Felix Bünemann it is possible right now.

    Felix Bünemann ported Cloudflare's HTTP/2 + SPDY PATCH to work with Nginx 1.10.* and above.
    I did some quick tests and it works fine for me with both Nginx 1.10 and 1.11.

    server offers:
    * h2
    * spdy/3.1
    * http/1.1
     
    Last edited: Jun 2, 2016
    • Informative Informative x 1
  2. eva2000

    eva2000 Administrator Staff Member

    29,031
    6,588
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,780
    Local Time:
    7:46 AM
    Nginx 1.13.x
    MariaDB 5.5
    nice been following that patch. Working for you fully ?

    from my google analytics browser breakdown stats,
    • only 0.86% of my users use winxp
    • only 0.55% of my users use winxp with non-firefox browsers
    • only 0.0298% of my users use winxp with IE browsers
    • only 0.0897% use Android older than v4
     
    Last edited: Jun 2, 2016
  3. bassie

    bassie Active Member

    498
    104
    43
    Apr 29, 2016
    Ratings:
    +316
    Local Time:
    11:46 PM
    Works fine but time will tell as the patch is running here for a few days now.
    Used diff to compare the Cloudflare and Felix patch.
    Seems as he rectify the changes at the network protocol code between Nginx 1.9.7 and Nginx 1.10.*

    About visitors.
    As your site is focusing on new software, compiling, installing etc, your main visitors are trained
    IT guys if you ask me. Those group of visitors usually use up-to-date computer software.

    The big group of mainstream users won't surf trough sites like this.
    The can't understand a word what is written and normally don't use up-to-date software,
    unless its pushed automatically.

    Main users on my SPDY enabled sites are mobile users via Android (version 4.4 and 5, iPhone and iPad.)
     
    Last edited: Jun 2, 2016
  4. eva2000

    eva2000 Administrator Staff Member

    29,031
    6,588
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,780
    Local Time:
    7:46 AM
    Nginx 1.13.x
    MariaDB 5.5
    Yeah but HTTP/2 and SPDY usage Can I use... Support tables for HTML5, CSS3, etc is closing the gap.

    You sure Android 5 users are using the native web browser as opposed to Chrome on Android ? As an Android user, I've always used Chrome browser

    upload_2016-6-2_5-8-31.png
     
  5. bassie

    bassie Active Member

    498
    104
    43
    Apr 29, 2016
    Ratings:
    +316
    Local Time:
    11:46 PM
    I am sure, as written before the visitors are non IT.
    The don't use the latest of the latest but what comes out of the box.
    About the can i use website, the website is made for developers to see what is possible, not for mainstream ordinary visitors.

    It's not about which software + options and functions are available but which software they are using.
    Differs per website per market and target audience.

    Hence the big differences between us.
     
  6. eva2000

    eva2000 Administrator Staff Member

    29,031
    6,588
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,780
    Local Time:
    7:46 AM
    Nginx 1.13.x
    MariaDB 5.5
    yeah true just worth making sure with google analytics web stats analysis :)
     
  7. bassie

    bassie Active Member

    498
    104
    43
    Apr 29, 2016
    Ratings:
    +316
    Local Time:
    11:46 PM
    you are absolutely right, I checked Analytics.

    When SPDY would not be necessary.
    I'm not using it.
    Every patch to mutch could break or make Nginx unstable and that's what nobody wants.
    Fact is that most visitors here are Apple mobilers + Windows 7 (ie8-11) so thats the main focus and target for me.
     
    Last edited: Jun 2, 2016
  8. bassie

    bassie Active Member

    498
    104
    43
    Apr 29, 2016
    Ratings:
    +316
    Local Time:
    11:46 PM
    Are you testing the patch also?
     
  9. eva2000

    eva2000 Administrator Staff Member

    29,031
    6,588
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,780
    Local Time:
    7:46 AM
    Nginx 1.13.x
    MariaDB 5.5
    nope.. all in on HTTP/2 for now
     
  10. bassie

    bassie Active Member

    498
    104
    43
    Apr 29, 2016
    Ratings:
    +316
    Local Time:
    11:46 PM
    HTTP/2 with dual certificate (RSA and ECDSA)?
     
  11. bassie

    bassie Active Member

    498
    104
    43
    Apr 29, 2016
    Ratings:
    +316
    Local Time:
    11:46 PM
    As written before the HTTP/2 + SPDY PATCH for NGINX 1.10 + NGINX 1.11 is working fine here.
    It looks like a solid patch because there are more users reporting the same:

    Hans van Eijsden - Thank you very much! Works great, also on 1.11.0!
    John Graham-Cumming / programmer of Cloudfare - This is cool. Can you submit an updated patch instead so we can keep the old one around as well?
    frostieDE - Works fine against nginx 1.11.0 and OpenSSL 1.0.2h (with ChaCha20 patch). I am building nginx as an Ubuntu 16.04 package.
    kn007 - nginx 1.11.1 test pass
     
    Last edited: Jun 2, 2016
    • Like Like x 1
  12. bassie

    bassie Active Member

    498
    104
    43
    Apr 29, 2016
    Ratings:
    +316
    Local Time:
    11:46 PM
    I forgot to mention.
    Working fine with dual certificate (RSA and ECDSA) Nginx 1.11.1.
    Old browser users will get RSA + SPDY, modern based browsers will get ECDSA with HTTP/2.
     
    • Informative Informative x 2
    • Like Like x 1
  13. eva2000

    eva2000 Administrator Staff Member

    29,031
    6,588
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,780
    Local Time:
    7:46 AM
    Nginx 1.13.x
    MariaDB 5.5
  14. bassie

    bassie Active Member

    498
    104
    43
    Apr 29, 2016
    Ratings:
    +316
    Local Time:
    11:46 PM
    • Informative Informative x 1
  15. Lil.Tee

    Lil.Tee New Member

    24
    1
    3
    Sep 11, 2015
    Ratings:
    +1
    Local Time:
    4:46 AM
    1.11.1
    MariaDB 10
  16. eva2000

    eva2000 Administrator Staff Member

    29,031
    6,588
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,780
    Local Time:
    7:46 AM
    Nginx 1.13.x
    MariaDB 5.5
    Some folks lately are reporting issues with that patch and nginx 1.11 branch as patch was made for nginx 1.9.7
     
    • Like Like x 1
  17. bassie

    bassie Active Member

    498
    104
    43
    Apr 29, 2016
    Ratings:
    +316
    Local Time:
    11:46 PM
    You need to patcht the Nginx source before building it.
    patch < ../nginx_1_9_15_http2_spdy.patch

    Because this goes beyond Centminmod, you should build Nginx manually.
     
    • Like Like x 1
  18. bassie

    bassie Active Member

    498
    104
    43
    Apr 29, 2016
    Ratings:
    +316
    Local Time:
    11:46 PM
    Cloudflare's SPDY patch works only with Nginx 1.9.7.
    Felix Bünemann ported it to Nginx 1.10 - 1.11.
    This thread is all about Felix Bünemann's patch.
     
    • Informative Informative x 1
  19. Lil.Tee

    Lil.Tee New Member

    24
    1
    3
    Sep 11, 2015
    Ratings:
    +1
    Local Time:
    4:46 AM
    1.11.1
    MariaDB 10
    Thank you for your reply, rikske.
    But I don't understand. Can you guide me step by step?
     
  20. eva2000

    eva2000 Administrator Staff Member

    29,031
    6,588
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,780
    Local Time:
    7:46 AM
    Nginx 1.13.x
    MariaDB 5.5
    yeah re-reading the info seems that way !