In online microservices scenarios, if errors occur in specific instances of a service, the service provider needs to prevent the abnormal instances from being accessed by service consumers. The service provider also needs to record the errors for subsequent troubleshooting. This topic describes how to unpublish an abnormal pod from a service registry of Enterprise Distributed Application Service (EDAS) at the earliest opportunity.
Procedure
Log on to the EDAS console. In the left-side navigation pane, choose Application Management > Applications.
In the top navigation bar, select a region. In the upper part of the Applications page, select a microservices namespace from the Microservices Namespace drop-down list. From the Cluster Type drop-down list, select Kubernetes Cluster. Find the application for which you want to unpublish a pod, and click the name of the application to go to the application overview page.
In the upper-right corner of the application overview page, click Configuration Details.
In the Pod section of the App Configurations panel, find the pod and click Service online or Service offline in the Actions column based on your business requirements. In this example, click Service offline.
NoteThis feature is applicable only to Java applications that use Dubbo 2.6.x, Dubbo 2.7.x, or Spring Cloud Edgware and later.
If
spring.cloud.xxxx.discovery.fail-fast=falseis configured for a Spring Cloud application, the system cannot determine whether the application is online or offline.