istioenvoyproxyservicemesh

Istio CircuitBreaker by URI path instead of host?


When I read the docs for Circuit breaker I see a lot of references to ejecting hosts etc. This is cool but I'd like to eject by path. Is this possible?

For example:

Destination rules seem to be the only way to configure this and they seem to be a host-level only thing?

Thanks in advance.


Solution

  • You can split tarffic via VirtualService using match statemnt (and route this traffic into different services)

     http:
      - match:
        - uri:
            prefix: /reviews
        route:
        - destination:
            host: reviews
    

    After that you can use different Destination rules for those services (with porper connection pool and circuit breaker settings)

    Along with virtual services, destination rules are a key part of Istio’s traffic routing functionality. You can think of virtual services as how you route your traffic to a given destination, and then you use destination rules to configure what happens to traffic for that destination. Destination rules are applied after virtual service routing rules are evaluated, so they apply to the traffic’s “real” destination.


    Alternatively, you can use the same service with match statement and use subsets in order to route the traffic to different subset of the same services. From this point it's possible to create different traffic policies for different subsets of the same service.