Skip to Main Content

ORDS, SODA & JSON in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Anyone got ORDS + Tomcat to work with gzip compression?

John HowardJun 23 2022

Hello fellow ORDS users,
Is anyone successfully getting gzip compression to work with ORDS and Tomcat?
I have enabled compression on the Tomcat server and I can see that it is working for regular text/html content. The response headers contain:

Content-Encoding: gzip

Also I can see that the size of the transferred data is reduced.
When I try this for an ORDS route where the response contains a JSON payload I don't get the compression at all. The size of the response doesn't change and the Response Headers don't change. I can see the Content-Type is application/json and that is listed in my compressibleMimeType.
My Connector config is as follows:

<Connector port="8080" 
      protocol="HTTP/1.1"
      connectionTimeout="20000"
      redirectPort="8443"
      compression="on"
      compressionMinSize="2048"
      noCompressionUserAgents="gozilla, traviata"
      useSendfile="false"
      compressibleMimeType="text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json"
/>

I've tried numerous variations on the min size, with/without useSendfile - no joy.
I can't figure out what I'm missing. Any help gratefully appreciated.
Cheers,
John

Comments
Post Details
Added on Jun 23 2022
4 comments
612 views