File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -80,14 +80,16 @@ func (ch *ConcurrencyHandler) EvaluateAndAdjustConcurrency(resp *http.Response,
80
80
}
81
81
82
82
// Check critical thresholds
83
- if rateLimitFeedback <= RateLimitCriticalThreshold || weightedResponseCodeScore >= ErrorResponseThreshold {
84
- ch .logger .Warn ("Scaling down due to critical threshold breach" ,
85
- zap .String ("event" , "CriticalThresholdBreach" ),
86
- zap .Int ("rateLimitFeedback" , rateLimitFeedback ),
87
- zap .Float64 ("errorResponseRate" , weightedResponseCodeScore ),
88
- )
89
- ch .ScaleDown ()
90
- return
83
+ if rateLimitFeedback <= RateLimitCriticalThreshold || responseCodeFeedback < 0 {
84
+ if weightedRateLimitScore >= ErrorResponseThreshold || weightedResponseCodeScore >= ErrorResponseThreshold {
85
+ ch .logger .Warn ("Scaling down due to critical threshold breach" ,
86
+ zap .String ("event" , "CriticalThresholdBreach" ),
87
+ zap .Int ("rateLimitFeedback" , rateLimitFeedback ),
88
+ zap .Float64 ("errorResponseRate" , weightedResponseCodeScore ),
89
+ )
90
+ ch .ScaleDown ()
91
+ return
92
+ }
91
93
}
92
94
93
95
// Evaluate cumulative impact and make a scaling decision based on the cumulative score and other metrics.
You can’t perform that action at this time.
0 commit comments