mittwald/kube-httpcache

How does it work with sticky sessions in AWS ALB Ingress

dejwsz opened this issue · 2 comments

Just wonder how it works with ALB Ingress with sticky sessions enabled in ip mode - in that case requests go directly to pods. How Varnish can be used here? The ingress backend should point to varnish instead? And VCL should be defined to enable sticky sessions too?

You Ingress should point to the Varnish pods (or more precisely, the service that is used to select the Varnish Pods). kube-httpcache will watch the upstream endpoints itself and forward users directly to the appropriate Pods.

I'm not entirely sure how ALB Ingress implements sticky sessions (a cookie, presumably?), but that mechanism would need to be also considered in your VCL configuration (possibly by factoring in the sticky session cookie in your vcl_hash functino).

Hope that helps!

OK thanks! Yes it helps.