generated from kedacore/github-template
-
Notifications
You must be signed in to change notification settings - Fork 143
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Report
Reported in discussion #1382
KEDA_HTTP_CONNECT_TIMEOUT is used as the base duration for exponential backoff retries, not just as TCP connection timeout. This causes unnecessarily slow cold start responses.
With default KEDA_HTTP_CONNECT_TIMEOUT=500ms I'm seeing these numbers, its even worse with higher timeouts:
- Actual TCP connection time: <5ms
- Cold start response time: ~3.5s
- Expected response time: ~1.5s
| KEDA_HTTP_CONNECT_TIMEOUT | Measured Response Time |
|---|---|
| 500ms (default) | 3.35s |
| 5s | 7.81s |
| 20s | 21.54s |
Expected Behavior
Cold start requests should complete in ~1-1.5 seconds (pod startup time + minimal connection overhead).
Actual Behavior
Cold start requests take 3-3.5 seconds due to 500ms retry backoff intervals, even though TCP connections succeed in <5ms within the cluster.
Steps to Reproduce the Problem
- Set high connect timeout:
kubectl set env deployment/keda-add-ons-http-interceptor -n keda KEDA_HTTP_CONNECT_TIMEOUT=500ms - Deploy HTTPScaledObject with
minReplicas: 0 - Scale scaled deployment to 0:
kubectl scale deployment <app> --replicas=0 - Make request:
time curl http://<ingress>/<path> -H "Host: <host>"
Logs from KEDA HTTP operator
no logs
HTTP Add-on Version
0.11.1
Kubernetes Version
1.33
Platform
Any
Anything else?
I will investigate this and create a PR.
rd-zahari-aleksiev
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
To Triage