Eureka, ZooKeeper, and Nacos are common service registries in the Java microservices model. Service registries handle service registration and discovery, and decouple services from each other to enable dynamic management. This topic describes the service registries that Enterprise Distributed Application Service (EDAS) supports, their O&M methods, and the related operations.
Registry center
Service registries include Eureka, ZooKeeper, and Nacos. For more information about each service registry, see its official website or GitHub repository. This can help you choose a service registry based on your business needs.
EDAS provides hosting and microservices governance for your applications regardless of which service registry you use.
Different O&M methods are available for applications deployed in EDAS, depending on the service registry type.
Use Nacos
If you use Nacos as the service registry, two O&M options are available:
-
Use the shared service registry of EDAS
The shared service registry of EDAS integrates the commercial version of Nacos. This integration provides the service registration and discovery capabilities of Nacos as a built-in, fully managed service component.
Benefits
The shared service registry of EDAS provides the following benefits:
-
It saves costs on deploying and maintaining a service registry because it is a shared component.
-
Service registration and discovery calls are encrypted to protect your services. This prevents unauthorized applications from discovering your services.
-
The shared service registry of EDAS is tightly integrated with other EDAS components to provide a complete microservices solution.
Operations
When you create or deploy a Kubernetes application, clear the Use the service registry configured for the application option. This action overwrites the Nacos address configured in the application, regardless of its settings. The application then connects to the shared service registry of EDAS.
-
-
The application's registry configuration includes Operations for both MSE-hosted and self-managed Nacos.
When you create or deploy a Kubernetes application, select Use the service registry configured for the application. EDAS then configures the application to prevent its configured Nacos address from being replaced by the address of the shared EDAS registry during deployment. This ensures that the application continues to use its configured service registry.
Note-
Make sure your service registry can communicate with the application that is hosted in EDAS over the network. For example, they must be in the same VPC.
-
Nacos 2.x does not support access from all regions. Therefore, the client cannot connect to port 9848.
-
To configure the Use the service registry configured for the application setting, see Configure microservices governance.
-Dnacos.use.endpoint.parsing.rule=false -Dnacos.use.cloud.namespace.parsing=false -
Use Eureka or ZooKeeper
If you use Eureka or ZooKeeper, you can choose an MSE-managed or a self-managed instance. For more information about MSE and the benefits of a managed service registry, see What is Microservices Engine (MSE)?.
Make sure your service registry can communicate with the application that is hosted in EDAS over the network. For example, they must be in the same VPC.
Operations
When you create or deploy a Kubernetes application in EDAS that uses Eureka or ZooKeeper, select Use the service registry configured for the application. For more information, see Configure microservices governance.
You can also replace Eureka or ZooKeeper with Nacos in the application configuration to use the shared service registry of EDAS.
Use other types of service registries
If you use another type of service registry, such as Consul, you must use a self-managed registry.
Make sure your service registry can communicate with the application that is hosted in EDAS over the network. For example, they must be in the same VPC.
Operations
If your application has a configured service registry, select Use the service registry configured for the application when you create or deploy the application in EDAS. For more information, see Configure microservices governance.
You can also replace the service registry with Nacos in the application configuration to use the shared service registry of EDAS.
FAQ
Why do I get an HTTP 403 error when connecting to the shared service registry of EDAS?
EDAS injects tenant authentication information. However, username and password authentication has a higher priority than tenant-based authentication. Therefore, you must remove the username and password configuration for the service registry from the application.
How do I connect to an MSE service and configuration registry?
To connect to an MSE service and configuration registry, associate a microservices namespace with an MSE Nacos instance when you create the namespace. Then, select this microservices namespace when you create an application. For more information about how to create a microservices namespace, see Create a microservices namespace.
When using the shared service registry, how do I read its configuration in my code?
The Application Configuration Management (ACM) feature that is integrated with EDAS is not affected by the discontinuation of the standalone ACM product. For information about how to write the code, see Dynamically push configurations using ACM.