Check Circuit Breaker Pattern

HI, I want to learn how does Circuit Breaker work.

I have only one httpbin pod, and I use 2 difference client (C1 & C2) to call httpbin.

Step:

  1. C1 call httpbin/status/502 3 times, then next time I got 503.
    I think Circuit Breaker was working.

  2. C2 to call httpbin/status/200 immediately.
    I expected to get http status 503 response, but I got 200.

  3. C1 called httpbin/status/200 again, I still got 503.
    Circuit Breaker was still working.

I expected that if Circuit Breaker is open, then any client call it will got http status code 503.
But it doesn’t look like that. The other client can still get response.

Have I done something wrong?

Thank you!

DestinationRule:

apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"networking.istio.io/v1alpha3","kind":"DestinationRule","metadata":{"annotations":{},"name":"httpbin","namespace":"circuit-breaking"},"spec":{"host":"httpbin","trafficPolicy":{"connectionPool":{"http":{"http1MaxPendingRequests":1,"maxRequestsPerConnection":1},"tcp":{"maxConnections":1}},"outlierDetection":{"baseEjectionTime":"3m","consecutive5xxErrors":1,"interval":"1s","maxEjectionPercent":100}}}}
  creationTimestamp: "2022-08-17T10:51:24Z"
  generation: 8
  name: httpbin
  namespace: circuit-breaking
  resourceVersion: "1323732"
  uid: d3d9e6a5-a62f-4132-b615-ad18fc0c4fa8
spec:
  host: httpbin
  trafficPolicy:
    connectionPool:
      http:
        http2MaxRequests: 1000
        maxRequestsPerConnection: 10
      tcp:
        maxConnections: 100
    outlierDetection:
      baseEjectionTime: 20s
      consecutive5xxErrors: 3
      interval: 5s
      maxEjectionPercent: 100
      minHealthPercent: 0

I have got the answer.
https://github.com/istio/istio/issues/40576#issuecomment-1225644959