Dubbo in multi-engine room multi-registration center scheme

Source: Internet
Author: User

Technology Exchange Group: 534368042

Cause: After the service of the project, opened a new private cloud room A, in the original physical Room B system does not migrate, need a system call B of the various Dubbo services, and A to B can not directly access the need to do network mapping through the switch, the existing B internal network segment is 192.168.1.X A network segment 59.10.59.X after mapping a Access B network segment is 10.59.10.X, resulting in a consumer can not directly register to B's Zookeeper cluster registry, Access B services.

Program: Through the Dubbo of the dual Registration center mode, a room access B room service by modifying a room machine of the hosts
For example, B room Service intranet address 192.168.1.120 machine name App1 This in a computer room machine consumer hosts configuration App1 192.168.1.120 Service registration is dubbo://app1:20880/xxx/xxx,b room consumers remain unchanged, The network architecture is as follows:

1.dubbo in a room Zookeeper registration center through APP1 mode, in the B room 192.168.1.X configuration as follows:

123456    
   <!--Multi-registry configuration-   <dubbo:registry id= "Hangzhouregistry" address= "192.168.1.110:20880"/>    <dubbo:registry id= "Qingdaoregistry" address= "app1:20880" default= "false"/>   <!-- Register with multiple registries-   <dubbo:service interface= "Com.alibaba.hello.api.HelloService" version= "1.0.0" ref= " HelloService "registry=" Hangzhouregistry,qingdaoregistry "/>   

2. Modify the Abstractserver class constructor of the Dubbo package

Dubbo in multi-engine room multi-registration center scheme

Related Article

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.