Fix Azure AKS Keda Http Errors
When working with Azure AKS, you may encounter a configuration error that prevents your deployment from working. This guide explains the most common mistake with keda http and shows the exact fix.
A Common Mistake
Using default HPA for HTTP workloads when KEDA HTTP addon provides faster, request-based autoscaling.
The incorrect command:
kubectl autoscale deployment web-app --cpu-percent=70 --min=2 --max=20
Error output:
HPA scales based on CPU.
Traffic spike: CPU takes 30-60s to rise. HPA reacts after that.
Scaling is delayed by 1-2 minutes.
Users experience latency during the scaling lag.
The Correct Approach
The right way to configure keda http in Azure AKS:
helm install keda kedacore/keda
helm install http-addon kedacore/keda-add-ons-http
kubectl apply -f - <<EOF
apiVersion: http.keda.sh/v1alpha1
kind: HTTPScaledObject
metadata:
name: web-app
spec:
hosts:
- app.example.com
scaleTargetRef:
name: web-app
service: web-app
port: 80
scalingMetric:
requestRate: 100
# Target: 100 requests/second per pod
EOF
Successful result:
KEDA HTTP addon configured.
Traffic spike:
Requests are intercepted by the HTTP interceptor.
When request rate exceeds 100/sec: KEDA scales up within seconds.
No CPU lag. Instant scaling response.
How to Prevent This
KEDA HTTP addon provides faster scaling for HTTP workloads. Intercepts HTTP requests and scales based on request rate. Supports: request rate, concurrent requests. Works with any HTTP application. Requires KEDA + HTTP addon Helm chart. Provides faster response than CPU-based HPA.
FAQ
Built by the developers of Doda Browser, DodaZIP, and Durga Antivirus Pro. Secure your cloud with DodaTech.
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro