I am developing microservice with spring boot and spring cloud. I came to know about hystrix and circuit breaker pattern. I know that circuit breakers are for responding with alternate response in case of errors from downstream microservices on which I depend on to get the data. My question is, if I don't have any meaningful alternative response to provide, why would I need a circuit breaker at all.
Short answer: mainly to
Stop cascading failures in a complex distributed system.
I don't have any meaningful alternative response to provide, why would I need a circuit breaker at all.
This question is relevant only if your server serves just a single REST end point (and a single HTTP verb). But almost always, that's not the case. Even the 'micro'services will have combination of multiple endpoints + multiple http verbs. You don't want one endpoint to hung up on a slow downstream microservice and keep threads waiting there ; because it will eventually bring down your entire application.
Read the official documentation
Hystrix is designed to do the following:
Fallback and gracefully degrade when possible" is just one among the features that hystrix offers.