<p>I’m a newbie to istio and k8s, recently I’ve been exploring istio outlier detection and I’m kinda confused for couple of things.Please correct me if I’m wrong:</p>
<p>1.Outlier detections are based on pods and readiness probes based on containers? But actually both will remove unhealty pods out of “lb”(svc or subnets’ connection pool )</p>
<p>2.The best scenario I can think of is that , we might configure our readiness probe lets say 30s interval but outlier detection will take the unhealth pod out of pool when they get 5** .</p>
<p>3.The outlier dections will add the pod back after BaseEjectionTime , I presume the case is like , one pod got picked out from pool and then liveness probe shows unhealth and restart the container. After all this the pod is healthy again and added back to the pool ?</p>
<p>4.Ideally if the readiness probe run every second and no false alarms , does that works the same as outlier detections? Or because it needs to talk to apiserver and there might be network latency and scheduler issue blah blah so istio is more efficient ?</p>
<p>5.Just curious how they two work together in production , any best practice ?</p>
<p>Any comments/thoughts are appreciated , thank you everyone !</p>

Ray Gao
<p>The best explanation on how the istio outlier detection works is covered by this <a href="https://banzaicloud.com/blog/istio-circuit-breaking/" rel="nofollow noreferrer">article</a>. I recommend reading it.</p>
<p>The health checking probes allow to detect when pod is ready or responds according to specific configuration. Outlier detection on the other hand controls the number of errors before a service is ejected from the connection pool.</p>
<p>When the k8s health checks are failed the pod is restarted. In case of outlier detection, the endpoint that triggered outlier detection is suspended on envoy level and is given time to recover.</p>
<p>There can be a scenario where outlier detection triggers without any changes in k8s heath checks.</p>
<p>Also note that the interval and base ejection times of istio outlier detection are dynamic and can be longer each time they are triggered and not very precise.</p>
