CN116405497A - Multi-machine-room priority policy access method, system, terminal equipment and storage medium - Google Patents

Multi-machine-room priority policy access method, system, terminal equipment and storage medium Download PDF

Info

Publication number
CN116405497A
CN116405497A CN202310335604.0A CN202310335604A CN116405497A CN 116405497 A CN116405497 A CN 116405497A CN 202310335604 A CN202310335604 A CN 202310335604A CN 116405497 A CN116405497 A CN 116405497A
Authority
CN
China
Prior art keywords
machine room
registry
service
room
machine
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.)
Pending
Application number
CN202310335604.0A
Other languages
Chinese (zh)
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.)
CITIC Aibank Corp Ltd
Original Assignee
CITIC Aibank Corp 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 CITIC Aibank Corp Ltd filed Critical CITIC Aibank Corp Ltd
Priority to CN202310335604.0A priority Critical patent/CN116405497A/en
Publication of CN116405497A publication Critical patent/CN116405497A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • H04L41/0836Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability to enhance reliability, e.g. reduce downtime
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/30Decision processes by autonomous network management units using voting and bidding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention provides a method, a system, a terminal device and a storage medium for accessing a multi-machine-room priority strategy, which relate to the field of computer systems, and the method comprises the steps that a first machine room is networked to form a Leader-impeller mode, and a ZooKeeper automatically elects after networking is completed; the second machine room and the third machine room are networked into an overlay mode, so that a registry between the first machine room, the second machine room and the third machine room can keep data consistent.

Description

