Take a pod offline or bring it back online
When a microservice instance running on a specific pod encounters errors, you can deregister that pod from the Enterprise Distributed Application Service (EDAS) service registry without deleting or restarting it. This isolates the unhealthy instance from service consumers while you investigate the issue. After you resolve the issue, bring the pod back online to resume traffic.
How it works
When you click Service offline, EDAS deregisters the pod from the service registry. Service consumers no longer discover or route requests to that instance. The pod itself continues running -- it is not deleted, restarted, or scaled down. This means you can still access the pod for debugging, log collection, or troubleshooting.
When you click Service online, EDAS re-registers the pod with the service registry. Service consumers then resume routing requests to the instance.
| Action | Registry effect | Pod state | Traffic |
|---|---|---|---|
| Service offline | Deregistered | Running | No new requests routed |
| Service online | Re-registered | Running | Requests resume |
The online or offline action applies only to the selected pod. Other pods in the same application are not affected.
Prerequisites
Before you begin, make sure that you have:
An EDAS application deployed on a Kubernetes cluster
A Java application that uses one of the following frameworks:
Dubbo 2.6.x
Dubbo 2.7.x
Spring Cloud Edgware or later
Change the online or offline status of a pod
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 page, select a microservices namespace from the Microservices Namespace drop-down list, and then select Kubernetes Cluster from the Cluster Type drop-down list.
Click the name of the target application to go to the application overview page.
In the upper-right corner, click Configuration Details.
In the Pod section of the App Configurations panel, find the target pod and click one of the following in the Actions column:
Service offline: Deregisters the pod from the service registry. Service consumers stop routing traffic to this instance.
Service online: Re-registers the pod with the service registry. Service consumers resume routing traffic to this instance.
Spring Cloud configuration constraint
If spring.cloud.xxxx.discovery.fail-fast=false is configured for a Spring Cloud application, the system cannot determine whether the application is online or offline. To use this feature, remove this property or set it to true.