Implementing Circuit Breakers
This tutorial takes you through setting up a .NET Core application that implements a circuit breaker pattern.
First, start a instance of the Hystrix dashboard. Depending on your hosting platform this is done in several ways.
Create a .NET Core WebAPI that implements the circuit breaker pattern
Create a new ASP.NET Core WebAPI app with the Steeltoe Initializr
- SteeltoeVersion: 2.3 for the latest stable
Project Metadata:Name: Circuit_Breaker_ExampleTarget Framework: netcoreapp3.0 is the latest stable
- Dependencies: Circuit Breakers
- Click Generate Project to download a zip containing the new project
- Extract the zipped project and open in your IDE of choice (we use Visual Studio)
- Set the instance address and name in appsettings.json
Run the application
- Refresh the application in your browser a few times and go back to the dashboard to see it logging live activity.