title | description | services | author | ms.service | ms.topic | ms.date | ms.author |
---|---|---|---|---|---|---|---|
Enable cookie based affinity with Application Gateway |
This article provides information on how to enable cookie-based affinity with an Application Gateway. |
application-gateway |
caya |
application-gateway |
how-to |
11/4/2019 |
caya |
As outlined in the Azure Application Gateway Documentation, Application Gateway supports cookie based affinity, which means it can direct subsequent traffic from a user session to the same server for processing.
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: guestbook
annotations:
kubernetes.io/ingress.class: azure/application-gateway
appgw.ingress.kubernetes.io/cookie-based-affinity: "true"
spec:
rules:
- http:
paths:
- backend:
serviceName: frontend
servicePort: 80