Suppose that you have some API requests like these:
example.com/api/projects/123/something
example.com/api/projects/456/something
Is it possible to route the requests of a project always to the same pod?
This would allow us to use local disk storage for caching and improve performance. If a request goes to a "wrong" pod it's not a problem, but we want that most requests of the same project go to the same pod (affinity between project param in the URL and pods).
Ideally you just need to compute a hash function on the project ID that generates a number between [1, N] where N is the number of pods. However I don't know how to implement this routing in K8s.