Multi-machine-room priority policy access method, system, terminal equipment and storage medium
Technical Field
The present invention relates to the field of computer systems, and in particular, to a method, a system, a terminal device, and a storage medium for accessing a multi-machine-room priority policy.
Background
The field of finance and technology is increasingly focusing on the reliability of data and the availability of services, and the same-city double-activity and different-place disaster recovery schemes are commonly adopted in the industry. The proposal of the schemes of two places, three centers, three places, five centers and the like puts higher demands on service registration and service access.
From the aspect of service registration, with the development of modern computer technology, distributed systems provide a service concept, and various registries are currently in full play. There are many kinds of main stream registries, such as eureka, zookeeper.
The method comprises the steps that a plurality of DCs are used for realizing service registration and calling, firstly, a registry adaptation layer is made, when the service is registered, the registry adaptation layer accepts registration requests and is responsible for maintaining the consistency of each registry, and each registry maintains the service discovery call of the DCs; secondly, developing a cross-machine room calling gateway, forwarding the call of the cross-machine room by the gateway, synchronously synchronizing data to a cross-machine room gateway cluster while registering respective DC services to the respective DC gateway, and normally, forwarding the respective DC internal circulation call without the cross-machine room, and forwarding the service through the cross-machine room gateway under disaster conditions, wherein the method needs to add two times of forwarding in the calling process, has the defects of protocol conversion delay increase and the like, and can easily cause the problem of unrepeace due to the normal calling and the cross-machine room calling of two sets of logics; thirdly, when each service is registered, the service is registered to multiple DCs at the same time, the service state change is required to be maintained to the multiple DCs at the same time, the method is easy to cause the problem of inconsistent DC data, and a large amount of cross-machine room flow is generated.
The Zookeeper does not adopt the traditional Master/Slave architecture, but selects another method to design and realize a set of scheme. The method divides each node in the cluster into three roles of Leader, follower and Observer, and realizes the management of the cluster by the cooperation of the three roles. Each node in the cluster can only play a role, and the cluster management is realized through the combined action of the three nodes. A large number of places in the system use the Zookeeper, the functions of cluster management, configuration file management, load balancing, master election and the like are realized through APIs provided by the Zookeeper externally, and meanwhile, big data components such as Hadoop, HBase and Solr and the like introduced in the system are integrated inside the large data components, or the management of the clusters is realized through the Zookeeper.
With respect to Leader, it is generated by election and is the core of the entire Zookeeper cluster. The method is mainly responsible for scheduling all servers in the cluster, scheduling and processing the transaction requests and guaranteeing the FIFO of the transaction processing.
Regarding Follower, it is responsible for participating in the election of the Leader, and also participating in the voting of the client transaction request Propos, processes the client non-transaction request, and forwards the transaction to the Leader server.
Concerning the underserver, which acts like a Follower but does not participate in any voting, the role of the underserver is merely to improve the non-transactional capability.
The custom adaptation layer, gateway layer and synchronizer layer (full backup and incremental backup) add new complex structures, the newly added layers become key components, and the Zookeeper version is updated with the risk of continuous maintenance.
Meanwhile, a default strategy, namely a cluster-based random ring strategy, is adopted for accessing the Zookeeper by using the Zookeeper client, and the problem of cross-DC access and the problem of Zookeeper load capacity are not considered, so that the increase of the cross-DC flow, the increase of the time delay of a Zookeeper mode and the shake of the Zookeeper load can be caused, and the service shake, the overtime and even the unavailability are caused.
Disclosure of Invention
The embodiment of the invention provides a method, a system, a terminal device and a storage medium for accessing a multi-machine-room priority policy, which can realize the load balance of a Zookeeper, improve the speed and the stability of service registration discovery and achieve the access of a multi-DC registration center in a multi-place disaster recovery scheme.
Specifically, the method for accessing the multi-machine-room priority strategy comprises the steps of accessing the multi-DC cluster and accessing the registration center by the priority strategy;
the multi-DC cluster access is realized by networking a first machine room to form a Leader-impeller mode, and automatically selecting by a ZooKeeper after networking is completed; the second machine room and the third machine room are networked into an unserver mode, so that a registry among the first machine room, the second machine room and the third machine room can keep data consistent.
When the first machine room registers the service, the service is directly registered in the first machine room, and the first machine room synchronizes the service registration information to the second machine room and the third machine room; when the second machine room and the third machine room are subjected to service registration, the service is connected with a local machine room (namely, the second machine room is connected with an Observer of the second machine room, the third machine room is connected with an Observer of the third machine room), the local machine room Observer is forwarded to the first machine room Leader for registration, the first machine room is synchronized with the second machine room Observer and the third machine room Observer after the registration is successful, and the service registration information of the first machine room, the second machine room and the third machine room is consistent.
The priority policy accesses the registry, and when the service registers or discovers, the service invokes the registry client of the local machine room.
And the client of the local machine room inquires whether the client has links held with the registry, if so, the client directly multiplexes the existing links to access the registry, and if not or when the client accesses, the client has a broken link condition to perform the third step.
And re-linking with the registry, wherein the registry client monitors all registry conditions in a 4-word command mode, the registry client preferentially tries to establish local registry service, and returns if the establishment is successful, otherwise, preferentially tries to select a registry of a local machine room in a registry cluster of the local machine room in a random ring mode to establish links, and returns if the establishment is successful, otherwise, sequentially going to the registries of a second machine room and a third machine room to establish links, and after the establishment is successful, judging that the links of the non-local machine room need log alarm and triggering 4-word command active detection, otherwise, alarming, triggering 4-word command active detection, and the detection period is 10s.
The detection thread triggers 4-word command detection in an independent fixed period (5 min), a ZooKeeper four-word command is utilized to communicate with a plurality of service ends where a ZooKeeper cluster is located, information returned by each service end is obtained, the information returned by each service end is used as cluster information of the ZooKeeper cluster, and the dimension of the cluster information comprises one or more of the running state of the ZooKeeper cluster, the connection condition of each service end of the ZooKeeper cluster, the IP address of the service end, the service name and the session ID. Firstly, a detection thread sends wchc commands to each server where a ZooKeeper cluster is located, wherein the wchc commands refer to detailed information monitored by the server through a session list, the output of the wchc commands is a list of sessions related to monitoring, so that each node returns the related information of the node according to the received wchc commands, all service names and corresponding session IDs (sessionIDs) returned by each node can be obtained, and then the target service names and the corresponding target sessionIDs which are required to be queried by a user are searched from all service names and the corresponding session IDs. The detecting thread needs to send a con command to each node in the ZooKeeper cluster, where the con command refers to detailed information of complete connection/session of all clients connected to the server, including information of "number of packets received/sent", sessionID, operation delay, last operation execution, etc., so each node returns all server IP addresses connected to the client and corresponding SessionID according to the con command. And carrying out priority policy judgment and load judgment according to the number of the ons, and adjusting the link from the existing registry client to the registry.
Further: when the service inquires the service registration information, the first machine room service inquires the first machine room registration center, the second machine room service inquires the second machine room registration center, and the third machine room service inquires the third machine room registration center.
Further: when the first machine room breaks down, the second machine room sequentially takes over the first machine room to become a Leader-Follower through a monitoring mechanism, and the third machine room serves as an Observer of the second machine room. At this time, the service call of the first machine room is downgraded to a registry for calling the second machine room, and the service call of the second machine room and the third machine room is unchanged.
Further: when the first machine room is recovered, the first machine room takes over the second machine room to become a Leader-impeller through the monitoring mechanism, and the second machine room and the third machine room serve as an Observer of the first machine room. At this time, the service call of the first machine room is restored to the registry for calling the first machine room, and the service call of the second machine room and the third machine room is unchanged.
Further: a system for accessing multi-machine-room priority strategy comprises a plurality of DC machine rooms and a registry;
the DC machine room is respectively networked into a Leader-impeller mode and an offserver mode, so that the machine room and a registration center can keep data consistency;
meanwhile, when the first machine room breaks down, the second machine room takes over the first machine room in sequence through a monitoring mechanism to become a Leader-Follower, and the third machine room serves as an Observer of the second machine room, at this time, service call of the first machine room is degraded to a registry for calling the second machine room, and service call of the second machine room and the third machine room is unchanged;
when the first machine room is recovered, the first machine room takes over the second machine room to become a Leader-impeller through a monitoring mechanism, the second machine room and the third machine room are used as an observers of the first machine room, at this time, the service call of the first machine room is recovered to a registry for calling the first machine room, and the service call of the second machine room and the service call of the third machine room are unchanged;
the registry client monitors all the registry conditions in a 4-word command mode, the registry client preferentially tries to establish local registry service, if the establishment is successful, the registry client returns, otherwise, preferentially tries to select a registry of a local machine room in a registry cluster of the local machine room in a random ring mode to establish a link, after the establishment is successful, the non-local machine room link is judged to need log alarm and trigger 4-word command active detection, otherwise, the alarm is given, the 4-word command active detection is triggered, and the detection period is 10s
Further: the terminal device may include: the system comprises a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, when the terminal device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to execute the steps of the deep learning model training method as described in the previous embodiment.
Further: a storage medium storing a computer program which, when executed by a processor, performs the steps of the method described above.
The invention has the beneficial effects that: the invention solves the problems that the availability of the multi-DC registration center and the consistency of data are improved by adopting a native Observer deployment mode, and the problem that a election process Zookeeper cluster is unavailable due to network jitter factors is avoided, and in an actual scene, the requirement of a reelect strategy on the network stability of the Zookeeper server cluster is higher. But for services deployed on the cloud, network fluctuations and occasional instability are common, and the duration of such network problems may be only 0.5 to 1 second, but if a leader node is caused to fail for a short period of time to trigger a reselection, the ZooKeeper server cluster will be rendered unusable for a longer period of time (perhaps 30 to 120 seconds), thus amplifying the unusable time caused by network fluctuations, which is unacceptable for software systems relying on zookeepers for collaboration. By adopting the combination of the local priority strategy and the local machine room priority strategy, the flow rate across the machine room is reduced, the load balance of the Zookeeper is realized, the speed and the stability of service registration discovery are improved, and the access of multiple DC registration centers in a multi-place disaster recovery scheme is achieved. The invention provides a method and a device for accessing a multi-machine-room priority strategy, based on the method, the load balance of a Zookeeper can be realized, the speed and the stability of service registration discovery are improved, and the multi-DC registration center access in a multi-place disaster recovery scheme is achieved. Compared with the prior art, the invention has the following advantages and reasons:
1. all the service registration information exists in each DC, so that the normal access efficiency can be ensured, and degradation can be achieved under the disaster scene to ensure the service duration.
2. Registry services in different DCs adopt a Zookeeper original browser component solution, and upgrade maintenance can be smoothly carried out according to stable versions issued by designs.
3. Through a plug-in enhancement mechanism of the server client, two priority strategies of local priority and local machine room priority are customized, the flow of the machine room is reduced, the load balancing of the Zookeeper is realized, the speed and the stability of service registration discovery are improved, and the access of multiple DC registries in a multiple-place disaster recovery scheme is achieved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Figure 1 shows a schematic flow chart of the method of the invention.
Fig. 2 shows a schematic diagram of the composition of the system of the present invention.
Fig. 3 shows a schematic flow diagram of a multi-DC-server mode access.
Fig. 4 shows a schematic flow diagram of a priority policy access registry.
Fig. 5 shows a prior policy access registry flow diagram.
Fig. 6 shows a schematic diagram of the composition of the terminal device of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present invention, and it should be understood that the drawings in the present invention are for the purpose of illustration and description only and are not intended to limit the scope of the present invention. In addition, it should be understood that the schematic drawings are not drawn to scale. A flowchart, as used in this disclosure, illustrates operations implemented according to some embodiments of the present invention. It should be understood that the operations of the flow diagrams may be implemented out of order and that steps without logical context may be performed in reverse order or concurrently. Moreover, one or more other operations may be added to or removed from the flow diagrams by those skilled in the art under the direction of the present disclosure.
In addition, the described embodiments of the invention are only some, but not all, embodiments of the invention. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present invention.
It should be noted that the term "comprising" will be used in embodiments of the invention to indicate the presence of the features stated hereafter, but not to exclude the addition of other features. It should also be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. In the description of the present invention, it should also be noted that the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and should not be construed as indicating or implying relative importance.
Fig. 1 shows a flow chart of steps of the method of the present invention, fig. 3 shows a flow chart of access in a multi-DC-server mode, fig. 4 shows a flow chart of a priority policy access registry, and fig. 5 shows a flow chart of a priority policy access registry.
The specific technical implementation of the invention is mainly divided into the following two parts:
multiple DCs are accessed in a cluster mode by adopting an Observer mode, and consistency of registration information is ensured
The first machine room is networked to form a Leader-impeller mode, and the first machine room is automatically elected by a ZooKeeper after networking is completed; the second machine room and the third machine room are networked into an unserver mode, so that a registry among the first machine room, the second machine room and the third machine room can keep data consistent.
When the first machine room registers service, the service is directly registered in the first machine room, and the first machine room synchronizes the service registration information to the second machine room and the third machine room; when the second machine room and the third machine room are subjected to service registration, the service is connected with a local machine room (namely, the second machine room is connected with an Observer of the second machine room, the third machine room is connected with an Observer of the third machine room), the local machine room Observer is forwarded to the first machine room Leader for registration, the first machine room is synchronized with the second machine room Observer and the third machine room Observer after the registration is successful, and the service registration information of the first machine room, the second machine room and the third machine room is consistent.
When the service inquires the service registration information, the first machine room service inquires the first machine room registration center, the second machine room service inquires the second machine room registration center, and the third machine room service inquires the third machine room registration center.
When the first machine room breaks down, the second machine room sequentially takes over the first machine room to become a Leader-Follower through a monitoring mechanism, and the third machine room serves as an Observer of the second machine room. At this time, the service call of the first machine room is downgraded to a registry for calling the second machine room, and the service call of the second machine room and the third machine room is unchanged.
When the first machine room is recovered, the first machine room takes over the second machine room to become a Leader-impeller through the monitoring mechanism, and the second machine room and the third machine room serve as an Observer of the first machine room. At this time, the service call of the first machine room is restored to the registry for calling the first machine room, and the service call of the second machine room and the third machine room is unchanged.
Priority policy access registry
The access process is described by taking the first machine room as an example, and the second machine room and the third machine room are similar.
Taking the first machine room as a view angle, the access condition is as follows:
when the service registers or discovers, the service calls a registry client of the local machine room.
And the client of the local machine room inquires whether the client has links held with the registry, if so, the client directly multiplexes the existing links to access the registry, and if not or when the client accesses, the client has a broken link condition to perform the third step.
And re-linking with the registry, wherein the registry client monitors all registry conditions in a 4-word command mode, the registry client preferentially tries to establish local registry service, and returns if the establishment is successful, otherwise, preferentially tries to select a registry of a local machine room in a registry cluster of the local machine room in a random ring mode to establish links, and returns if the establishment is successful, otherwise, sequentially going to the registries of a second machine room and a third machine room to establish links, and after the establishment is successful, judging that the links of the non-local machine room need log alarm and triggering 4-word command active detection, otherwise, alarming, triggering 4-word command active detection, and the detection period is 10s.
The detection thread triggers 4-word command detection in an independent fixed period (5 min), a ZooKeeper four-word command is utilized to communicate with a plurality of service ends where a ZooKeeper cluster is located, information returned by each service end is obtained, the information returned by each service end is used as cluster information of the ZooKeeper cluster, and the dimension of the cluster information comprises one or more of the running state of the ZooKeeper cluster, the connection condition of each service end of the ZooKeeper cluster, the IP address of the service end, the service name and the session ID. Firstly, a detection thread sends wchc commands to each server where a ZooKeeper cluster is located, wherein the wchc commands refer to detailed information monitored by the server through a session list, the output of the wchc commands is a list of sessions related to monitoring, so that each node returns the related information of the node according to the received wchc commands, all service names and corresponding session IDs (sessionIDs) returned by each node can be obtained, and then the target service names and the corresponding target sessionIDs which are required to be queried by a user are searched from all service names and the corresponding session IDs. The detecting thread needs to send a con command to each node in the ZooKeeper cluster, where the con command refers to detailed information of complete connection/session of all clients connected to the server, including information of "number of packets received/sent", sessionID, operation delay, last operation execution, etc., so each node returns all server IP addresses connected to the client and corresponding SessionID according to the con command. And carrying out priority policy judgment and load judgment according to the number of the ons, and adjusting the link from the existing registry client to the registry.
As shown in fig. 2, the system of the present invention includes several DC rooms and a registry;
the DC machine room is respectively networked into a Leader-impeller mode and an offserver mode, so that the machine room and a registration center can keep data consistency;
meanwhile, when the first machine room breaks down, the second machine room takes over the first machine room in sequence through a monitoring mechanism to become a Leader-Follower, and the third machine room serves as an Observer of the second machine room, at this time, service call of the first machine room is degraded to a registry for calling the second machine room, and service call of the second machine room and the third machine room is unchanged;
when the first machine room is recovered, the first machine room takes over the second machine room to become a Leader-impeller through a monitoring mechanism, the second machine room and the third machine room are used as an observers of the first machine room, at this time, the service call of the first machine room is recovered to a registry for calling the first machine room, and the service call of the second machine room and the service call of the third machine room are unchanged;
the method comprises the steps that a registry client monitors all registry conditions in a 4-word command mode, the registry client preferentially tries to establish local registry service, if the establishment is successful, the registry client returns, if the establishment is successful, preferentially tries to select a registry of a local machine room in a registry cluster of the local machine room in a random ring mode to establish links, after the establishment is successful, it is judged that the links of the non-local machine room need log alarming and the 4-word command is triggered to be actively detected, otherwise, the alarm is given, the 4-word command is triggered to be actively detected, and the detection period is 10s.
As shown in fig. 6, the terminal device 6 may include: processor 601, storage medium 602, and bus 603, storage medium 602 storing machine-readable instructions executable by processor 601, when the terminal device is running, the processor 601 communicates with storage medium 602 via bus 603, and processor 601 executes the machine-readable instructions to perform the steps of the deep learning model training method as described in the previous embodiments. The specific implementation manner and the technical effect are similar, and are not repeated here.
For ease of illustration, only one processor is described in the above terminal device. It should be noted, however, that in some embodiments, the terminal device of the present invention may also include multiple processors, and thus, the steps performed by one processor described in the present invention may also be performed jointly by multiple processors or separately.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily appreciate variations or alternatives within the scope of the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (10)

