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

Featured Nginx How to use Brotli compression for Centmin Mod Nginx web servers

Discussion in 'Centmin Mod User Tutorials & Guides' started by eva2000, Mar 6, 2017.

  1. eva2000

    eva2000 Administrator Staff Member

    53,775
    12,155
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,704
    Local Time:
    5:59 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Update: February 5, 2019. Centmin Mod 123.09beta01 and newer branches now auto enable nginx brotli module if Intel Skylake or newer cpus exist. Newer cpus allow brotli compressed nginx files to be served faster Beta Branch - enable nginx brotli module on Intel Skylake & newer cpus in 123.09beta01 :)


    Code (Text):
    brotli --version
    brotli 1.0.7
    

     
  2. rdan

    rdan Well-Known Member

    5,439
    1,399
    113
    May 25, 2014
    Ratings:
    +2,188
    Local Time:
    3:59 AM
    Mainline
    10.2
    Merged back to [google/ngx_brotli](eustas/ngx_brotli).
     
  3. eva2000

    eva2000 Administrator Staff Member

    53,775
    12,155
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,704
    Local Time:
    5:59 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    thanks for heads up just updated 123.09beta01 to use original ngx_brotli github repo again

     
  4. eva2000

    eva2000 Administrator Staff Member

    53,775
    12,155
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,704
    Local Time:
    5:59 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  5. upgrade81

    upgrade81 Member

    295
    17
    18
    Sep 5, 2016
    CH
    Ratings:
    +30
    Local Time:
    8:59 PM
    1.17
    10.3
    have they finally solved the problem that plagued 90% of my VMs?
    many times Nginx went 100% already discussed on the forum...
     
  6. eva2000

    eva2000 Administrator Staff Member

    53,775
    12,155
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,704
    Local Time:
    5:59 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    test and see :)
     
  7. rdan

    rdan Well-Known Member

    5,439
    1,399
    113
    May 25, 2014
    Ratings:
    +2,188
    Local Time:
    3:59 AM
    Mainline
    10.2
    For my small server and small site, I just want to generate .gz files as I don't have brotli enabled, is it possible with this script? Thanks.
     
  8. eva2000

    eva2000 Administrator Staff Member

    53,775
    12,155
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,704
    Local Time:
    5:59 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    not possible as the script tries to install brotli command line binary if it doesn't exist
     
  9. rdan

    rdan Well-Known Member

    5,439
    1,399
    113
    May 25, 2014
    Ratings:
    +2,188
    Local Time:
    3:59 AM
    Mainline
    10.2
    Can this also support woff2/woff font files?
     
  10. eva2000

    eva2000 Administrator Staff Member

    53,775
    12,155
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,704
    Local Time:
    5:59 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    WOFF/WOFF2 font files are already compressed. You don't want to do double compression on them :)

    Reduce WebFont Size

     
  11. rdan

    rdan Well-Known Member

    5,439
    1,399
    113
    May 25, 2014
    Ratings:
    +2,188
    Local Time:
    3:59 AM
    Mainline
    10.2
    Based on my testing, it's worst to have Brotli on PHP request.
    Having gzip only has lower Response Times and Higher Response Counts.

    Disabling Brotli on my live servers from now on.
     
  12. eva2000

    eva2000 Administrator Staff Member

    53,775
    12,155
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,704
    Local Time:
    5:59 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yeah this this forum and blog haven't had Brotli enabled for past 18 months :)
     
  13. upgrade81

    upgrade81 Member

    295
    17
    18
    Sep 5, 2016
    CH
    Ratings:
    +30
    Local Time:
    8:59 PM
    1.17
    10.3
    Hi you mean nginx brotli? Interesting
     
  14. eva2000

    eva2000 Administrator Staff Member

    53,775
    12,155
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,704
    Local Time:
    5:59 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Both Nginx Brotli or Cloudflare Brotli :)