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 FusionServer.bat or FusionServer.sh script in your LuciadFusion installation. If you deploy LuciadFusion in a stand-alone servlet container like Apache Tomcat, GlassFish or JBoss, please follow the instructions of that product to configure compression. For example, compression in Tomcat can be configured in the conf/server.xml file, by adding the compression="on" attribute to the Connector.

  1. Open the config/fusion.common.yml file.

  2. Locate the server section.

  3. The compression and enabled properties define whether compression should be enabled. This is the case by default.

  4. 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.