When a client requests data from a service, the service may return data of a considerable size, which slows down data transfer. To speed up that data transfer, the LuciadFusion server by default makes use of data compression. Compression reduces the size of the exchanged data, which is useful for larger data sets, or in low-bandwidth environments.
Compression comes in particularly handy for WFS services, which may return large amounts of vector data in uncompressed formats like GeoJSON or GML.
To configure compression:
|
This only applies to the Jetty-based server included with LuciadFusion, which you start with the |
-
Open the
config/fusion.common.ymlfile. -
Locate the
serversection. -
The
compressionandenabledproperties define whether compression should be enabled. This is the case by default. -
The following properties define when compression should be applied:
-
mime-type: specifies which response types to compress. -
min-response-size: defines the minimum response size (in bytes) that triggers data compression.
-
To benefit from compression at the client side, make sure to include the Accept-Encoding: gzip header in the request.