Learn about Centmin Mod LEMP Stack today
Register Now

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

    48,902
    11,190
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,424
    Local Time:
    10:48 PM
    Nginx 1.21.x
    MariaDB 10.x
    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 Premium Member Premium Member

    5,294
    1,315
    113
    May 25, 2014
    Ratings:
    +2,036
    Local Time:
    8:48 PM
    Mainline
    10.2
    Merged back to [google/ngx_brotli](eustas/ngx_brotli).
     
  3. eva2000

    eva2000 Administrator Staff Member

    48,902
    11,190
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,424
    Local Time:
    10:48 PM
    Nginx 1.21.x
    MariaDB 10.x
    thanks for heads up just updated 123.09beta01 to use original ngx_brotli github repo again

     
  4. eva2000

    eva2000 Administrator Staff Member

    48,902
    11,190
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,424
    Local Time:
    10:48 PM
    Nginx 1.21.x
    MariaDB 10.x
  5. upgrade81

    upgrade81 Premium Member Premium Member

    281
    17
    18
    Sep 5, 2016
    CH
    Ratings:
    +29
    Local Time:
    2:48 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

    48,902
    11,190
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,424
    Local Time:
    10:48 PM
    Nginx 1.21.x
    MariaDB 10.x
    test and see :)
     
  7. rdan

    rdan Premium Member Premium Member

    5,294
    1,315
    113
    May 25, 2014
    Ratings:
    +2,036
    Local Time:
    8:48 PM
    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

    48,902
    11,190
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,424
    Local Time:
    10:48 PM
    Nginx 1.21.x
    MariaDB 10.x
    not possible as the script tries to install brotli command line binary if it doesn't exist
     
  9. rdan

    rdan Premium Member Premium Member

    5,294
    1,315
    113
    May 25, 2014
    Ratings:
    +2,036
    Local Time:
    8:48 PM
    Mainline
    10.2
    Can this also support woff2/woff font files?
     
  10. eva2000

    eva2000 Administrator Staff Member

    48,902
    11,190
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,424
    Local Time:
    10:48 PM
    Nginx 1.21.x
    MariaDB 10.x
    WOFF/WOFF2 font files are already compressed. You don't want to do double compression on them :)

    Reduce WebFont Size

     
  11. rdan

    rdan Premium Member Premium Member

    5,294
    1,315
    113
    May 25, 2014
    Ratings:
    +2,036
    Local Time:
    8:48 PM
    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

    48,902
    11,190
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,424
    Local Time:
    10:48 PM
    Nginx 1.21.x
    MariaDB 10.x
    Yeah this this forum and blog haven't had Brotli enabled for past 18 months :)
     
  13. upgrade81

    upgrade81 Premium Member Premium Member

    281
    17
    18
    Sep 5, 2016
    CH
    Ratings:
    +29
    Local Time:
    2:48 PM
    1.17
    10.3
    Hi you mean nginx brotli? Interesting
     
  14. eva2000

    eva2000 Administrator Staff Member

    48,902
    11,190
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,424
    Local Time:
    10:48 PM
    Nginx 1.21.x
    MariaDB 10.x
    Both Nginx Brotli or Cloudflare Brotli :)