# Overview

The service declaration function is used to define the underlying RPC service information, supporting Dubbo, gRPC, and HTTP. The defined service declaration can be referenced and used in the service orchestration interface. The underlying RPC service information is unifiedly managed through service declarations. When relevant information changes, only the service declarations need to be modified to avoid changes to the service orchestration interface. The service declaration function is introduced below.

# Service declaration list

Menu location: RPC Management > Service Statement. Click the menu to enter the service declaration list page, as shown in the figure.

manager_rpc_service_query

# Add service statement

Click the Add button to pop up the new window, as shown in the figure.

manager_rpc_service_add_1

manager_rpc_service_add_2

Service type: declared service type, optional Dubbo, gRPC, HTTP, required;

When Service Type selects Dubbo:

Service name: Dubbo service name. The service name must include the package path, such as: com.abc.UserService; the service name cannot be modified after saving;

Description: Description of the service;

Version: version number of Dubbo interface;

Group: Group of Dubbo interface.

manager_rpc_service_add_3

When Service Type selects gRPC:

Service name: gRPC service name. The service name must include the package path, such as: com.abc.UserService. The reflection function must be enabled for the gRPC service. The service name cannot be modified after saving;

Description: Description of the service;

Instance list: Enter the instance IP:Port or domain name:Port of the gRPC service. Multiple instances are separated by commas and are required;

Load balancing: The load balancing strategy used by service calls, supporting polling and randomization.

manager_rpc_service_add_4

When Service Type selects HTTP:

Service name: HTTP service name. The service name can be customized. The gateway will obtain the IP and port of the instance based on this name, such as: OrderService; the service name cannot be modified after saving;

Description: Description of the service;

Instance list: Enter the instance IP:Port or domain name:Port of the HTTP service. Multiple instances are separated by commas and are required;

Load balancing: The load balancing strategy used by service calls, supporting polling and randomization.

# Edit service statement

Click the Edit button to pop up the editing window, as shown in the figure.

manager_rpc_service_edit_1

manager_rpc_service_edit_2

# Delete service statement

Click the Delete button to pop up the deletion confirmation window, as shown in the figure.

manager_rpc_service_delete_1

manager_rpc_service_delete_2

When there is a service declaration referenced by the service orchestration interface, the deletion fails, as shown in the figure.

manager_rpc_service_delete_3

# Service declaration reference

Dubbo service declaration reference in the service orchestration interface, as shown in the figure.

manager_rpc_service_reference_dubbo

The gRPC service declaration reference in the service orchestration interface is as shown in the figure.

manager_rpc_service_reference_grpc

The HTTP service declaration reference in the service orchestration interface is as shown in the figure.

manager_rpc_service_reference_http