The most direct way to manage Dubbo is through the visual interface provided by the Dubbo control plane (dubbo-control-plane). In the previous article on Quick Start - Deploying Dubbo Applications we also used it to check the status after the service was started.
dubbo-control-plane
supports visual displays, monitoring cluster status, and real-time delivery of traffic control rules.
To experience the effects, we first need to install dubbo-control-plane. Here are the specific steps to install dubbo-control-plane in a Linux environment:
curl -L https://dubbo.apache.org/releases/downloadDubbo.sh | sh -
cd dubbo-$version
export PATH=$PWD/bin:$PATH
dubbo-cp run --mode universal --config conf/dubbo.yml
conf/dubbo.yml
configuration needs to be adjusted according to your needs to point to the registry and other backend services you want to connect to. For specifics, please refer to the backend services dependent on the dubbo-control-plane architecture.http://xxx
to open the console page.
The Admin console provides rich features across different levels from development, testing, to traffic governance. The functions can generally be categorized as follows:
Service status queries display dubbo cluster information with interfaces as the dimension, including service provider, consumer information, and service metadata. Metadata includes service definitions, method names, and parameter lists. Admin supports the application-level discovery model provided by the latest version of dubbo3, presenting application-level & interface-level address information in a unified page interaction, and differentiating records with special tags.
Service testing is mainly used to simulate service consumers, verifying the usage and correctness of Dubbo services.
Service Mock interrupts requests from Consumer to Provider without code embedding, dynamically allowing or returning user-defined Mock data. This resolves blocking issues faced by Consumer developers when the Provider they depend on is not ready in the early stages of development. Simply follow these two steps to enjoy the convenience brought by service Mock:
First step: Consumer applications import service Mock dependencies, adding JVM startup parameter -Denable.dubbo.admin.mock=true to enable service Mock functionality.
<dependency>
<groupId>org.apache.dubbo.extensions</groupId>
<artifactId>dubbo-mock-admin</artifactId>
<version>${version}</version>
</dependency>
Second step: Configure the corresponding Mock data in Dubbo Admin.
The interface documentation provided by Admin is similar to what Swagger does for RESTful style web services. This function effectively manages Dubbo interface documentation.
TBD
Admin provides visual management support for four types of routing rules: conditional routing rules, label routing rules, dynamic configuration rules, and script routing rules. The functionality offered easily realizes service governance needs such as black and white lists, gray environment isolation, multiple testing environments, and canary releases. Next, we take conditional routing as an example to visually create conditional routing rules.
Conditional routing allows for custom routing rules to meet service governance needs, such as priority by region, parameter routing, black and white lists, and read-write separation. The routing rules filter target server addresses before initiating an RPC call, and the filtered address list will serve as candidate addresses for the consumer to initiate the RPC call.
Please refer to Traffic Management Tasks for more details on configuring routing rules.