Skip to content

Commit cce9fb3

Browse files
author
Mengqi Yu
authored
higher rate limit to prevent unnecessary client-side throttling (#3067)
1 parent 2f9e7b1 commit cce9fb3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

porch/func/internal/podevaluator.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ func NewPodEvaluator(namespace, wrapperServerImage string, interval, ttl time.Du
6868
if err != nil {
6969
return nil, fmt.Errorf("failed to get rest config: %w", err)
7070
}
71+
// Give it a slightly higher QPS to prevent unnecessary client-side throttling.
72+
if restCfg.QPS < 30 {
73+
restCfg.QPS = 30.0
74+
restCfg.Burst = 45
75+
}
76+
7177
cl, err := client.New(restCfg, client.Options{})
7278
if err != nil {
7379
return nil, fmt.Errorf("failed to create client: %w", err)

0 commit comments

Comments
 (0)