<p>My 2 microservices are talking to each other via GRPC and I am using envoy proxy.
Microservice A is calling Microservice B and envoy container is inside Mircoservice A's pod.</p>
<p>My problem is that if because of any issue Microservice B pod crashed I dont get any error at A, its just keeps trying to establish connection.</p>
<p>My expectation is that since B pod is crashed envoy proxy should immediately give some error that cant connect or something because it knows that connection is not possible as no pods are available.</p>
<p>I have a standard connection timeout at A but I want envoy to fail quick in this case.</p>
<p>Nothing can be done at B side since it will be already crashed and A is relying on envoy proxy.</p>

Afzal Khan
<p>In order to know the Status or Error when the microservice B is getting failed in  Envoy Proxy has a feature called <strong><a href="https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/circuit_breaking#circuit-breaking" rel="nofollow noreferrer">Envoy Circuit Breaking.</a></strong> This stops sending requests to pod B as it is experiencing the issues and not able to respond. Refer to this <a href="https://blog.christianposta.com/microservices/01-microservices-patterns-with-envoy-proxy-part-i-circuit-breaking/" rel="nofollow noreferrer">blog</a> by Christian Posta who has explained clearly about Circuit Breaking with Envoy Proxy and its configuration with a demo.</p>
<p>Envoy Proxy circuit breaking is working for the microservices whereas in order to know the Pod level crash and its alert we need to use <strong>Prometheus.</strong> Prometheus is a good fit for microservices because you just need to expose a metrics port, and don’t need to add too much complexity or run additional services. You can find templates for Pod Crashing and Pod unhealthy <a href="https://samber.github.io/awesome-prometheus-alerts/rules.html#rule-kubernetes-1-18" rel="nofollow noreferrer">here</a> configure accordingly in the pods which will give you alert when Pod crashing or pod unhealthy.</p>
