This project demonstrates how to use Dapr resiliency policies with Conductor Resiliency Builder feature. For a detailed write-up, see this blog post: Fault-Tolerant Microservices Made Easy with Dapr Resiliency.
mvn clean package
Follow the steps in the quickstart guide to install Kubernetes and Conductor.
To install Skaffold, use the following command:
brew install skaffold
brew install hey
To deploy the applications to a Kubernetes cluster:
skaffold dev
hey -n 100 -c 10 -m POST -d '{"orderId": "200"}' -H "Content-Type: application/json" http://localhost:5001/checkout
Total: 0.2 secs
[200] 100 responses
hey -n 100 -c 10 -m POST -d '{"orderId": "10"}' -H "Content-Type: application/json" http://localhost:5001/checkout
Total: 30.1844 secs
[200] 100 responses
Apply Timeout policy 1second timeout
hey -n 100 -c 10 -m POST -d '{"orderId": "10"}' -H "Content-Type: application/json" http://localhost:5001/checkout
Total: 10.2080 secs
[200] 62 responses
[500] 38 responses
Apply Retry policy (100ms; 5 retries )
hey -n 100 -c 10 -m POST -d '{"orderId": "10"}' -H "Content-Type: application/json" http://localhost:5001/checkout
Total: 5.4999 secs
[500] 100 responses
Apply Retry policy with
hey -n 100 -c 10 -m POST -d '{"orderId": 500"}' -H "Content-Type: application/json" http://localhost:5001/checkout
Total: 5.4999 secs
[500] 100 responses
hey -n 100 -c 10 -m POST -d '{"orderId": "501"}' -H "Content-Type: application/json" http://localhost:5001/checkout
Total: 0.2 secs
[501] 100 responses
hey -n 100 -c 10 -m POST -d '{"orderId": "503"}' -H "Content-Type: application/json" http://localhost:5001/checkout
Summary:
Total: 0.3229 secs
Slowest: 0.1533 secs
[503] 100 responses
hey -n 100 -c 10 -m POST -d '{"orderId": "503"}' -H "Content-Type: application/json" http://localhost:5001/checkout
[200] 100 responses