GZIP in enaio® webclient
enaio® webclient can transfer resources in compressed format. This saves a large amount of bandwidth and therefore increases the speed of enaio® webclient.
Before using compression, please check your network infrastructure and router to ensure compatibility with GZIP-compressed data transmission when processing web requests.
GZIP compression can also be enabled for enaio® appconnector. GZIP compression is enabled for enaio® gateway by default.
Configuring Compression
The configuration is carried out using the following entry in the osweb-prod.yml file located in the \service-manager\config directory:
server:
compression:
enabled: true
mime-types: text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,image/svg+xml
min-response-size: 2048
By enabling GZIP compression, files with the corresponding MIME type and a minimum size of 2KB will be compressed and transferred between the 'osweb' microservice and enaio® gateway.
GZIP Compression in enaio® appconnector
It is also recommended that GZIP compression be used in enaio® appconnector. Please check whether all other clients that also request data via enaio® appconnector can handle the compression.
Configuration
There are two attributes for this in the HTTP connector in the conf\server.xml file of the Tomcat distribution of enaio® appconnector.
-
Selecting file types
Parameters:
compressibleMimeType
Values:
"text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,image/svg+xml"
Description:
Specifies which file formats GZIP compression is applied to.
-
Using compression
-
on: GZIP compression is enabled.
-
off: GZIP is disabled.
Parameters: |
compression |
Default value: |
|
Description: |
Specifies whether GZIP compression should be used. |
Example:
<Connector port="9090" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"
compressibleMimeType="text/html, text/xml, text/plain, text/css, text/javascript, application/javascript, application/json, image/svg+xml"
compression="on"