Skip to content

Commit e272b8a

Browse files
committed
Editorial changes
1 parent 38d6776 commit e272b8a

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

articles/spring-cloud/spring-cloud-tutorial-circuit-breaker.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ ms.date: 04/06/2020
1010
---
1111

1212
# 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.
1414
> [!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.
1616
1717
## Prepare your sample applications
1818
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:
2222
git clone https://github.com/yucwan/spring-cloud.git
2323
```
2424

25-
Build the 3 applications that will be used in this tutorial.
26-
user-service: A simple REST service that has a single endpoint of /personalized/{id}
27-
recommendation-service: A simple REST service that has a single endpoint of /recommendations, which will be called by user-service.
28-
hystrix-turbine: A Hystrix dashboard service to display Hystrix streams and a Turbine service aggregating Hystrix metrics stream from other services.
25+
Build the 3 applications that will be used in this tutorial:
26+
* user-service: A simple REST service that has a single endpoint of /personalized/{id}
27+
* recommendation-service: A simple REST service that has a single endpoint of /recommendations, which will be called by user-service.
28+
* hystrix-turbine: A Hystrix dashboard service to display Hystrix streams and a Turbine service aggregating Hystrix metrics stream from other services.
2929
```
3030
cd spring-cloud/spring-turbine
3131
mvn clean package -D skipTests -f user-service/pom.xml
3232
mvn clean package -D skipTests -f recommendation-service/pom.xml
3333
mvn clean package -D skipTests -f hystrix-turbine/pom.xml
3434
```
3535
## Provision your Azure Spring Cloud instance
36-
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).
3737

3838
## 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:
4040
```azurecli
4141
az spring-cloud app create -n user-service --is-public
4242
az spring-cloud app create -n recommendation-service
@@ -47,31 +47,31 @@ az spring-cloud app deploy -n recommendation-service --jar-path recommendation-s
4747
az spring-cloud app deploy -n hystrix-turbine --jar-path hystrix-turbine/target/hystrix-turbine.jar
4848
```
4949
## 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.
5151
```json
5252
[{"name":"Product1","description":"Description1","detailsLink":"link1"},{"name":"Product2","description":"Description2","detailsLink":"link3"},{"name":"Product3","description":"Description3","detailsLink":"link3"}]
5353
```
5454
## 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.
5656

5757
### Using public endpoints
5858
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.
5959

6060
![Hystrix dashboard](media/spring-cloud-circuit-breaker/hystrix-dashboard.png)
6161

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 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.
6363

6464
![Hystrix stream](media/spring-cloud-circuit-breaker/hystrix-stream.png)
65-
You can experiment with the Circuit Breaker Dashboard.
65+
Now you can experiment with the Circuit Breaker Dashboard.
6666
> [!NOTE]
6767
> In production, the Hystrix dashboard and metrics stream should not be exposed to the Internet.
6868
6969
### 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`
7171

7272
![Hystrix test-endpoint stream](media/spring-cloud-circuit-breaker/hystrix-test-endpoint-stream.png)
7373

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 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 test endpoint, 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.
7575

7676
## See also
7777
* [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

Comments
 (0)