Skip to content

Commit 6605008

Browse files
authored
fix: Increase K8s client rate limits for parallel SSAR checks (#433)
## Summary This PR fixes a critical performance issue discovered after merging #428 (pagination and parallel SSAR checks). ### Problem The default Kubernetes client rate limits (QPS=5, Burst=10) were causing significant throttling during parallel SSAR checks: ``` "Waited before sending request" delay="1.997446758s" reason="client-side throttling" ``` ### Solution Increase rate limits: - QPS: 5 → 100 - Burst: 10 → 200 ### Performance Impact Tested with 51 namespaces: - **Before**: 8.2 seconds - **After**: 50 milliseconds - **Improvement**: ~164x faster ### Testing Verified on dev cluster with 51 managed namespaces. Timing logs confirmed SSAR checks completed in 30ms with the increased rate limits.
1 parent 278221f commit 6605008

File tree

1 file changed

+5
-0
lines changed
  • components/backend/server

1 file changed

+5
-0
lines changed

components/backend/server/k8s.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ func InitK8sClients() error {
3737
}
3838
}
3939

40+
// Increase rate limits for parallel operations (default is QPS=5, Burst=10)
41+
// This is needed for parallel SSAR checks when listing projects
42+
config.QPS = 100
43+
config.Burst = 200
44+
4045
// Create standard Kubernetes client
4146
K8sClient, err = kubernetes.NewForConfig(config)
4247
if err != nil {

0 commit comments

Comments
 (0)