Skip to content

Commit

Permalink
higher rate limit to prevent unnecessary client-side throttling (#3067)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mengqi Yu committed Apr 29, 2022
1 parent 2f9e7b1 commit cce9fb3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions porch/func/internal/podevaluator.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ func NewPodEvaluator(namespace, wrapperServerImage string, interval, ttl time.Du
if err != nil {
return nil, fmt.Errorf("failed to get rest config: %w", err)
}
// Give it a slightly higher QPS to prevent unnecessary client-side throttling.
if restCfg.QPS < 30 {
restCfg.QPS = 30.0
restCfg.Burst = 45
}

cl, err := client.New(restCfg, client.Options{})
if err != nil {
return nil, fmt.Errorf("failed to create client: %w", err)
Expand Down

0 comments on commit cce9fb3

Please sign in to comment.