1. The multi-machine-room priority policy access method is characterized by comprising the steps of multi-DC cluster access and priority policy access registry;
the multi-DC cluster access is realized by networking a first machine room to form a Leader-impeller mode, and automatically selecting by a ZooKeeper after networking is completed; the second machine room and the third machine room are networked into an unserver mode;
the priority policy access registry specifically refers to that when a service registers or discovers, the service calls a registry client of a local machine room;
then the local machine room client inquires whether the link is already in possession of the registry, if yes, the existing link is directly reused for registry access, if no or when the link breakage occurs, the registry client is re-linked with the registry, monitors all registry conditions in a 4-word command mode, the registry client preferentially tries to establish local registry service, returns if successful establishment, preferentially tries to select a registry of the local machine room in a registry cluster of the local machine room in a random ring mode for establishing the link, returns if successful establishment, otherwise sequentially goes to the registry clusters of the second machine room and the third machine room for establishing the link, judges that the link of the non-local machine room needs log alarm and triggers the 4-word command to actively detect after successful establishment, otherwise alarms, triggers the 4-word command to actively detect, and the detection period is 10s;
the detection thread triggers 4-word command detection in an independent fixed period, communicates with a plurality of service ends where a ZooKeeper cluster is located by utilizing the ZooKeeper four-word command to obtain information returned by each service end, and uses the information returned by each service end as cluster information of the ZooKeeper cluster.
2. The method of claim 1, wherein the dimension of the cluster information includes one or more of an operation state of a ZooKeeper cluster, a connection condition of each server of the ZooKeeper cluster, a server IP address, a service name, and a session ID.
3. The method of claim 1 wherein the wchc command is detailed information monitored by the session listing server, the output of which is a list of sessions related to monitoring, and each node returns the related information of the node according to the wchc command received, so that all service names and corresponding session IDs returned by each node can be obtained.
4. The method of claim 1, wherein when service registration occurs in the first machine room, the service is registered directly in the first machine room, and the first machine room synchronizes service registration information to the second and third machine rooms.
5. The method of claim 1 wherein when service registration occurs in the second and third rooms, the second room service links to the unserver of the second room, and the third room service links to the unserver of the third room, and the unserver of the second room is forwarded to the first room Leader for registration, and after registration is successful, the first room is synchronized to the second and third rooms, and the service registration information of the first, second and third rooms is identical.
6. The method of claim 1, wherein the ons command refers to detailed information listing complete connections/sessions of all clients connected to the server, and each node returns all server IP addresses connected to the client and corresponding sessionids according to the ons command.
7. The method of claim 1, wherein when the service queries for service registration information, the first machine room service queries for a first machine room registry, the second machine room service queries for a second machine room registry, and the third machine room service queries for a third machine room registry;
when the first machine room breaks down, the second machine room takes over the first machine room in sequence through a monitoring mechanism to become a Leader-Follower, the third machine room serves as an Observer of the second machine room, service call of the first machine room is degraded to a registry for calling the second machine room, and service call of the second machine room and the third machine room is unchanged;
when the first machine room is restored, the first machine room can take over the second machine room to become a Leader-impeller through the monitoring mechanism, the second machine room and the third machine room serve as an observers of the first machine room, the service call of the first machine room is restored to a registry for calling the first machine room, and the service call of the second machine room and the service call of the third machine room are unchanged.
8. The system for accessing the multi-machine-room priority strategy is characterized by comprising a plurality of DC machine rooms and a registry;
the DC machine room is respectively networked into a Leader-impeller mode and an offserver mode, so that the machine room and a registration center can keep data consistency;
meanwhile, when the first machine room breaks down, the second machine room takes over the first machine room in sequence through a monitoring mechanism to become a Leader-Follower, and the third machine room serves as an Observer of the second machine room, at this time, service call of the first machine room is degraded to a registry for calling the second machine room, and service call of the second machine room and the third machine room is unchanged;
when the first machine room is recovered, the first machine room takes over the second machine room to become a Leader-impeller through a monitoring mechanism, the second machine room and the third machine room are used as an observers of the first machine room, at this time, the service call of the first machine room is recovered to a registry for calling the first machine room, and the service call of the second machine room and the service call of the third machine room are unchanged;
the method comprises the steps that a registry client monitors all registry conditions in a 4-word command mode, the registry client preferentially tries to establish local registry service, if the establishment is successful, the registry client returns, if the establishment is successful, preferentially tries to select a registry of a local machine room in a registry cluster of the local machine room in a random ring mode to establish links, after the establishment is successful, it is judged that the links of the non-local machine room need log alarming and the 4-word command is triggered to be actively detected, otherwise, the alarm is given, the 4-word command is triggered to be actively detected, and the detection period is 10s.
9. A terminal device, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating over the bus when the terminal device is operating, the processor executing the machine-readable instructions to perform the steps of the method of any of claims 1 to 4 when executed.
10. A storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method according to any of claims 1 to 4.
CN202310335604.0A 2023-03-31 2023-03-31 Multi-machine-room priority policy access method, system, terminal equipment and storage medium Pending CN116405497A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310335604.0A CN116405497A (en) 2023-03-31 2023-03-31 Multi-machine-room priority policy access method, system, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310335604.0A CN116405497A (en) 2023-03-31 2023-03-31 Multi-machine-room priority policy access method, system, terminal equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116405497A true CN116405497A (en) 2023-07-07

