Method, system, terminal device and storage medium for multi-machine room priority strategy access
By adopting a multi-datacenter priority access strategy, using Leader-Follower and Observer networking patterns, and combining four-word command monitoring, Zookeeper load balancing is optimized, solving the service jitter and data inconsistency problems of Zookeeper in a multi-datacenter environment, and realizing efficient access to multiple DC registry centers.
Patent Information
- Application Number
- CN202310335604.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2043-03-31
AI Technical Summary
In multi-datacenter environments, existing technologies suffer from service jitter, timeouts, and unavailability due to uneven Zookeeper load, and cross-datacenter calls increase complexity and data inconsistency.
A multi-datacenter priority access strategy is adopted, and data consistency is ensured through Leader-Follower and Observer network architecture. The local datacenter is given priority access to the registry center. Combined with four-word command monitoring and random ring strategy, Zookeeper load balancing is optimized.
It improves the speed and stability of service registration and discovery, reduces cross-data center traffic, ensures the availability and data consistency of multiple DC registration centers in multi-site disaster recovery solutions, and supports smooth upgrades to stable versions.
Smart Images

Figure CN116405497B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of computer systems, and in particular, to a multi-machine room priority access method, system, terminal device and storage medium. BACKGROUND
[0002] The financial technology field pays more and more attention to the reliability of data and the availability of services, and the industry generally adopts the same city dual-active and off-site disaster recovery scheme. The proposal of two-site three-center and three-site five-center schemes puts forward higher requirements for service registration and service access.
[0003] From the perspective of service registration, with the development of modern computer technology, distributed systems provide the concept of service, and currently there are many registration centers. The mainstream registration centers include eureka, zookeeper and the like.
[0004] There are various implementation methods for realizing service registration between multiple DCs, punching through and calling. One is to develop a registration center adaptation layer. When the service is registered, the registration center adaptation layer undertakes the registration request and is responsible for maintaining the consistency of each registration center, and each registration center maintains the service discovery and calling of the DC. This method needs to add an adaptation layer, and the stability and reliability of the adaptation layer become the key to the whole service calling. Two is to develop a cross-machine room calling gateway. The cross-machine room calling is forwarded by the gateway, and the DC service is registered to the DC gateway and synchronized to the cross-machine room gateway cluster at the same time. Under normal circumstances, the internal circulation calling of each DC does not need to be forwarded across the machine room, and in the disaster situation, the service is forwarded through the cross-machine room gateway. This method needs to increase two times of forwarding in the calling process, and has the disadvantages of increasing protocol conversion delay, etc. Due to the two sets of logic of normal calling and cross-machine room calling, the problem of not returning is easy to appear. Three is that each service is registered to multiple DCs at the same time when the service is registered, and the service state change needs to be maintained to multiple DCs at the same time. This method is easy to cause the inconsistency of DC data, and generates a large amount of cross-machine room traffic.
[0005] Zookeeper does not use the traditional Master / Slave architecture, but chooses to design and implement a set of solutions by itself. It divides the nodes in the cluster into three roles: Leader, Follower and Observer, and realizes the management of the cluster by the cooperation of the three. Each node in the cluster can only play one role, and the management of the cluster is realized through the joint action of the three. A large number of places in the system use Zookeeper, and through the API provided by Zookeeper, the functions of cluster management, configuration file management, load balancing, Master election, etc. are realized. At the same time, big data components such as Hadoop, HBase and Solr are introduced into the system, and they integrate Zookeeper or realize the management of their own clusters through Zookeeper.
[0006] Regarding the Leader, it is elected through election and is the core of the entire Zookeeper cluster. It is mainly responsible for scheduling various servers within the cluster, scheduling and processing transaction requests, and ensuring FIFO transaction processing.
[0007] Regarding the Follower, it is responsible for participating in the election of the Leader and also participating in the voting of the client transaction request Proposal, and processing non-transaction requests from the client and forwarding transactions to the Leader server.
[0008] Regarding the Observer, its role is similar to that of the Follower, but it does not participate in any voting. The role of the Observer is only to improve non-transaction processing capacity.
[0009] And the custom adaptation layer, gateway layer, and synchronizer layer (full backup, incremental backup) add new complex structures, and the new layers become key components, which need to be maintained continuously with the upgrade of the Zookeeper version.
[0010] At the same time, the use of Zookeeper client to access Zookeeper adopts the default strategy, that is, the random ring strategy based on the cluster, without considering the cross-DC access problem and the Zookeeper load capacity problem, which will cause the increase of cross-DC traffic, the increase of Zookeeper mode latency, and the jitter of Zookeeper load, thereby causing service jitter, timeout and even unavailability. SUMMARY
[0011] The application provides a multi-machine room priority strategy access method and device. Based on the method, load balancing of Zookeeper can be realized, the speed and stability of service registration and discovery are improved, and multi-DC registration center access in a multi-site disaster recovery solution is achieved. The application embodiment provides a multi-machine room priority strategy access method, system, terminal device and storage medium.
[0012] Specifically, a multi-machine room priority strategy access method includes multi-DC cluster access and priority strategy access to a registration center.
[0013] The multi-DC cluster access is formed by a first machine room in a Leader-Follower mode, and the network is automatically elected by ZooKeeper after completion of networking. The second and third machine rooms are networked in an Observer mode, so that the registration center between the first, second and third machine rooms can keep data consistent.
[0014] When service registration occurs in the first machine room, the service is directly registered in the first machine room, and the first machine room synchronizes the service registration information to the second and third machine rooms. When service registration occurs in the second and third machine rooms, the service is registered by linking the local machine room (i.e., the second machine room links the Observer of the second machine room, and the third machine room links the Observer of the third machine room), and the local machine room Observer forwards the registration to the first machine room Leader for registration. After successful registration, the first machine room synchronizes the second and third machine room Observers, and the service registration information of the first, second and third machine rooms is consistent.
[0015] The priority strategy accesses the registration center. When service registration or discovery is performed, the service calls the registration center client of the local machine room.
[0016] The local machine room client queries whether a link held by the registration center already exists. If yes, the existing link is directly reused for registration center access. If no, or the link is broken during access, the third step is performed.
[0017] The registration center is re-linked. The registration center client monitors all registration centers in a 4-character command mode. The registration center client first attempts to establish a local registration center service. If successful, the registration center client returns. Otherwise, the registration center client attempts to establish a link to a local registration center in the registration center cluster of the local machine room in a random ring mode. If successful, the registration center client returns. Otherwise, the registration center client attempts to establish a link to the registration center cluster of the second machine room and the third machine room in sequence. After successful establishment of the link, the registration center client determines whether the link is a non-local machine room link. If yes, the registration center client logs an alarm and triggers a 4-character command for active detection. Otherwise, the registration center client alarms and triggers a 4-character command for active detection. The detection period is 10s.
[0018] The detection thread triggers the 4-word command detection in a fixed period (5 min) independently, communicates with multiple service ends of the ZooKeeper cluster by using the ZooKeeper 4-word command, obtains information returned by the service ends, and takes the information returned by the service ends as cluster information of the ZooKeeper cluster. The dimensions of the cluster information include one or more of a running state of the ZooKeeper cluster, a connection state of each service end of the ZooKeeper cluster, a service end IP address, a service name, and a session ID. First, the detection thread sends a wchc command to each service end of the ZooKeeper cluster. The wchc command refers to listing detailed information of a service end through a session. The output of the wchc command is a list of sessions related to the listening. Therefore, each node returns relevant information of the node according to the received wchc command, and then all service names and corresponding session IDs returned by each node can be obtained. Then, the target service name and the target session ID required by the user to be queried are found from all the service names and the corresponding session IDs. Then, the detection thread needs to send a cons command to each node in the ZooKeeper cluster again. The cons command refers to listing detailed information of complete connections / sessions of all clients connected to the server, including the number of received / sent packets, the session ID, the operation delay, the last operation execution, and the like. Therefore, each node returns the server IP address and the corresponding session ID connected to the client according to the cons command. According to the number of cons, a priority strategy is determined, and the load is determined. The link between the existing registration center client and the registration center is adjusted.
[0019] Further, when the service queries the service registration information, the first machine room service queries the first machine room registration center, the second machine room service queries the second machine room registration center, and the third machine room service queries the third machine room registration center.
[0020] Further, when the first machine room fails, the second machine room will take over the first machine room to become a Leader-Follower in sequence 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 call the registration center of the second machine room, and the service call of the second machine room and the third machine room does not change.
[0021] Further, when the first machine room recovers, the first machine room will take over the second machine room to become a Leader-Follower through a monitoring mechanism, and the second and third machine rooms serve as Observers of the first machine room. At this time, the service call of the first machine room is restored to call the registration center of the first machine room, and the service call of the second machine room and the third machine room does not change.
[0022] Further: a multi-machine room priority strategy access system, comprising a plurality of DC machine rooms and a registration center;
[0023] The above DC machine rooms are respectively networked into a Leader-Follower mode and an Observer mode, so that the machine rooms and the registration center can keep data consistent;
[0024] Meanwhile, when the first machine room fails, the second machine room will take over the first machine room to become a Leader-Follower in sequence 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 call the registration center of the second machine room, and the service call of the second machine room and the third machine room does not change;
[0025] When the first machine room recovers, the first machine room will take over the second machine room to become a Leader-Follower through a monitoring mechanism, and the second and third machine rooms serve as Observers of the first machine room. At this time, the service call of the first machine room is restored to call the registration center of the first machine room, and the service call of the second machine room and the third machine room does not change;
[0026] The registration center client monitors all registration center conditions in the form of 4-character command, and the registration center client tries to establish a local registration center service first. If the establishment is successful, it returns, otherwise, it tries to select a local registration center in the local machine room registration center cluster in a random ring manner to establish a link. After the establishment is successful, it is judged whether it is a non-local machine room link that needs to log alarm and trigger 4-character command active detection, otherwise, it alarms and triggers 4-character command active detection, and the detection period is 10s
[0027] Further: a terminal device can include a processor, a storage medium, and a bus, the storage medium stores machine readable instructions executable by the processor, when the terminal device runs, the processor and the storage medium communicate through the bus, the processor executes the machine readable instructions to execute the steps of the deep learning model training method as described in the foregoing embodiments.
[0028] Further: a storage medium, the storage has a computer program, the computer program is executed by the processor to execute the steps of the above method.
[0029] The application solves the problems of improving the availability of multi-DC registration center and the consistency of data by using the native Observer deployment mode, avoiding the problem of unavailability of the election process Zookeeper cluster induced by network jitter factors in multi-machine rooms, and the requirement of the network stability of the ZooKeeper server cluster is relatively high in the actual scene. However, for the services deployed on the cloud, network fluctuations and occasional instability are relatively common. The duration of such network problems may be only 0.5 to 1 second, but if the leader node is temporarily disabled and re-election is triggered, the ZooKeeper server cluster will be unavailable for a long time (possibly 30-120 seconds), thereby amplifying the unavailable time caused by network fluctuations, which is unacceptable for software systems that rely on ZooKeeper for collaboration. The combination of the two priority strategies of local priority and local room priority reduces cross-room traffic, achieves load balancing of ZooKeeper, improves the speed and stability of service registration discovery, and achieves multi-DC registration center access in the multi-site disaster recovery solution. The application provides a multi-machine room priority access method and device. Based on this method, load balancing of ZooKeeper can be achieved, the speed and stability of service registration discovery can be improved, and multi-DC registration center access in the multi-site disaster recovery solution can be achieved. Compared with the prior art, the advantages and reasons of the application are described as follows:
[0030] 1. Each DC has all the service registration information, which can ensure the efficiency of normal access and achieve degradation to ensure business continuity in disaster scenarios.
[0031] 2. The registration center service in different DCs uses the Zookeeper native Observer component solution, which can be smoothly upgraded and maintained according to the stable version published by the design.
[0032] 3. Through the plug-in enhancement mechanism of the curator client, the two priority strategies of local priority and local room priority are customized to reduce cross-room traffic, achieve load balancing of ZooKeeper, improve the speed and stability of service registration discovery, and achieve multi-DC registration center access in the multi-site disaster recovery solution. BRIEF DESCRIPTION OF DRAWINGS
[0033] In order to more clearly illustrate the technical solutions of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0034] Figure 1A flowchart of the method of the present application is shown.
[0035] Figure 2 A block diagram of the system of the present application is shown.
[0036] Figure 3 A flowchart of the multi-DC observer access is shown.
[0037] Figure 4 A flowchart of the priority policy access to the registration center is shown.
[0038] Figure 5 A flowchart of the priority policy access to the registration center is shown.
[0039] Figure 6 A block diagram of the terminal device of the present application is shown. DETAILED DESCRIPTION
[0040] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of description and illustration, and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn according to the actual proportions. The flowchart shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can not be implemented in sequence, and the steps without logical context relationship can be reversed in sequence or implemented simultaneously. In addition, one or more other operations can be added to the flowchart or one or more operations can be removed from the flowchart under the guidance of the content of the present application.
[0041] In addition, the embodiments described in the present application are only some of the embodiments of the present application, not all the embodiments. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0042] It should be noted that the term "comprising" will be used in the embodiments of the present application to specify the presence of stated features, but does not exclude the presence of other features. It should also be noted that like reference numerals and letters refer to like items throughout the drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. In the description of the present application, it should also be noted that the terms "first", "second", "third", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
[0043] Figure 1 A step flow chart of the method of the present application is shown, Figure 3 A flow chart of the multi-DC Observer mode access is shown, Figure 4 A flow chart of the priority strategy access to the registration center is shown, Figure 5 A flow chart of the priority strategy access to the registration center is shown.
[0044] The specific present application in technical implementation mainly divided into two parts:
[0045] Multi-DC Observer mode cluster access is adopted to ensure the consistency of registration information
[0046] The first machine room is networked into a Leader-Follower mode, and the network is completed by automatic election of ZooKeeper; the second and third machine rooms are networked into an Observer mode, so that the registration center between the first, second and third machine rooms can maintain data consistency.
[0047] When service registration occurs in the first machine room, the service is directly registered in the first machine room, and the first machine room synchronizes the service registration information to the second and third machine rooms; when service registration occurs in the second and third machine rooms, the service links the local machine room (i.e. the second machine room links the Observer of the second machine room, and the third machine room links the Observer of the third machine room) for registration, and the local machine room Observer forwards the registration to the first machine room Leader for registration, and after successful registration, the first machine room synchronizes the second and third machine room Observers, so that the service registration information of the first, second and third machine rooms is consistent.
[0048] When the service queries the service registration information, the first machine room service queries the first machine room registration center, the second machine room service queries the second machine room registration center, and the third machine room service queries the third machine room registration center.
[0049] When the first machine room fails, the second machine room will take over the first machine room to become Leader-Follower in sequence through the monitoring mechanism, and the third machine room will be the Observer of the second machine room. At this time, the service call of the first machine room is downgraded to call the registry center of the second machine room, and the service call of the second and third machine rooms does not change.
[0050] When the first machine room recovers, the first machine room will take over the second machine room to become Leader-Follower through the monitoring mechanism, and the second and third machine rooms will be the Observers of the first machine room. At this time, the service call of the first machine room is restored to call the registry center of the first machine room, and the service call of the second and third machine rooms does not change.
[0051] Priority strategy access to the registry center
[0052] The access process is described taking the first machine room as an example, and the second and third machine rooms are similar.
[0053] From the perspective of the first machine room, the access is as follows:
[0054] When the service registers or discovers, the service calls the local machine room's registry center client.
[0055] The local machine room client queries whether it has already linked with the registry center held, and if so, it directly reuses the existing link to access the registry center. If not, or if the link is broken during access, it proceeds to the third step.
[0056] Re-link with the registry center. The registry center client uses the 4-character command to monitor all registry centers. The registry center client first tries to establish the local registry center service, and returns if successful. Otherwise, it tries to select a local registry center in the local machine room's registry center cluster in a random ring manner, and returns if successful. Otherwise, it proceeds to the second and third machine room's registry center cluster in sequence to establish a link. After successful establishment, it determines whether it is a non-local machine room link that needs to log an alarm and trigger a 4-character command for active detection. Otherwise, it alarms and triggers a 4-character command for active detection, with a detection period of 10s.
[0057] The detection thread triggers the 4-word command detection independently and fixedly in a period (5 min), communicates with multiple service ends where the ZooKeeper cluster is located by using the ZooKeeper 4-word command, obtains the information returned by each service end, and takes the information returned by each service end as cluster information of the ZooKeeper cluster, wherein the dimension of the cluster information includes one or more of a running state of the ZooKeeper cluster, a connection condition of each service end of the ZooKeeper cluster, a service end IP address, a service name and a session ID. First, the detection thread sends a wchc command to each service end where the ZooKeeper cluster is located, wherein the wchc command refers to listing detailed information of a service end listening through a session, and the output of the wchc command is a list of sessions related to listening, so each node returns relevant information of the node according to the received wchc command, and then all service names and corresponding session IDs returned by each node can be obtained, and then the target service name and the corresponding target session ID required by the user to be queried are found out from all the service names and the corresponding session IDs. Then, the detection thread needs to send a cons command to each node in the ZooKeeper cluster again, wherein the cons command refers to listing detailed information of complete connections / sessions of all clients connected to the server, including the number of received / sent packets, a session ID, an operation delay, last operation execution and other information, so each node returns all server IP addresses and corresponding session IDs connected with the client according to the cons command. According to the number of cons, priority strategy judgment and load judgment are performed to adjust the link between the existing registry center client and the registry center.
[0058] As shown in Figure 2 The system of the application comprises a plurality of DC machine rooms and a registry center.
[0059] The DC machine rooms are networked into a Leader-Follower mode and an Observer mode, so that the machine rooms and the registry center can keep the data consistent.
[0060] Meanwhile, when the first machine room fails, the second machine room will take over the first machine room to become a Leader-Follower in sequence according to a monitoring mechanism, and the third machine room becomes an Observer of the second machine room, at this time, the service call of the first machine room is downgraded to call the registry center of the second machine room, and the service call of the second machine room and the third machine room does not change.
[0061] When the first data center recovers, it will take over the second data center as the Leader-Follower through the monitoring mechanism. The second and third data centers will act as the Observers of the first data center. At this time, the service calls of the first data center will be restored to calling the registry center of the first data center, and the service calls of the second and third data centers will remain unchanged.
[0062] The registration center client monitors the status of all registration centers using a four-word command. The registration center client first attempts to establish a local registration center service. If the establishment is successful, it returns. Otherwise, it first attempts to select a local data center registration center from the local data center cluster using a random ring method to establish a connection. After successful establishment, if it is determined that the connection is not from the local data center, an alarm should be logged and a four-word command should be triggered for active detection. Otherwise, an alarm should be triggered and a four-word command should be triggered for active detection. The detection cycle is 10 seconds.
[0063] like Figure 6 As shown, the terminal device 6 may include a processor 601, a storage medium 602, and a bus 603. The storage medium 602 stores machine-readable instructions executable by the processor 601. When the terminal device is running, the processor 601 communicates with the storage medium 602 via the bus 603. The processor 601 executes the machine-readable instructions to perform the steps of the deep learning model training method described in the foregoing embodiments. The specific implementation and technical effects are similar and will not be repeated here.
[0064] For ease of explanation, only one processor is described in the terminal device described above. However, it should be noted that in some embodiments, the terminal device of the present invention may also include multiple processors, and therefore the steps performed by one processor described in the present invention may also be performed jointly by multiple processors or individually.
[0065] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for multi-chamber priority policy access, characterized in that, The steps include, Multi-DC cluster access and priority strategy access to the registration center; The multi-DC cluster access is formed by the first machine room in a leader-follower mode, and the ZooKeeper automatically elects after the networking is completed. The second and third machine rooms are networked into an observer mode. The priority strategy access to the registration center is specifically that when a service registers or is discovered, the service calls the registration center client of the local machine room. Then the local machine room client queries whether a link held by the registration center has been established, and if so, directly reuses the existing link to access the registration center, and if not or if the link is broken during access, the registration center is re-linked. The registration center client uses a 4-word command to monitor all registration center situations, and the registration center client first attempts to establish a local registration center service, and returns if successful, otherwise, attempts to select a local registration center in the registration center cluster of the local machine room in a random ring manner, and returns if successful, otherwise, attempts to establish a link in the registration center cluster of the second and third machine rooms in sequence, and after the link is established, it is determined whether the local machine room link needs to be logged, and if not, an alarm is triggered, triggering a 4-word command to actively detect, with a detection period of 10s. The detection thread triggers the 4-word command detection at a fixed period, communicates with multiple service ends of the ZooKeeper cluster using the ZooKeeper four-word command, obtains the information returned by each service end, and uses the information returned by each service end as the cluster information of the ZooKeeper cluster. First, the detection thread sends a wchc command to each service end of the ZooKeeper cluster, then finds out the target service name and the corresponding target SessionID required by the user from all service names and corresponding session IDs, and then the detection thread needs to send a cons command to each node in the ZooKeeper cluster again, and adjusts the existing link from the registration center client to the registration center according to the number of cons for priority strategy judgment and load judgment.
2. The method of claim 1, wherein, The dimensions of the cluster information include one or more of the running state of the ZooKeeper cluster, the connection state of each service end of the ZooKeeper cluster, the service end IP address, the service name and the session ID.
3. The method of claim 1, wherein, The wchc command refers to listing detailed information of the service end listening through the session, and its output is a list of sessions related to listening. Each node returns relevant information of the node according to the received wchc command, and then obtains all service names and corresponding session IDs returned by each node.
4. The method of claim 1, wherein, When service registration occurs in the first machine room, the service is directly registered in the first machine room, and the first machine room synchronizes the service registration information to the second and third machine rooms.
5. The method of claim 1, wherein, When the second and third machine rooms register services, the second machine room service links the Observer of the second machine room, the third machine room service links the Observer of the third machine room, and the local machine room Observer forwards the registration to the first machine room Leader for registration. After successful registration, the first machine room synchronizes the second and third machine room Observers, so that the service registration information of the first, second and third machine rooms is consistent.
6. The method of claim 1, wherein, The cons command refers to listing all the complete connection and session details of the clients connected to the server, and each node returns all the server IP addresses connected to the client and the corresponding SessionID according to the cons command.
7. The method of claim 1, wherein, When the service queries the service registration information, the first machine room service queries the first machine room registration center, the second machine room service queries the second machine room registration center, and the third machine room service queries the third machine room registration center. When the first machine room fails, the second machine room will take over the first machine room as Leader-Follower in sequence through the monitoring mechanism, and the third machine room will be the Observer of the second machine room. The service call of the first machine room is downgraded to call the registration center of the second machine room, and the service call of the second and third machine rooms does not change. When the first machine room recovers, the first machine room will take over the second machine room as Leader-Follower through the monitoring mechanism, and the second and third machine rooms will be the Observers of the first machine room. The service call of the first machine room is restored to call the registration center of the first machine room, and the service call of the second and third machine rooms does not change.
8. A system for multi-chamber priority policy access, characterized by, It includes several DC machine rooms and registration centers. The above-mentioned DC machine rooms are networked into Leader-Follower mode and Observer mode, so that the above-mentioned machine rooms and registration centers can keep the data consistent. When the first machine room fails, the second machine room will take over the first machine room as Leader-Follower in sequence through the monitoring mechanism, and the third machine room will be the Observer of the second machine room. At this time, the service call of the first machine room is downgraded to call the registration center of the second machine room, and the service call of the second and third machine rooms does not change. When the first machine room recovers, the first machine room will take over the second machine room as Leader-Follower through the monitoring mechanism, and the second and third machine rooms will be the Observers of the first machine room. At this time, the service call of the first machine room is restored to call the registration center of the first machine room, and the service call of the second and third machine rooms does not change. The registration center client uses the 4-character command to monitor all registration center situations. The registration center client first tries to establish the local registration center service. If successful, it returns. Otherwise, it tries to select a local machine room registration center in the local machine room registration center cluster in a random ring manner to establish a link. After successful establishment, it is determined whether the local machine room link needs a log alarm. If not, it alarms. If so, it triggers a 4-character command to actively detect, with a detection period of 10s.
9. A terminal device, comprising: It includes: A processor, a storage medium storing machine readable instructions executable by the processor, and a bus for communication between the processor and the storage medium when the terminal device is running, the processor executes the machine readable instructions to perform the steps of the method of any one of claims 1 to 4.
10. A storage medium, characterized by A computer program stored on the storage medium, the computer program performs the steps of the method of any one of claims 1 to 4 when executed by a processor.
Citation Information
Patent Citations
Unmanned cluster distributed cooperative command and control method based on ZooKeeper
CN113055461A
Data synchronization method, apparatus, and device for two data centers, and storage medium
WO2023273559A1