Assign explicit thresholds for apps
shlomi-noach opened this issue · 1 comments
Specific apps may require different thresholds. These must be equal or smaller than store thresholds (store threshold are the maximum allowed threashold in a system).
Lower thresholds may impose poor man's prioritization: an app that has a lower threshold will less likely succeed to make progress on busy time, while other apps make it through.
Explicit thresholds can take place in static config, and potentially be applied dynamically.
Alternatively, and since the incentive is for some apps to be nice to others, set a throttle-ratio to an app. Instead of 0
or 1
(non-throttled, throttled, respectively), set a number [0..1]
where:
0
: non throttled1
: fully throttled0.5
: half throttled (every other request gets denied)- etc.
0.9
would get 9/10 requests denied.
Implementing this would be very simple via naive coin flipping, ie just randomizing the response:
if random() < throttle_ratio then return 417 (StatusExpectationFailed)