Family

ID=87011758

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310335604.0A Pending CN116405497A (en) 2023-03-31 2023-03-31 Multi-machine-room priority policy access method, system, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116405497A (en)

Similar Documents

Publication Publication Date Title
EP3490224B1 (en) Data synchronization method and system
US7225356B2 (en) System for managing operational failure occurrences in processing devices
EP3886399A1 (en) Method for invoking server and proxy server
WO2020147331A1 (en) Micro-service monitoring method and system
US7076691B1 (en) Robust indication processing failure mode handling
US20030005350A1 (en) Failover management system
JP2004519024A (en) System and method for managing a cluster containing multiple nodes
CN111615066A (en) Distributed micro-service registration and calling method based on broadcast
CN103581276B (en) Cluster management device, system, service customer end and correlation method
US20020042693A1 (en) Cluster membership monitor
US20080183991A1 (en) System and Method for Protecting Against Failure Through Geo-Redundancy in a SIP Server
CN109542659A (en) Using more activating methods, equipment, data center's cluster and readable storage medium storing program for executing
JP6615761B2 (en) System and method for supporting asynchronous calls in a distributed data grid
CN108228393A (en) A kind of implementation method of expansible big data High Availabitity
WO2009117946A1 (en) Main-spare realizing method for dispatch servers and dispatch server
CN111884844A (en) Message service access method and device based on zookeeper
CN113946408A (en) Cloud native edge container control method and system and storage medium
CN114900449B (en) Resource information management method, system and device
CN111756780B (en) Method for synchronizing connection information and load balancing system
CN113055461B (en) ZooKeeper-based unmanned cluster distributed cooperative command control method
US10397069B2 (en) Self-adaptive service management method and system thereof
CN112351077B (en) Application service operation method, system, device and storage medium
CN113867915A (en) Task scheduling method, electronic device and storage medium
CN110730238B (en) Cluster calling system, method and device
CN116405497A (en) Multi-machine-room priority policy access method, system, terminal equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination