21227: Use a separate global requestLimiter for each target host.
[arvados.git] / sdk / go / arvados / limiter.go
index 9edc5386a7655c3f1d9e31bcb0d3f55b2a999c87..dc944160ab2dd5d459a31fa2386ebe9a5f6bb2c3 100644 (file)
@@ -16,7 +16,6 @@ import (
 var (
        requestLimiterQuietPeriod        = time.Second
        requestLimiterInitialLimit int64 = 8
-       requestLimiterMinimumLimit int64 = 4
 )
 
 type requestLimiter struct {
@@ -146,12 +145,6 @@ func (rl *requestLimiter) Report(resp *http.Response, err error) bool {
                if max := rl.current * 2; max < rl.limit {
                        rl.limit = max
                }
-               if min := requestLimiterMinimumLimit; min > rl.limit {
-                       // If limit is too low, programs like
-                       // controller and test suites can end up with
-                       // too few slots to complete a single request.
-                       rl.limit = min
-               }
                if rl.maxlimit > 0 && rl.maxlimit < rl.limit {
                        rl.limit = rl.maxlimit
                }