Forum Stats

  • 3,824,920 Users
  • 2,260,440 Discussions
  • 7,896,348 Comments

Discussions

Compression blob ORDS + TOMCAT

Jeremx
Jeremx Member Posts: 34 Red Ribbon

Hello,

How does the compression of a blob data via ORDS work?

I tried to enable compression in tomcat:

server.xml

<Connector port=“8443” protocol=“HTTP/1.1" relaxedPathChars=“[]|{}”  relaxedQueryChars=‘[]|{}^&#x5c;&#x60;&quot;&lt;&gt;’

               maxThreads=“150" SSLEnabled=“true” scheme=“https” secure=“true”  compression=“on” compressionMinSize=“1024”

               clientAuth=“false” sslProtocol=“TLS” keystoreFile=“/u01/certificat/keystore_tomcat.keystore” keystorePass=“XXX”  />

and try the header:

"Accept-Encoding: gzip"

but compression doesn't work

Do you have any idea?

Thank you

Answers

  • EJ-Egyed
    EJ-Egyed Member Posts: 128 Blue Ribbon
    edited Jul 3, 2020 8:34AM

    What is the mime type of the blob?  If compression is on, only these mime types will be compressed by default:

    text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,application/xml

    If what mime type you are sending is not in this list, you will need to add the compressibleMimeType attribute to your connector.  Documentation can be referenced here: https://tomcat.apache.org/tomcat-9.0-doc/config/http.html

    Jeremx
  • John Howard
    John Howard Member Posts: 28 Bronze Badge

    I'm having the same issue here. I have ORDS 21.4 being served through Tomcat 8.5. I have compression turned "on" and compressableMimeType set to "text/html,text/xml,application/json"

    I can see that the response is of mime type "application/json" and all looks good but no compression has been applied whereas if I do the same test with an HTML page I can see the compression happening.

    Am I missing something?

    Thanks,

    John