title: Why is this QoS jetty-filter not working?
body: <p>We want to apply the <a href="https://www.eclipse.org/jetty/documentation/9.4.x/qos-filter.html" rel="nofollow noreferrer">QoS Jetty Filter</a> to our Solr 6.5 servers so that any rate higher than the benchmarked rate is rejected outrightly.</p>
  
  <p>The required jar files are present:</p>
  
  <pre><code>/app/solr6/server/lib/jetty-servlets*.jar
  /app/solr6/server/lib/jetty-util*.jar
  </code></pre>
  
  <p>And the XML file where we can add the configuration for the filter is at:</p>
  
  <pre><code>/app/solr6/server/solr-webapp/webapp/WEB-INF/web.xml
  </code></pre>
  
  <p>Solr runs with <code>-Djetty.home=/app/solr6/server</code> and I have confirmed that if we remove the above XML file, solr fails to start in jetty. So the XML file above is the correct location for putting the QoS filter.</p>
  
  <p>Problem is that I am unable to get the QoS filter up and running with the following config:</p>
  
  <pre><code>&lt;filter&gt;
    &lt;filter-name&gt;QoSFilter&lt;/filter-name&gt;
    &lt;filter-class&gt;org.eclipse.jetty.servlets.QoSFilter&lt;/filter-class&gt;
    &lt;init-param&gt;
      &lt;param-name&gt;maxRequests&lt;/param-name&gt;
      &lt;param-value&gt;1&lt;/param-value&gt;
    &lt;/init-param&gt;
    &lt;init-param&gt;
      &lt;param-name&gt;waitMS&lt;/param-name&gt;
      &lt;param-value&gt;1000&lt;/param-value&gt;
    &lt;/init-param&gt;
    &lt;init-param&gt;
      &lt;param-name&gt;suspendMS&lt;/param-name&gt;
      &lt;param-value&gt;500&lt;/param-value&gt;
    &lt;/init-param&gt;
   &lt;/filter&gt;
   &lt;filter-mapping&gt;
    &lt;filter-name&gt;QoSFilter&lt;/filter-name&gt;
    &lt;url-pattern&gt;*&lt;/url-pattern&gt;
  &lt;/filter-mapping&gt;
  </code></pre>
  
  <p>I have a single node Solr running with the above configuration but no rate limiting seems to be happening. I have a client with 30 threads (running on 8 cores machine) and I do not see any reduction in queries/second when I apply the above filter on the Solr server.</p>
  
  <p>How do I know the filter is working and throttling the rate of my requests at all?</p>