The relationship between zookeeper and Dubbo

Source: Internet
Author: User
Tags zookeeper
Dubbo recommends the use of zookeeper as a registry for services.
the role of zookeeperZookeeper is used to register services and load balancing, which service is provided by which machine must let the caller know, simply speaking, the correspondence between the IP address and the service name. Of course, this correspondence can also be hard-coded in the caller's business code, but if the machine that provides the service hangs out of the caller's knowledge, if the code does not change, it will continue to request the dead machine for service. Zookeeper through the heartbeat mechanism can detect the hanging machine and the suspension of the machine's IP and service relationship from the list to remove. As for the support of high concurrency, the simple way is to expand horizontally, without changing the code in the case by adding machines to improve computing power. By adding new machines to the Zookeeper registration service, there are many more customers who can service the service. Dubbois a tool for managing the middle tier, where there are a number of service access and service providers between the business layer and the Data Warehouse, and Dubbo provides a framework to solve the problem. Note that the Dubbo here is just a frame, as to what you put on the shelf is entirely up to you, like a car skeleton, you need to match your wheel engine. In this framework to complete the scheduling must have a distributed registry center, store all the service metadata, you can use ZK, but also can use other, but we all use ZK.
the relationship between zookeeper and DubboDubbo the registry to the abstract, is that it can be external to different storage media to provide services to the registry, there are Zookeeper,memcached,redis and so on.

Zookeeper is introduced as a storage medium, and the characteristics of zookeeper are introduced. The first is load balancing, single registration center of the carrying capacity is limited, in the flow to a certain extent, the need for diversion, load balancing is to shunt and exist, a zookeeper group with the corresponding Web application can easily achieve load balance; resource synchronization, load balancing alone is not enough, The data and resources between the nodes need to be synchronized, the zookeeper cluster is naturally equipped with such a function; The naming service, which uses the tree structure to maintain a global list of service addresses, at the time the service provider starts, to the specified node on the ZK/dubbo/${servicename}/ Providers directory to write their own URL address, this operation completes the service release. Other features include mast elections, distributed locks, etc. Personal Understanding

In the first contact with zookeeper, the whole person is in a circle, completely do not know the need to use it, and gradually found that the reason why they use it is because he does not have to rely on other projects in their own projects (reduce the size of the project), only to expose the services in the project, But the project that needs to use the service can be used directly (that is, configure in the configuration file), simple and convenient, the project is truly independent. Of course, the implementation of these functions can not be avoided to build services.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.