Movatterモバイル変換


[0]ホーム

URL:


CN114640629B - System multi-registration center matching method based on zookeeper - Google Patents

System multi-registration center matching method based on zookeeper
Download PDF

Info

Publication number
CN114640629B
CN114640629BCN202210326534.8ACN202210326534ACN114640629BCN 114640629 BCN114640629 BCN 114640629BCN 202210326534 ACN202210326534 ACN 202210326534ACN 114640629 BCN114640629 BCN 114640629B
Authority
CN
China
Prior art keywords
registry
registries
address
zookeeper
group
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210326534.8A
Other languages
Chinese (zh)
Other versions
CN114640629A (en
Inventor
蒋亮亮
蒙雄发
黄蓉
刘倍材
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Qianhai Huanrong Lianyi Information Technology Service Co Ltd
Original Assignee
Shenzhen Qianhai Huanrong Lianyi Information Technology Service Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Qianhai Huanrong Lianyi Information Technology Service Co LtdfiledCriticalShenzhen Qianhai Huanrong Lianyi Information Technology Service Co Ltd
Priority to CN202210326534.8ApriorityCriticalpatent/CN114640629B/en
Publication of CN114640629ApublicationCriticalpatent/CN114640629A/en
Application grantedgrantedCritical
Publication of CN114640629BpublicationCriticalpatent/CN114640629B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The invention relates to the technical field of computer information, in particular to a zookeeper-based system multi-registry matching method, when matching registries, group parameters and address parameters of registries of all web subsystems are traversed, and then the group parameters and the address parameters of the registries where a selected service method is located are matched one by one, and only if the group parameters and the address parameters are the same, the address of the service is returned. Compared with the prior art, the zookeeper-based system multi-registry matching method has the advantages that resources are accurately positioned, and resources are wasted if all registries are traversed once; the pressure born by a single machine is reduced, the single registry is changed into a plurality of registries, and the load and the workload on the single machine are shared; the problem of single machine fault is solved, and the risk resistance of the system is improved; a machine in the multi-registration center is down for a short time, so that the complete unavailability of the system is not caused.

Description

System multi-registry matching method based on zookeeper
[ Field of technology ]
The invention relates to the technical field of computer information, in particular to a zookeeper-based system multi-registration center matching method.
[ Background Art ]
The middle-station group business arrangement system is designed based on the idea of micro-service, after a large system is split into different micro-services, call addresses among the services cannot exist in one service independently, the addresses of the services must be decoupled to become a registry, which can be said to be an address book in a micro-service architecture, and the registry records the mapping relation between the services and the service addresses. In a distributed architecture, a service will register with a registry, where the service will find its address to invoke when it needs to invoke other services.
Then in a orchestration system, where a request is accessed by a web subsystem and then invokes the next N service subsystems, it is a problem to which registry the web subsystem goes to find the address of the corresponding service subsystem if both are registered on different registries. Resources are wasted if all registries traverse one pass, and the meaning of multiple registries is lost if one of them is missed. How the web subsystem matches the address of the corresponding service subsystem becomes an urgent issue to be addressed.
The original mode of the prior art platform business arrangement system is that only one registry is provided, one web subsystem is required to find the later-called service subsystem, all service addresses are concentrated in one registry, and service call is influenced when the registry is down or abnormal.
[ Invention ]
In order to overcome the problems, the invention provides a zookeeper-based system multi-registry matching method capable of effectively solving the problems.
The technical scheme provided by the invention for solving the technical problems is as follows: the utility model provides a system multi-registry matching method based on zookeeper, which comprises the following steps:
step S1, the registry information of all web subsystems and all service subsystems is well defined in different service systems according to data formats;
Step S2, when all service systems are started, the registry information in the step S1 is scanned, and the registry information is stored into a database MySQL of a middle service orchestration system through the characteristic of zk event monitoring;
Step S3, when a service method is selected by the editing interface, searching an address of a registry which can be matched with the current web subsystem;
And S4, traversing the group parameters and the address parameters of the registry of all the web subsystems when the registry is matched, and matching the group parameters and the address parameters of the registry of the selected service method one by one, wherein the address of the service is returned only if the group parameters and the address parameters of the registry are the same.
Preferably, in the step S4, two conditions, that is, address parameter and group parameter, are required for determining a call address.
Preferably, a plurality of zookeeper are involved.
Compared with the prior art, the zookeeper-based system multi-registry matching method has the advantages that resources are accurately positioned, and resources are wasted if all registries are traversed once; the pressure born by a single machine is reduced, the single registry is changed into a plurality of registries, and the load and the workload on the single machine are shared; the problem of single machine fault is solved, and the risk resistance of the system is improved; a machine in the multi-registration center is down for a short time, so that the complete unavailability of the system is not caused.
[ Description of the drawings ]
FIG. 1 is a flow chart of steps of a zookeeper-based system multi-registry matching method of the present invention.
[ Detailed description ] of the invention
The present invention will be described in further detail with reference to the accompanying drawings and examples of implementation in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
It should be noted that in embodiments of the present invention, all directional indications (such as up, down, left, right, front, back … …) are limited to relative positions on a given view, not absolute positions.
Furthermore, descriptions such as those referred to as "first," "second," and the like, are provided for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implying an order of magnitude of the indicated technical features in the present disclosure. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present invention, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
Referring to fig. 1, the zookeeper-based system multi-registry matching method of the present invention includes the following steps:
In step S1, the registry information of all web subsystems and all service subsystems is well defined in different service systems according to data formats.
The data format is as follows:
dubbo.registries.r1.id=c1
dubbo.registries.r1.address=zookeeper://172.16.87.35:2181
dubbo.registries.r1.group=group_r1
dubbo.registries.zk1.id=registry_1
dubbo.registries.zk1.address=zookeeper://172.16.87.35:2181
dubbo.registries.zk1.group=group_r1。
And step S2, when all the service systems are started, the registry information in the step S1 is scanned, and the registry information is stored into a database MySQL of the middle service orchestration system through the characteristic of zk event monitoring.
And step S3, when the editing interface selects a service method, searching out the address of the registry which can be matched with the current web subsystem.
In step S4, two conditions are respectively address parameter and group parameter, because two conditions are needed for determining a call address. Therefore, when the registry is matched, the group parameters and the address parameters of the registry of all the web subsystems are traversed, and then the group parameters and the address parameters of the registry where the selected service method is located are matched one by one, and the address of the service is returned only if the group parameters and the address parameters are the same.
Specifically, for example, web is registered on zk1, zk2, and zk3, service1 is registered on zk2, zk3, zk4, and then the common registry of web and service1 is zk2 and zk3; service2 registers with zk2 and zkN, then the common registry for web and service2 is zk2. Zk is zookeeper, and the method involves a plurality of zookeeper, namely zookeeper1, zookeeper2 and zookeeper3 … zookeeperN respectively.
Compared with the prior art, the zookeeper-based system multi-registry matching method has the advantages that resources are accurately positioned, and resources are wasted if all registries are traversed once; the pressure born by a single machine is reduced, the single registry is changed into a plurality of registries, and the load and the workload on the single machine are shared; the problem of single machine fault is solved, and the risk resistance of the system is improved; a machine in the multi-registration center is down for a short time, so that the complete unavailability of the system is not caused.
The foregoing description of the preferred embodiments of the invention is not intended to limit the scope of the invention, but is intended to cover any modifications, equivalents, and improvements within the spirit of the invention.

Claims (1)

CN202210326534.8A2022-03-302022-03-30 System multi-registration center matching method based on zookeeperActiveCN114640629B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202210326534.8ACN114640629B (en)2022-03-302022-03-30 System multi-registration center matching method based on zookeeper

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202210326534.8ACN114640629B (en)2022-03-302022-03-30 System multi-registration center matching method based on zookeeper

Publications (2)

Publication NumberPublication Date
CN114640629A CN114640629A (en)2022-06-17
CN114640629Btrue CN114640629B (en)2024-11-22

Family

ID=81951711

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202210326534.8AActiveCN114640629B (en)2022-03-302022-03-30 System multi-registration center matching method based on zookeeper

Country Status (1)

CountryLink
CN (1)CN114640629B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110377431A (en)*2019-07-292019-10-25中国工商银行股份有限公司Service calling method and device under more registration center's scenes

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103401897A (en)*2013-07-152013-11-20云南电网公司普洱供电局Method for constructing distributed service registration center
CN104834722B (en)*2015-05-122018-03-02网宿科技股份有限公司Content Management System based on CDN
CN110365750A (en)*2019-06-252019-10-22苏宁云计算有限公司Service registration system and method
CN112422309B (en)*2019-08-232023-03-28阿里巴巴集团控股有限公司System and method for distributed service discovery, storage medium and terminal
CN110990047B (en)*2019-11-062021-11-19北京云思畅想科技有限公司Fusion method and device for multiple microservice architectures
CN113568750B (en)*2021-07-292024-08-02中国工商银行股份有限公司Load balancing method and device for intelligent park

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110377431A (en)*2019-07-292019-10-25中国工商银行股份有限公司Service calling method and device under more registration center's scenes

Also Published As

Publication numberPublication date
CN114640629A (en)2022-06-17

Similar Documents

PublicationPublication DateTitle
US20190042659A1 (en)Data writing and reading and apparatus and cloud storage system
US8495160B2 (en)System for controlling retention of data messages
EP0738972A1 (en)Fault information notification system
CN109542964B (en)Data calling method and data calling system
CN109710439B (en)Fault processing method and device
CN114244654B (en)URL forwarding method, device, equipment and computer storage medium
CN114718724A (en)Engine fault management method and system, vehicle control unit and storage medium
CN114640629B (en) System multi-registration center matching method based on zookeeper
CN114936095B (en) Partition expansion and contraction method and system
CN116108092A (en) Master data processing method based on SpringBatch framework
CN107066522A (en)Database access method and device
CN112698970B (en)Service calling method and device for micro-service architecture and computer storage medium
CN117742998B (en)High-performance queuing method and system for charging acquisition data forwarding
CN112069021A (en)Flow data storage method and device, electronic equipment and storage medium
CN112860494A (en)Data center switching method and related equipment thereof
JPH0392942A (en) How files are stored and accessed
CN111796930A (en)Method and storage medium for optimizing message processing
CN111580998A (en)RPC calling method of multiple tenants in SaaS service mode
CN114138714B (en)Data migration method and device, storage medium and electronic equipment
CN114814586A (en)Battery fault diagnosis method, device, equipment and medium
CN115328861A (en)Data processing method and device
CN115480934A (en)Distributed data processing method, device, equipment and storage medium
CN113010398A (en)Service log model, service execution method, device, electronic equipment and medium
CN112055052A (en)Service detection and information distribution method, system and medium for internet of things system
CN115550440B (en) Service processing method, system, computer device and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp