0

I have two services (A and B for example) that communicate with each other via GRPC and work in an OpenShift cluster. I want to exclude sick pods from balancing by response time. For example, if the response time of service B is set to more than 250 ms, I want to redirect traffic to other pods of service B.

With the help of DestinationRule, I was able to exclude from balancing the pods that return errors (outlier detection) but that's not exactly what I need. I want to maintain a low latency of responses for the client.

1 Answers1

0

This is currently not possible with Envoy. There's an existing Github issue that tracks the work to support latency outlier detection.

peterj
  • 103
  • 6
  • Do I have any options on how to do something similar ? – Genrih Frank Jul 19 '23 at 03:17
  • There are ways you could do this. Thinking out loud here, you could come up with a WASM extension, the requests and latencies are tracked, so you could access that data from the extension and possibly either route the traffic to a host of your choosing, or "fail" the health check on slow hosts. – peterj Jul 21 '23 at 17:30
  • What do you think. If I do a CircuitBreaking interrupt mechanism by timeout, will I get the desired result? If POD fails to respond several times, it will be marked as inoperable and will be removed from balancing for a while. – Genrih Frank Jul 28 '23 at 04:26
  • If there's a request timeout, you could use the request hedging feature. Envoy can send multiple requests to your workloads and then return the response from the first one. Note that this only applies in response to a request timeout. You can check the docs here: https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/http/http_routing#request-hedging Note that this feature is not directly exposed in Istio, so you'd have to use an EnvoyFilter to configure it. – peterj Jul 28 '23 at 16:56