Route request to specific pod


I want to uniquely assign a request based on some header to an instance of a service for the life cycle of said instance. I’m trying to do this by creating a VirtualService with multiple destinations, where each destination maps to a subset that contains a single pod. This works well for a small number of endpoints, but given that this is not what virtual services where designed for, I’m expecting to run into problems when trying to scale it out. How many routes can a virtual service handle before things start falling apart?Is there a better way to accomplish this?

It’s not the virtual service that you should worry about. It’s the resulting envoy configuration. Envoy matches routes sequentially. So if you have a 1000, then your average req latency might take a hit