I am looking for a service proxy (or load-balancer) with URL-based affinity.
This is for using in Kubernetes, inside the cluster: I am looking for an "internal" load balancer, I don't need to expose the service outside.
By default, the Service in Kubernetes is using a "round robin" algorithm.
I would like some affinity based on a part of the HTTP URL: a 1st request would go to a random pod, and subsequent requests that use the same URL would (preferably) go to the same pod.
I have read some doc about affinity based on sourceIP, does this exist based on URLs ?
I have quickly read about Envoy, maybe using the "Ring hash" load-balancing algorithm would do, but I don't know if it's possible to hash based on the URL.
Maybe using the "ipvs" proxy-mode of kube-proxy (https://kubernetes.io/docs/concepts/services-networking/service/#proxy-mode-ipvs) would do, but I see only "destination hashing" and "source hashing" as load balancing algorithms, and I don't know how to configure it either.