Feature #2190
closedServer side compression
Description
Stefan (Probst) suggested that we use server side compression to improve request performance. We can use gzip or Brotli, but Brotli will be the better solution.
Resources: https://www.cloudways.com/blog/brotli-vs-gzip/
Update
We decided to use Brotli, there even is a Debian package available.
Files
Updated by Bernhard Koschiček-Krombholz 10 months ago
I don't know how trustworthy this site is, but according to this globally 97% of the used browsers support brotli.
I tested it today on my server, it works quite good and will make a performance boost.
Installation:
- Install brotly
sudo apt install brotli
- Enable apache mod
sudo a2enmod brotli
- Add to virtual host configuration
<IfModule mod_brotli.c> AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/xml text/css text/javascript application/javascript application/json </IfModule>
- Restart Apache
sudo service apache2 restart
And that's it.
Updated by Stefan Probst 10 months ago
cool!
I don't know how trustworthy this site is, but according to caniuse.com
very!
Updated by Alexander Watzinger 10 months ago
- Status changed from Assigned to In Progress
Thanks for your inputs and instructions. I activated it on trinity for https://demo-dev.openatlas.eu.
Not sure how to test this but according to https://tools.keycdn.com/brotli-test it now works for this domain.
In case there are no problems and no further input from your side (e.g. Bernhard and Stefan) I will continue it implementing for the other sides on trinity and at the ACDH-CH.
For NHM I leave it up to Bernhard ;)
Updated by Alexander Watzinger 10 months ago
- Target version changed from 8.4.0 to 8.2.0
Updated by Bernhard Koschiček-Krombholz 10 months ago
- File 2024-02-20_19-41.png 2024-02-20_19-41.png added
If you make an API request (e.g. /api/system_class/place) and the Content-Encoding
is br
than it worked.
Ok, then let's implement it.
Updated by Stefan Probst 10 months ago
thanks for implementing!
also, for reference: a client can tell the server about supported compression formats with the "Accept-Encoding" request header.
Updated by Alexander Watzinger 10 months ago
- Description updated (diff)
Thank you for the advice :) it's easy to implement and helps a lot with larger data sets.
I decided to document it in Debian server installation, which is also linked in the install notes, using the nicely prepared description from Bernhard.
Updated by Alexander Watzinger 10 months ago
- Description updated (diff)
- Status changed from In Progress to Closed