Last time, dubbo has ali’s own background management tool, here is the introduction of ali this background management tool, dubo-admin. Source: github.com/limingios/n…

(I) Preparation for installation

Here I also use the docker method to install, manual installation is too troublesome, directly see the official website. There’s no technical content, it’s more fun to use docker.

  • Set the DNS
vi /etc/resolv.conf 
# nameserver 8.8.8.8
Copy the code

  • Add docker accelerator
curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://f1361db2.m.daocloud.io

service docker restart 
Copy the code

  • Zookeeper installation container
docker pull zookeeper
docker run --privileged=true -d --name zookeeper --publish 2181:2181  -d zookeeper:latest
Copy the code

  • Start the Java projects Provider and Cosumber

(2) Install dubbo admin

Zookeeper has been installed. Run the dubo-admin command to install dubo-admin

  • Dubbo – admin container
Docker run - d \ -p 8080:8080 \ e dubbo registry. Address = zookeeper: / / 192.168.70.100: \ - 2181 e dubbo.admin.root.password=root \ -e dubbo.admin.guest.password=guest \ chenchuxin/dubbo-adminCopy the code

  • Dubbo – admin container

After successful operation, wait for a moment and access IP :port. The default password is

  • Administrator: root: root
  • Guest: Guest

(3) Introduction to duBBU -admin

  • service

  • Specific service information

All information is based on the url to the display, can see the front part contains url call protocol, called TCP/IP, port, through the back part of the positioning to a specific service, the basic information of the interface, what belongs to the application, the number of retries, thread pool, no matter in any registry, is based on the description of the provider is the url.

  • Dynamic control permissions

  • Load balancing

Click add, you can select the method to control, this role is relatively large.

In fact, dubbo-admin management tool kernel is the url inside the parameter, modify it is to modify redis or ZooKeeper there is a config value. When the client consumer takes it, it merges the url value with the config value. Dubbo-admin is not a provider, but a provider is not a provider.

(iv) Registries supported by Dubbo

  • Redis

1. Store data in K/V form 2. Notify data changes based on Redis Publish/Subscribe event

The subscription model

Push the change

Call the process

1. The provider starts, to the Key: dubbo/XXXServer/will, add the current provider’s address. 2. To Channel: dubbo/com. Idig8. BarService/will send register event. 3. The service consumer is started from the Channel: dubbo/com. Idig8. UserService/will subscribe to the register and unregister events. 4. And the Key: dubbo/com. Idig8. UserService/will, add the current address of consumers. 5. Service consumer, after receipt of the register and unregister events from Key: dubbo/com. Idig8. UserService/available providers will address list.

  • Zookeper

Is a tree directory service that supports change push, suitable as a registry for Dubbo services, high industrial strength, can be used in production environments, and recommended.

The process that

1. The service provider: when starting to dubbo/com. Foo BarService/will write your own URL directory. 2. Service consumers started: subscription/dubbo/com. Foo BarService/will provider URL address in the directory. To dubbo/com. Foo. BarService/consumers directory to write your own URL address 3. Monitoring center startup: subscription/dubbo/com. Foo BarService URL directory of all providers and consumers.

  • Multicast

There is no need to start any central node, as long as the broadcast address is the same, can discover each other. Multicast is limited by the network structure and is only suitable for small-scale applications or development.

Multicast address range: 224.0.0.0 to 239.255.255.255

  • Simple

This SimpleRegistryService is a simple implementation that does not support clustering and can be used as a reference for custom registries, but is not suitable for direct use in production environments.

(5) Pay attention to point configuration

1.group

Always use single words, not com.idig8 or something like that. Dubo-admin cannot be viewed

2.check=false

For dependencies, be sure to set false to prevent startup errors. This means checking to see if the dependency exists.

PS: This time mainly talks about the function of Dubbo-admin. After all, it is self-learning to install it by docker. If you want to install it in production, you can install it directly through the official website. There are 4 kinds of registries in dubbo. The most commonly used ones are Redis and ZooKeeper. It is recommended to use these two instead of the other ones because the number of users is relatively small and problems are not easy to solve. Next time, talk about the underlying principles of Dubbo.