<ul>
<li>with istio 1.4.6</li>
</ul>
<p>I configured Kubernetes using resources such as <code>service</code>, <code>deployment</code>.
I also configured <code>gateway</code>, <code>virtual service</code>, and <code>destination rules</code> to implement circuit breakers.</p>
<p>The composition diagram is as follows. (<strong>number of Pod's replica is two. &amp; I operate only one version of app.</strong>)</p>
<p><a href="https://i.stack.imgur.com/sGidq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sGidq.png" alt="enter image description here" /></a></p>
<p>I wrote <code>VirtualServices</code> and <code>DestinationRules</code> to use circuit breakers</p>
<h3>VirtualService</h3>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: reviews-virtual-service
spec:
  gateways:
  - reviews-istio-gateway
  hosts:
  - reviews
  http:
  - route:
    - destination:
        host: reviews-service
        port:
          number: 80
</code></pre>
<h3>DestinationRules</h3>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: reviews-destination-rule
spec:
  host: reviews
  trafficPolicy:
    loadBalancer:
      simple: ROUND_ROBIN
    outlierDetection:
      baseEjectionTime: 1m
      consecutiveErrors: 1
      interval: 1s
      maxEjectionPercent: 100
</code></pre>
<p>Here, I expect that if more than one error occurs in <code>reviews-app</code>, all pods will be excluded from the load balancing list for a minute.
Therefore, I expected the circuit breaking to work as below.</p>
<p><a href="https://i.stack.imgur.com/gVkys.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gVkys.png" alt="enter image description here" /></a></p>
<p>However, contrary to expectations, <strong>circuit breakers did not work</strong>, and <strong>error logs were continuously being recorded</strong> in reviews-app.</p>
<p><strong>Why isn't the circuit breaker working?</strong></p>

henry-jo
<p>I guess the problem is not about Circuit Breaking, but about the usage of Virtual Services and Destination Rules.</p>
<p>For example, if using a Virtual Service with a Gateway, its host should probably be of public host, like <a href="http://amce.io" rel="nofollow noreferrer">http://amce.io</a></p>
<p>The host of the Destination Rule should probably be that of the Kubernetes Service.</p>
