atris commented on a change in pull request #1686: URL: https://github.com/apache/lucene-solr/pull/1686#discussion_r460688956
########## File path: solr/solr-ref-guide/src/rate-limiters.adoc ########## @@ -0,0 +1,101 @@ += Request Rate Limiters +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +Solr allows rate limiting per request type. Each request type can be allocated a maximum allowed number of concurrent requests +that can be active. The default rate limiting is implemented for updates and searches. + +If a request exceeds the request quota, further incoming requests are automatically queued asynchronously with +a configurable timeout. + +== When To Use Rate Limiters +Rate limiters should be used when the user wishes to allocate a guaranteed capacity of the request threadpool to a specific +request type. Indexing and search requests are mostly competing with each other for CPU resources. This becomes especially +pronounced under high stress in production workloads. + +== Rate Limiter Configurations +The default rate limiter is search rate limiter. Accordingly, it can be configured in web.xml under initParams for +SolrRequestFilter. + +[source,xml] +---- +<filter-name>SolrRequestFilter</filter-name> +---- + +==== Enable Query Rate Limiter +Controls enabling of query rate limiter. Default value is false. +[source,xml] +---- +<param-name>isQueryRateLimiterEnabled</param-name> +---- +[source,xml] +---- +<param-value>true</param-value> +---- + +==== Maximum Number Of Concurrent Requests +Allows setting maximum concurrent search requests at a given point in time. Default value is 10. Review comment: Changed to number of cores * 3. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org