As outlined in the Azure Application Gateway Documentation, Application Gateway supports cookie based affinity enabling which it can direct subsequent traffic from a user session to the same server for processing.

Example

apiVersion: networking.k8s.io/v1
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:
          service:
            name: frontend
            port:
              number: 80