0

I have microservices that need to be stateful. I also want the microservices to be scalable such that replicas can be added or removed as needed, primarily for auto-scaling. What I'm looking for is either an Istio extension that would support this, or an example Istio extension that I could start with to create such an extension. My thoughts are that when a replica gets a request, if subsequent requests need to come back to that same replica, I'd have the microservice include it's hostname(?) in a response header. The caller would pass that header back in subsequent requests and the extension would notice that header and alter the routing to route the request to the specific replica that needs to receive the request.

I've looked at the consistent hashing mechanism Istio provides, but that won't yield consistent routing as far as I can tell when the number of replicas changes.

Certainly others must have a similar requiremnt.

Toddinpal
  • 345
  • 1
  • 7
  • What exactlyhave you tried to achieve your goal? – Mikołaj Głodziak Apr 14 '22 at 06:13
  • I haven't tried anything as I haven't found anything that will accomplish what I need. What I need isn't exactly session affinity. What I need is for a replica to reply with something, most likely a header, that indicates a connection to a resource that can only be handled by that specific replica. So an initial request without any header can be routed to any replica, that replica needs to respond with something that allow another client to reach that specific replica. – Toddinpal Apr 15 '22 at 18:16
  • So which version of Kubernetes and Istio did you use and how exactly did you set up your cluster? – Mikołaj Głodziak Apr 19 '22 at 06:44
  • As I previously mentioned, I haven't tried anything as I haven't found anything that appears as though it would support this. – Toddinpal Apr 20 '22 at 16:13

0 Answers0