Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-11752

add gzip to jetty

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Trivial
    • Resolution: Implemented
    • None
    • 8.10
    • Server

    Description

      with a little bit of typing I am able to add gzip to my solr's jetty, which is a big help for WAN access and completely out-of-band to solr, and only happens if the client requests it so I think it is is a good default.

      I will just inline my code to this ticket:

      #server/etc/jetty-gzip.xml
      #just download it from here: http://grepcode.com/file/repo1.maven.org/maven2/org.eclipse.jetty/jetty-server/9.3.0.v20150612/etc/jetty-gzip.xml?av=f
      
      
      #server/modules/gzip.mod
      [depend]
      server
      
      [xml]
      etc/jetty-gzip.xml
      

      This is where you might want to add an option, but the result should look like this:

      #bin/solr
      else
        SOLR_JETTY_CONFIG+=("--module=http,gzip")
      fi
      

      I can now do this:

      curl -vvv --compressed localhost:8983/solr/ > /dev/null
      

      With:

      < Content-Encoding: gzip
      < Content-Length: 2890
      

      Without:

      < Content-Length: 13349
      

      A regular query:
      With:

      < Content-Encoding: gzip
      < Content-Length: 2876
      

      Without:

      < Content-Length: 17761
      

      Attachments

        1. SOLR-11752.patch
          6 kB
          Shawn Heisey
        2. SOLR-11752.patch
          6 kB
          Matthew Sporleder

        Issue Links

          Activity

            People

              houston Houston Putman
              msporleder Matthew Sporleder
              Votes:
              0 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h