Isolate and diagnose service instances

更新时间:
复制 MD 格式

Service instance isolation and diagnostics helps you resolve online issues, such as memory leaks, and improves the overall stability of your microservices system. When a provider instance becomes unhealthy, MSE Microservices Governance isolates its traffic. With the memory snapshot feature of Application Real-Time Monitoring Service (ARMS), you can create a memory snapshot of the unhealthy instance for later analysis.

Prerequisites

To use the service instance isolation and diagnostics feature, you must meet the following prerequisites:

  • Your application must be a Java application that uses Dubbo 2.6.x, 2.7.x, or Spring Cloud Edgware or a later version.

  • If the spring.cloud.xxxx.discovery.fail-fast property for a Spring Cloud application is set to false, MSE Microservices Governance cannot determine the application's online or offline status.

  • To generate a memory snapshot of an unhealthy instance, you must integrate the instance with Application Real-Time Monitoring Service (ARMS). For details, see Integration guide.

Procedure

  1. Log on to the MSE console, and select a region in the top navigation bar.

  2. In the left-side navigation pane, choose Microservices Governance > Application Governance.

  3. On the Application list page, click the resource card of the desired application.

  4. In the left-side navigation pane, click the Node details tab. Find the unhealthy instance, click Service offline in the Actions column, and then click OK in the Microservice offline dialog box. This action removes the instance from the Microservices Registry.

    After the instance is removed from the Microservices Registry and stops receiving new requests, you can use ARMS to create a memory snapshot of the unhealthy instance for troubleshooting.

    1. On the Node details page, find the instance whose microservice status is Offline. In the Actions column for that instance, click To create a memory snapshot. In the Hint dialog box, click OK. This redirects you to the ARMS console.

    2. In the ARMS console, on the Application Details page, click Create Memory Snapshot in the upper-right corner. In the Create Memory Snapshot dialog box, click Save to create a memory snapshot of the unhealthy instance. You can also find the Create Memory Snapshot button on the JVM Monitoring page.

Related documentation

For more information about how to create and view memory snapshots, see Memory Snapshots.