Zookeeper Registration Center installation
It is recommended that you use the Zookeeper Registry Client for dubbo-2.3.3 or later. Zookeeper is a sub-project of Apache Hadoop, which is relatively strong and recommends that the production environment use the registry. Dubbo does not make any intrusive modifications to the zookeeper server, just install the native zookeeper server, and all the registry logic adaptations are done when the zookeeper client is called. If necessary, consider using Taobao's zookeeper monitoring: http://rdc.taobao.com/team/jm/archives/1450
Installation:
wget http://www.apache.org/dist//zookeeper/zookeeper-3.3.3/zookeeper-3.3.3.tar.gz tar zxvf zookeeper-3.3.3.tar.gz CD zookeeper-3.3.3 CP conf/zoo_sample.cfg conf/zoo.cfg configuration:
If you do not need a cluster, the contents of Zoo.cfg are as follows: (where the data directory needs to be changed to your real output directory)
ticktime=2000 initlimit=10 synclimit=5 Datadir=/home/dubbo/zookeeper-3.3.3/data clientPort=2181 |
If a cluster is required, the contents of the zoo.cfg are as follows: (where the Data directory and server address need to be changed to the information of your actual deployment machine)
ticktime=2000 initlimit=10 synclimit=5 datadir=/home/dubbo/zookeeper-3.3.3/data clientPort=2181 server.1= 10.20.153.10:2555:3555 server.2=10.20.153.11:2555:3555 |
and place the myID file in the Data directory: (DataDir in the zoo.cfg above)
myID indicates its own ID, corresponding to the server in zoo.cfg above. After the number, the first content is 1, the second set of content is 2, the contents are as follows: 1
Start:
Stop:./bin/zkserver.sh Stop
command line:(see:http://zookeeper.apache.org/doc/r3.3.3/zookeeperadmin.html) Telnet 127.0.0.1 2181
Dump or echo Dump | NC 127.0.0.1 2181
Usage:
dubbo.registry.address=zookeeper://10.20.153.10:2181?backup=10.20.153.11:2181 |
Or
< Dubbo:registry protocol = "Zookeeper" address = "10.20.153.10:2181,10.20.153.11:2181"/> |
Administrative Console Installation
Management console for the internal cropping version, the open source section mainly includes: Routing rules, dynamic configuration, service degradation, access control, weight adjustment, load balancing, and other management functions.
Installation:
wget http://apache.etoak.com/tomcat/tomcat-6/v6.0.35/bin/apache-tomcat-6.0.35.tar.gz Tar zxvf apache-tomcat-6.0.35.tar.gz CD apache-tomcat-6.0.35 RM-RF webapps/root |
wget Http://code.alibabatech.com/mvn/releases/com/alibaba/dubbo-admin/2.4.1/dubbo-admin-2.4.1.war Unzip dubbo-admin-2.4.1.war-d webapps/root configuration: (or put dubbo.properties in the current user directory)
VI webapps/root/web-inf/dubbo.properties |
dubbo.registry.address=zookeeper://127.0.0.1:2181 Dubbo.admin.root.password=root dubbo.admin.guest.password= Guest |
Start:
Stop:./bin/shutdown.sh
Visit:(User: Root, Password: root or User: Guest, password: guest)
Registration Center Abstraction Dubbo the registry to the abstraction, it is possible to add different storage media to the registry to provide services, there are zookeeper,memcached,redis and so on. Dubbo abstraction, the user can expand, we analyze zookeeper this implementation to understand the lower level of the registry. After the abstraction, the user only need to implement the corresponding registry and registryfactory can be, zookeeper is the realization of zookeeperregistry, and Zookeeperregistryfactory. The implementation of Zookeeperregistryfactory is very simple, is to return a zookeeperregistry instance, so the main thing is implemented in Zookeeperregistry, In Zookeeperregistry the user needs to implement the registration URL, unregister the Url,url subscription, URL logout subscription and URL query, in this case design to zookeeper service side of the call, are encapsulated in Zookeeperclient, The Zookeeperclient service makes server connections, broken chains, and resource crud.
The value of zookeeper With the introduction of zookeeper as a storage medium, the characteristics of zookeeper are introduced. First, load balancing, the single registration center's load-carrying capacity is limited, in the flow to a certain extent, the need to shunt, load balancing is to shunt and exist, a zookeeper group with the corresponding Web application can easily achieve load balancing; Resource synchronization, load balancing alone is not enough, The data and resources between the nodes need to be synchronized, the zookeeper cluster naturally has such function, naming service, the tree structure is used to maintain the global service address list, when the service provider starts, it/dubbo/${servicename}/to the specified node on ZK. Providers directory to write its own URL address, this operation has completed the release of the service. Other features include mast elections, distributed locks, and more. Companion reference: Best Practices http://rdc.taobao.com/team/jm/archives/1232 Features Overview http://www.ibm.com/developerworks/cn/opensource/ Os-cn-zookeeper/hadoop's authoritative Guide (second edition) Agile testing team, no longer just after coding. But with the research and development staff throughout the requirements analysis, specifications, automated unit testing, automated acceptance testing, static code analysis, technical debt and other links. So agile projects are bound to become mainstream in future efficiency trends.
Article reprint: http://www.cnblogs.com/Javame/p/3632708.html