Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-28008

Compress replies only when the request was compressed

    • Fully Compatible
    • Platforms 2017-06-19, Platforms 2017-07-10, Platforms 2017-07-31, Platforms 2017-08-21, Platforms 2017-09-11

      Currently when compression is enabled, and negotiated in the initial handshake, all replies from the server will be compressed, regardless if the request coming into the server was compressed or not.

      There appears to be no way to toggle replies to be compressed or not.

      With snappy, this isn't much of an issue as compressing small data doesn't incur "to much overhead", but its a bit weird, and with zlib, this might be counterproductive.

      There should be a way for the request to determine if the reply should be compressed or not.
      This might be through a field in the flagBits header for OP_COMMAND, or simply based on the originating opcode

            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            bjori Hannes Magnusson
            0 Vote for this issue
            6 Start watching this issue