You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/spring-cloud/spring-cloud-tutorial-circuit-breaker.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,9 @@ ms.date: 04/06/2020
10
10
---
11
11
12
12
# Use Circuit Breaker Dashboard with Azure Spring Cloud | Microsoft Docs
13
-
Spring Cloud Netflix Turbine is widely used to aggregates multiple Hystrix metrics streams so that streams can be monitored in a single view using Hystrix dashboard. This tutorial demonstrates how to use them on Azure Spring Cloud.
13
+
Spring Cloud Netflix Turbine is widely used to aggregate multiple Hystrix metrics streams so that streams can be monitored in a single view using Hystrix dashboard. This tutorial demonstrates how to use them on Azure Spring Cloud.
14
14
> [!NOTE]
15
-
> Netflix Hystrix is widely used in existing Spring Cloud apps, but it is no longer in active development. If you are developing new project, you can consider resilience4j instead. Circuit Breaker Dashboard for resilience4j dependents on micrometer, which is currently not supported for Azure Spring Cloud, so it will not be covered by this tutorial.
15
+
> Netflix Hystrix is widely used in existing Spring Cloud apps, but it is no longer in active development. If you are developing new project, you can consider resilience4j instead. Circuit Breaker Dashboard for resilience4j depends on micrometer, which is currently not supported for Azure Spring Cloud, so it will not be covered by this tutorial.
16
16
17
17
## Prepare your sample applications
18
18
The sample is forked from this [repository](https://github.com/StackAbuse/spring-cloud/tree/master/spring-turbine).
@@ -22,21 +22,21 @@ Clone the sample repository to your develop environment:
Follow the procedure as described in[Provision a service instance on the Azure CLI](https://docs.microsoft.com/azure/spring-cloud/spring-cloud-quickstart-launch-app-cli#provision-a-service-instance-on-the-azure-cli).
36
+
Follow the procedure,[Provision a service instance on the Azure CLI](https://docs.microsoft.com/azure/spring-cloud/spring-cloud-quickstart-launch-app-cli#provision-a-service-instance-on-the-azure-cli).
37
37
38
38
## Deploy your applications to Azure Spring Cloud
39
-
These apps do not use Config Server, so there is no need to set up **Config Server** for Azure Spring Cloud. Deploy as follows:
39
+
These apps do not use **Config Server**, so there is no need to set up **Config Server** for Azure Spring Cloud. Create and deploy as follows:
40
40
```azurecli
41
41
az spring-cloud app create -n user-service --is-public
42
42
az spring-cloud app create -n recommendation-service
az spring-cloud app deploy -n hystrix-turbine --jar-path hystrix-turbine/target/hystrix-turbine.jar
48
48
```
49
49
## Verify your apps
50
-
After all the apps are running and discoverable, access user-service with the path https://yuchensp-user-service.azuremicroservices.io/personalized/1 from your browser. You should get the following output if the user-service can access recommendation-service. If it doesn't work, refresh the web page a few times.
50
+
After all the apps are running and discoverable, access `user-service` with the path https://yuchensp-user-service.azuremicroservices.io/personalized/1 from your browser. If the user-service can access `recommendation-service`, you should get the following output. Refresh the web page a few times if it doesn't work.
## Access your Hystrix dashboard and metrics stream
55
-
Verify using public endpoints or using private test endpoints.
55
+
Verify using public endpoints or private test endpoints.
56
56
57
57
### Using public endpoints
58
58
Access hystrix-turbine with the path `https://<SERVICE-NAME>-hystrix-turbine azuremicroservices.io/hystrix` from your browser. The following figure shows the Hystrix dashboard running in this app.
Copy the Turbine stream url `https://<SERVICE-NAME>-hystrix-turbine.azuremicroservices.io/turbine.stream?cluster=default` into the text box, and click **Monitor Stream**. This will display the dashboard. If you are not viewing anything, hit the user-service endpoints to generate the streams.
62
+
Copy the Turbine stream url `https://<SERVICE-NAME>-hystrix-turbine.azuremicroservices.io/turbine.stream?cluster=default` into the text box, and click **Monitor Stream**. This will display the dashboard. If nothing shows in the viewer, hit the `user-service` endpoints to generate streams.
You can experiment with the Circuit Breaker Dashboard.
65
+
Now you can experiment with the Circuit Breaker Dashboard.
66
66
> [!NOTE]
67
67
> In production, the Hystrix dashboard and metrics stream should not be exposed to the Internet.
68
68
69
69
### Using private test endpoints
70
-
Hystrix metrics streams are also accessible from test-endpoint. As backend service, we didn't assign a public end-point for recommendation-service, but we can show its metrics with test-endpoint at `https://primary:<KEY>@<SERVICE-NAME>.test.azuremicroservices.io/recommendation-service/default/actuator/hystrix.stream`
70
+
Hystrix metrics streams are also accessible from `test-endpoint`. As a backend service, we didn't assign a public end-point for `recommendation-service`, but we can show its metrics with test-endpoint at `https://primary:<KEY>@<SERVICE-NAME>.test.azuremicroservices.io/recommendation-service/default/actuator/hystrix.stream`
As a web app, Hystrix dashboard should be working on testendpoint. If it is not working properly, there may be two reasons: First, using testendpoint will change the base URL from `/ to /<APP-NAME>/<DEPLOYMENT-NAME>`, or, second, the web app is using absolute path for static resource. To get it working on testendpoint, you might need to manually edit the <base>in the front-end files.
74
+
As a web app, Hystrix dashboard should be working on `test-endpoint`. If it is not working properly, there may be two reasons: first, using `test-endpoint` changed the base URL from `/ to /<APP-NAME>/<DEPLOYMENT-NAME>`, or, second, the web app is using absolute path for static resource. To get it working on `test-endpoint`, you might need to manually edit the <base>in the front-end files.
75
75
76
76
## See also
77
77
*[Provision a service instance on the Azure CLI](https://docs.microsoft.com/azure/spring-cloud/spring-cloud-quickstart-launch-app-cli#provision-a-service-instance-on-the-azure-cli)
0 commit comments