preface

Dubbo Admin Deployment Hi everyone, today we start sharing – Dubbo project Dubbo Admin deployment. In the previous chapter, we introduced Dubbo service governance and discussed the background of distributed development from the perspective of architecture evolution. At the same time, we know that the main function of Dubbo service governance is to change the behavior and location logic of runtime services, achieve the purpose of traffic limiting, weight configuration, etc. Among them, Dubbo service governance provides: Service discovery registration, service monitoring, cluster fault tolerance, load balancing, blacklist and whitelist, label routing, conditional routing, weight adjustment and other capabilities. Some people want to know where we can manage and maintain these service governance? This chapter then revolves around the service governance management console that we will use. Let’s get started quickly!

1. Dubbo Admin Introduction

The following is a brief introduction from the official website: Dubbo Admin adopts the way of separating the front and back ends in architecture. Vue and Vuetify are used as Javascript framework and UI framework respectively in the front end, and Spring Boot framework is used in the back end. It can be packaged and deployed in accordance with the standard Maven mode, or it can be separated from the front and back end to facilitate development. In terms of functions, it has three parts: service query, service governance and service test. We can simply sum up as follows: Dubbo Admin adopts standard SpringBoot and front-end separation architecture design, while providing us with: service governance, service query, service testing and other functions.

2. Service governance ability

We have discussed Dubbo service governance in the introduction to Dubbo Service Governance. What are the service governance capabilities provided by Dubbo Admin? Here we summarize the service governance capabilities that are commonly used in our daily work:

  1. Service management

Tips: includes consumer/server service query, service offline, metadata display.

  1. Service test

Tips: Based on the metadata of Dubbo2.7, Dubbo Admin implements service testing capabilities that invoke real service providers from the console via generalized calls.

  1. Service governance

    3.1 Conditional Routing

Tips: Filter qualified service providers by dynamically configuring related criteria. You can configure two dimensions: service and application. Conditional routes are in YAML format.

3.2 Label Routing

Tips: By labeling different providers, the same label is the same set of services, and the caller selects the service group by specifying the label. Configure the application as a dimension to label different servers with different names. Note: New features introduced in Dubbo 2.7.

3.3 Blacklist and Whitelist

Tips: Conditional routing is a part of conditional routing. Rules are stored together with conditional routing. For easy configuration, you can also specify the blacklist and whitelist by service and application dimensions.

3.4 Dynamic Configuration

Tips: dynamic configuration is a service governance function that is parallel to routing rules. It is mainly used to dynamically change the invocation behavior without restarting the service. Starting from Dubbo2.7, it supports both service and application configuration in yaml format

3.5 Weight Adjustment

Tips: Dynamically adjust the weight of the server to change the probability that the service is selected by the client, so as to achieve traffic distribution.

3.6 Load Balancing

Tips: By dynamically adjusting the client location logic, the current load balancing strategies are random, rotational, and minimum active

3.7 Service Statistics

3.8 Service Statistics

Tips: Collect statistics of service providers, service consumers invoking method QPS and success rate, thread pool thread usage and other information.

3.9 Service Invocation Relationship

Tips: Display our service invocation topology.

3.10 Configuration Management

Tips: Use the annotation center or configuration center to store the configuration of the global dimension and the application dimension respectively, which takes effect globally and within the application scope. The application configuration can also specify the configuration of the service level in the application. You can view the configuration in the console and modify the configuration rules. Note: new features in Dubbo2.7

3. Example demonstration

Let’s start demonstrating the rapid deployment of Dubbo Admin. The following describes the three deployment modes:

Docker deployment

  1. Pull the mirror
docker pull apache/dubbo-admin
Copy the code
  1. Boot image
docker run -p 8080:8080 apache/dubbo-admin
Copy the code

Docker-related environment has been installed in advance. By default, local ZooKeeper is used and the default port is 2181. We can also change the default behavior by specifying external parameters: admin.registry. Address, admin.config-center, admin.metadata-report-address. The latest image version is 0.1.0. The latest image package is not released on the official website. Therefore, this method is not recommended.

  1. Go to http://localhost:8080

  2. Build Environment Deployment

    4.1 clone code: git clone https://github.com/apache/dubbo-admin.git

    4.2 in dubbo – admin – server/SRC/main/resources/application. The properties specified in the registry address

    admin.registry.address=Zookeeper: / / 127.0.0.1:2181
    Copy the code

4.3 Building Using Maven

mvn clean package

4.4 Starting an Application

MVN –projects dubo-admin-server spring-boot:run or

cd dubbo-admin-distribution/target; Java – jar dubbo – admin – 0.1. The jar

4.5 visit http://localhost:8080

  1. Development Environment Deployment

    5.1 clone code: git clone https://github.com/apache/dubbo-admin.git

    5.2 Idea Load the source code

    Run the Main method of the Dubo-admin-server project. Because Dubo-Admin-Server is a standard Spring Boot project, you can run it in any Java IDE

    Run the dubbo – admin – the UI. Because Dubo-admin-ui is managed and built by NPM, in a development environment, it can be run separately: NPM run dev

    5.3 visit http://localhost:8080

    Tips: Here we need to install the NPM environment.

When we successfully deploy Dubbo Admin we can see the following page:

Tips: Default account for logging in to the background system: root Password: root

4. Summary

This section focuses on the deployment of the Admin service governance platform in Dubbo. At the same time, we know that Dubbo Admin provides service governance for us: service management, service governance, service governance, service statistics, configuration management and other related capabilities. Through Dubbo Admin’s service governance capabilities, we can dynamically manage our service routing policies, load balancing mechanisms, fault tolerance policies, dynamic configuration and other capabilities.

The highlights of this lesson are as follows:

  1. Understand Dubbo service governance

  2. You learned how to deploy Dubbo Admin

  3. Understand the service governance capabilities of Dubbo Admin

The author

Personally engaged in the financial industry, I have worked in chongqing’s first-class technical team of Yiji Pay, Sijian Technology and an online car hailing platform, and now I am working in a bank responsible for the construction of unified payment system. I have a strong interest in the financial industry. It also practices big data, data storage, automated integration and deployment, distributed microservices, responsive programming, and artificial intelligence. At the same time, he is also keen on technology sharing, creating public accounts and blog sites to share knowledge system. Concern public number: young IT male get latest technical article push!

Blog: Youngitman.tech

Wechat Official Account: