aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/main/resources/configdefinitions/search.config.rate-limiting.def
blob: 8378de3f5309515ac078de5925462a4c9b4b3a34 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Copyright Yahoo. 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