Imagine that I have microservice A and microservice B. Microservice A needs to make an HTTP request to Microservice B. Should it call the microservice B's health check endpoint prior to performing that request, and only going through with it if the health check returns healthy?
Ans : NO
Use circuit breaker pattern ,you can find api in your preferred langauage and you can define your callback solutions.
Circuit breaker is a design pattern used in modern software development. It is used to detect failures and encapsulates the logic of preventing a failure from constantly recurring, during maintenance, temporary external system failure or unexpected system difficulties(wiki).
A service client should invoke a remote service via a proxy that functions in a similar fashion to an electrical circuit breaker. When the number of consecutive failures crosses a threshold, the circuit breaker trips, and for the duration of a timeout period all attempts to invoke the remote service will fail immediately. After the timeout expires the circuit breaker allows a limited number of test requests to pass through. If those requests succeed the circuit breaker resumes normal operation. Otherwise, if there is a failure the timeout period begins again.