You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| LowerThreshold |`float64`| The lower CPU usage threshold as a fraction (0.0 to 1.0). Requests are considered for shedding when CPU usage exceeds this threshold. |
85
134
| UpperThreshold |`float64`| The upper CPU usage threshold as a fraction (0.0 to 1.0). All requests are shed when CPU usage exceeds this threshold. |
86
135
| Interval |`time.Duration`| The time interval over which the CPU usage is averaged for decision making. |
@@ -110,10 +159,11 @@ This is the default configuration for `LoadCriteria` in the LoadShed middleware.
110
159
var ConfigDefault = Config{
111
160
Next: nil,
112
161
Criteria: &CPULoadCriteria{
113
-
LowerThreshold: 0.90, // 90% CPU usage as the start point for considering shedding
114
-
UpperThreshold: 0.95, // 95% CPU usage as the point where all requests are shed
115
-
Interval: 10 * time.Second, // CPU usage is averaged over 10 seconds
116
-
Getter: &DefaultCPUPercentGetter{}, // Default method for getting CPU usage
117
-
},
162
+
LowerThreshold: 0.90, // 90% CPU usage as the start point for considering shedding
163
+
UpperThreshold: 0.95, // 95% CPU usage as the point where all requests are shed
164
+
Interval: 10 * time.Second, // CPU usage is averaged over 10 seconds
165
+
Getter: &DefaultCPUPercentGetter{}, // Default method for getting CPU usage
0 commit comments