summaryrefslogtreecommitdiffstats
path: root/container-search/src/main/resources/configdefinitions/search.config.rate-limiting.def
diff options
context:
space:
mode:
Diffstat (limited to 'container-search/src/main/resources/configdefinitions/search.config.rate-limiting.def')
-rw-r--r--container-search/src/main/resources/configdefinitions/search.config.rate-limiting.def19
1 files changed, 19 insertions, 0 deletions
diff --git a/container-search/src/main/resources/configdefinitions/search.config.rate-limiting.def b/container-search/src/main/resources/configdefinitions/search.config.rate-limiting.def
new file mode 100644
index 00000000000..23235617f8c
--- /dev/null
+++ b/container-search/src/main/resources/configdefinitions/search.config.rate-limiting.def
@@ -0,0 +1,19 @@
+# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+# Configuration of the rate limiting algorithm
+namespace=search.config
+
+# How much additional capacity to assign to a thread each time it has run out.
+# A higher number means less thread contention and less accuracy
+capacityIncrement double default=1000
+
+# The max capacity which will ever (and initially) be available to requesting threads on one node
+# A higher number means we'll be less sensitive to intermittent overlap
+# A good number may be capacityIncrement * 10
+maxAvailableCapacity double default=10000
+
+# The probability per request that we check for more quota when we have run out.
+# A higher number means less probability of rejecting a request unnecessarily
+# but also more thread contention.
+# A good number may be 1 / (maxAvailableCapacity * average-cost)
+recheckForCapacityProbability double default=0.001
+