Handle transient failures to improve application stability
We have the following applications:
- One app exposing a REST endpoint to fetch
cats
:- It is exposed at port 3000
- It contains 1 endpoint: http://localhost:3000/cats
- One gateway that transmits the requests to the cat service
docker-compose up
# Call the url with the query parameter 'SUCCESS' to simulate a success query
curl -i -X POST http://localhost/cats?status=SUCCESS -d '{"name": "foo", "type": "bar"}'
# Call the url with the query parameter 'FAILURE' to simulate a failure query
curl -i -X POST http://localhost/cats?status=FAILURE -d '{"name": "foo", "type": "bar"}'
# Play with those queries and check the logs to check the application state on the circuit breaker