• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » Nginx Brotli : Compression for HTTPS

By Abhishek Ghosh August 22, 2016 10:04 am Updated on August 22, 2016

Nginx Brotli : Compression for HTTPS

Advertisement

Previously, we talked about various new methods for speed-up Nginx. Nginx Brotli Compression is a Modern Loseless Compression Algorithm Like gzip. ngx_brotli is a Set of 2 Nginx Modules. Nginx Brotli was not discussed so far as it was not exactly stable. Replacing gzip deflate with Nginx Brotli Compression typically gives an increase of 20% in compression density for text files, while compression and decompression speeds are roughly unchanged. Streams compressed with Brotli have the proposed content encoding type “br”.

 

Nginx Brotli Compression : Basic Details of Module

 

Brotli library and Nginx Brotli module are under active development. Brotli is a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling. It offers more dense compression than gzip.
ngx_brotli is a set of two nginx modules. ngx_brotli filter module is used to compress responses on-the-fly,
ngx_brotli static module used to serve pre-compressed files. Brotli format was developed by Google as Open Source development and has been refined now. Brotli and gzip deflate are very closely related. Both uses a sliding window for backreferences. Gzip uses a fixed 32KB window. While Brotli can use window size from 1KB to 16MB.
Other differences include smaller minimal match length (2 bytes vs 3 bytes), larger maximal match length (16779333 bytes vs 258 bytes).

At time of first publication of this guide, Nginx Brotli Compression is not exactly what is exactly to jump right now for a production server. Testing on test server is suggested. Here is benchmarking – https://blog.quickmediasolutions.com/2015/09/22/benchmarking-brotli.html. You can test community.centminmod.com‘s server with cURL :

Advertisement

---

Vim
1
curl -vso /dev/null -H"Accept-Encoding: gzip, br" https://community.centminmod.com/

Nginx Brotli Compression for HTTPS

 

Deploying Nginx Brotli Compression

 

Official repository is here —

Vim
1
https://github.com/google/ngx_brotli

As with the newer Nginx versions we can add modules easily, but typically Nginx Brotli needs compilation, we are describing all the steps :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
apt-get install python2.7 python-dev
cd /opt
git clone https://github.com/google/brotli.git && cd brotli
sudo python setup.py install
cd tests
sudo make
# we now have a ‘bro’ executable in the brotli/tools/ dir
cd /opt # we'll instal Libbrotli wrapper for the Brotli codebase
git clone https://github.com/bagder/libbrotli && cd libbrotli
sudo ./autogen.sh
sudo .configure
sudo make
sudo make install
cd /opt # we’ll set up Nginx module
git clone https://github.com/google/ngx_brotli
sudo apt-get build-dep nginx
cd /opt
mkdir nginx && cd nginx
sudo apt-get source nginx
# above will create a nginx-1.x.x dir with the source code
cd nginx-1.x.x
nano debían/rules
# add the line
#        --add-module=/opt/ngx_brotli \
#
sudo dpkg-buildpackage -b
cd ..
sudo dpkg -i nginx_*_all.deb nginx-full_*_amd64.deb
# In case of error, you may need to run apt-get remove nginx-core and then run the above command

Example configuration on nginx config file ( /etc/nginx/nginx.conf) is like gzip :

Vim
1
2
3
4
5
6
brotli on;
brotli_static on;
brotli_min_length 1000;
brotli_buffers 32 8k;
brotli_comp_level 5;
brotli_types text/plain text/css text/xml application/javascript application/x-javascript application/xml application/xml+rss application/ecmascript application/json image/svg+xml;

Run configtest and restart Nginx.

Tagged With paperuri:(9d925879c383715d42eeec7e5637d9b8) , brotli , brotli and nginx , Brotli nginx , brotli nginx windows , brottli compression nginx check , https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1841 WLszg34u2LcPTMZRdR9J9rbzl_ZEe0qXDSLavn8u0pwnx9W6uzGkjKC0kdO4-5Nm b0f2fd4a5c6258ab74f42c43f67c769d8f4644b3&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme , ngx_brotli for windows

This Article Has Been Shared 795 Times!

Facebook Twitter Pinterest
Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Nginx Brotli : Compression for HTTPS

Actually a list should normally appear here. Automated calculation failed.

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (22.1K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • The Cost of Doing Business as a Handyman July 1, 2022
  • Samsung Galaxy S22 Ultra: Long Term Review June 30, 2022
  • How to Make the Most of Your S Pen (S22 Ultra) June 29, 2022
  • Safe Chargers for Samsung Galaxy S22 Ultra June 27, 2022
  • How Telecoms Can Use The Cloud To Power Their 5G Network June 24, 2022

About This Article

Cite this article as: Abhishek Ghosh, "Nginx Brotli : Compression for HTTPS," in The Customize Windows, August 22, 2016, July 1, 2022, https://thecustomizewindows.com/2016/08/nginx-brotli-compression-for-https/.

Source:The Customize Windows, JiMA.in

This website uses cookies. If you do not want to allow us to use cookies and/or non-personalized Ads, kindly clear browser cookies after closing this webpage.

Read Privacy Policy.

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2022 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy