What is the Dubbo+Zookeeper security authentication method?
This article mainly introduces "what is the Dubbo+Zookeeper security authentication method". In the daily operation, I believe that many people have doubts about what the Dubbo+Zookeeper security authentication method is. The editor consulted all kinds of materials and sorted out a simple and easy-to-use method of operation. I hope it will be helpful to answer the doubts of "what is the Dubbo+Zookeeper security authentication method?" Next, please follow the editor to study!
problem
Zookeeper+dubbo, how to set up security authentication? You don't want other services to connect to Zookeeper because the Zookeeper server is on a public network.
Check the official documentation:
Zookeeper is a sub-project of Apacahe Hadoop, is a tree directory service, supports change push, is suitable to be used as a registry for Dubbo services, has high industrial intensity, can be used in production environment, and is recommended.
Process description:
When the service provider starts: write its own URL address to the / dubbo/com.foo.BarService/providers directory
When the service consumer starts: subscribe to the provider URL address under the / dubbo/com.foo.BarService/providers directory. And write your URL address to the / dubbo/com.foo.BarService/consumers directory
When the monitoring center starts: subscribe to all provider and consumer URL addresses under the / dubbo/com.foo.BarService directory
The following features are supported:
When the provider has an abnormal outage, such as a power outage, the registry can automatically delete the provider information.
When the registry restarts, it automatically recovers registration data and subscription requests
When the session expires, the registration data and subscription requests can be automatically restored.
When setting
< dubbo:registry check="false">Can be passed through
< dubbo:registry username="admin" password="1234" />Set zookeeper login information
Can be passed through
< dubbo:registry group="dubbo" />Set the root node of zookeeper. If you don't set it, you will use a rootless tree.
Support number wildcard
< dubbo:reference group="" version="*" />