application-gateway-kubernetes-ingress
application-gateway-kubernetes-ingress copied to clipboard
Cookie based affinity timeout
Is your feature request related to a problem? Please describe.
When using cookie based session affinity (appgw.ingress.kubernetes.io/cookie-based-affinity: "true"
), I want to specify a cookie timeout.
In this use case, session affinity is used to take advantage of locally cached data in a container for performance benefits. We also use an HPA for Pod autoscaling. After a scale up event we still want to rebalance users across containers. The balance between the efficiency gain of local caches and the additional resources available can be tuned by specifying a cookie timeout. That is, once a user is idle for long enough, we want to rebalance them evenly across the available containers.
Describe the solution you'd like I want to specify a cookie timeout using an annotation on the ingress:
apiVersion: extensions/v1beta1
metadata:
annotations:
kubernetes.io/ingress.class: azure/application-gateway
appgw.ingress.kubernetes.io/cookie-based-affinity: "true"
appgw.ingress.kubernetes.io/cookie-based-affinity-timeout: 600
A similar solution for AWS' ALB works as follows:
alb.ingress.kubernetes.io/target-group-attributes: stickiness.enabled=true,stickiness.lb_cookie.duration_seconds=600
@dcasavant This is a feature ask on Application Gateway as it doesn't support cookie timeout.
I have raised this as an idea on the Azure feedback portal. Please vote for it if you would like this implemented: Application Gateway Cookie-based Affinity stickiness timeout