Proposal
I would like KEDA HTTP Add-on to support sticky sessions / session affinity when routing traffic from the interceptor to the target application pods.
Currently, when using the flow:
Load Balancer → KEDA HTTP interceptor → Application Service → Application Pods
the external load balancer can only apply session affinity to the KEDA interceptor, not to the final application pods. After that, the interceptor forwards traffic to the Kubernetes Service, and requests may be distributed across different pods.
It would be useful to have an option in HTTPScaledObject or InterceptorRoute to configure sticky routing based on a cookie, header, or request attribute.
Example desired configuration:
sessionAffinity:
enabled: true
type: cookie
cookieName: JSESSIONID
ttl: 60s
The interceptor could use this value to consistently route requests from the same user/session to the same ready endpoint, while still keeping the scale-to-zero behavior.
Use-Case
Some applications require temporary request affinity to ensure consistent request handling, even when running multiple replicas behind a Kubernetes Service.
Supporting sticky sessions in the KEDA HTTP interceptor would enable workloads to combine:
scale-to-zero
- HTTP activation
- multiple application replicas
- session affinity to application pods
This would simplify deployments that need predictable request routing without introducing additional proxies or custom routing logic.
Is this a feature you are interested in implementing yourself?
Yes
Anything else?
Proposal
I would like KEDA HTTP Add-on to support sticky sessions / session affinity when routing traffic from the interceptor to the target application pods.
Currently, when using the flow:
Load Balancer → KEDA HTTP interceptor → Application Service → Application Pods
the external load balancer can only apply session affinity to the KEDA interceptor, not to the final application pods. After that, the interceptor forwards traffic to the Kubernetes Service, and requests may be distributed across different pods.
It would be useful to have an option in HTTPScaledObject or InterceptorRoute to configure sticky routing based on a cookie, header, or request attribute.
Example desired configuration:
The interceptor could use this value to consistently route requests from the same user/session to the same ready endpoint, while still keeping the scale-to-zero behavior.
Use-Case
Some applications require temporary request affinity to ensure consistent request handling, even when running multiple replicas behind a Kubernetes Service.
Supporting sticky sessions in the KEDA HTTP interceptor would enable workloads to combine:
scale-to-zero
This would simplify deployments that need predictable request routing without introducing additional proxies or custom routing logic.
Is this a feature you are interested in implementing yourself?
Yes
Anything else?