An emergency processing method, device and equipment for a persistent data registry center
By introducing a self-service portal and monitoring center between the registry center and the emergency response center, the node status is monitored in real time and the full data is loaded in case of failure. This solves the data synchronization problem of the registry center when the network fails, realizes data persistence and automatic switching, and ensures the reliability and data consistency of the registry center.
Patent Information
- Application Number
- CN202411964897.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2044-12-30
AI Technical Summary
When the existing registry center experiences intermittent network problems or failures, communication issues between nodes may cause data synchronization failures, resulting in the loss of registration information for some or all nodes. Consequently, the consumer system is unable to obtain the provider's address, leading to call failures.
By introducing a self-service portal and monitoring center between the registry center and the emergency center, the registry center node is monitored in real time, heartbeat detection and error log alarms are performed, the failure time is recorded, and the full provider service registration information corresponding to the failure time is loaded into the emergency center to replace the registry center in external services, thereby achieving data persistence and automated switching.
It enables data persistence in the registry center during network failures, ensuring that the emergency center can take over all external interfaces, has microservice-level registration data recovery capabilities, and guarantees the data consistency and reliability of the registry center.
Smart Images

Figure CN119892604B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present specification relate to the field of data processing, and in particular to an emergency processing method, device and equipment of a persistent data registry center. BACKGROUND
[0002] The registry center is the "address book" in the micro-service architecture, which records the mapping relationship between services and service addresses. In a distributed micro-service architecture, a registry center cluster often contains multiple nodes, and the micro-service provider system will randomly register with the registry center nodes, and the data synchronization between the registry center nodes will be performed on the provider information to ensure the data consistency between the nodes in the cluster. The consumer system accessing the provider system randomly accesses the registry center node for service discovery at regular intervals and updates the service discovery result to the local cache, and the consumer system obtains the provider address from the local cache to directly connect to the corresponding provider, realizing point-to-point communication or gateway communication. The existing scheme does not have an emergency module design in the node data disorder scenario. The data consistency of the existing registry center is seriously dependent on the network connectivity of the environment. When intermittent network problems or failures occur in the environment, the data synchronization between the nodes in the registry center may fail due to communication problems, and the registration information of part or all nodes in the cluster may be missing. When the consumer system performs service discovery to the registry center node with missing registration information, the consumer system may fail to call because it cannot obtain the corresponding provider address.
[0003] There is an urgent need for an emergency processing method of a persistent data registry center to realize different forms of automatic recovery of the registry center and solve the problem that the existing scheme only supports manual recovery of failures. SUMMARY
[0004] To solve the problem that when intermittent network problems or failures occur in the environment, the data synchronization between the nodes in the registry center may fail due to communication problems, embodiments of the present specification provide an emergency processing method, device and equipment of a persistent data registry center. The method comprises performing heartbeat detection on the registry center module to realize the persistence of the registration data of the registry center, enabling the emergency center to take over the external interface of the registry center, and having the emergency capability of replacing all functions of the registry center. At the same time, the emergency center has the automatic switching mode of the monitoring and failure perception capability of the real-time data of the registry center, and provides the registration data recovery capability of a single micro-service level.
[0005] The specific technical solutions of the embodiments of the present specification are as follows:
[0006] In one aspect, the present specification provides an emergency processing method of a persistent data registry center, which comprises connecting a service gateway or an application to a registry center and an emergency center, and further connecting a self-service portal and a monitoring center between the registry center and the emergency center.
[0007] obtaining the provider service registration information, randomly selecting any node in the registration center for service registration or renewal, and synchronizing the provider service registration information to at least two random nodes in the registration center;
[0008] The selected node randomly selects a node in the registration center to provide external services for the service gateway or application.
[0009] The self-service portal periodically obtains full-amount provider service registration information and its timestamp in the registration center for persistent storage;
[0010] The monitoring center monitors each node in the registration center in real time, and if it is determined that the data of any node is unavailable, records the failure time and establishes a connection with the emergency center for the service gateway;
[0011] The emergency center matches the failure time and the timestamp in the self-service portal, loads the full-amount provider service registration information corresponding to the failure time, and replaces the registration center to provide external services for the service gateway or application.
[0012] Further, the monitoring center further comprises,
[0013] The real-time monitoring includes heartbeat detection of each node in the registration center, real-time detection of the number of service gateways or applications and error log alarms, and determination of whether the registration center node data is available.
[0014] Loading the full-amount provider service registration information corresponding to the failure time further comprises,
[0015] The external service of the emergency center includes restoring the full-amount provider service registration information corresponding to the failure time;
[0016] If there is a data change in some microservices or gateways after the failure time, the self-service portal dynamically modifies and issues the data change according to the full-amount provider service registration information after the failure time.
[0017] Further, replacing the registration center to provide external services for the service gateway or application further comprises,
[0018] The self-service portal periodically obtains full-amount provider service registration information and its timestamp in the emergency center for persistent storage;
[0019] If the monitoring center detects that the registration center has returned to normal, the registration center will resume providing external services for the service gateway or application.
[0020] Further, the self-service portal periodically acquires the full-providers service registration information and its timestamp in the registration center, which further comprises,
[0021] The self-service portal acquires snapshot files of all nodes in the registration center according to a predetermined period, as the full-providers service registration information.
[0022] Further, the snapshot file comprises: microservice name, instance id, registration information: provider ip port, instance status.
[0023] On the other hand, the embodiments of the present specification also provide an emergency processing device of a persistent data registration center, the device comprises:
[0024] An information acquisition module is configured to acquire provider service registration information, randomly select any node in the registration center for service registration or renewal, and synchronize the provider service registration information to at least two random nodes in the registration center;
[0025] A registration center module is configured to randomly select nodes to provide external services for the service gateway or application;
[0026] A self-service portal module is configured to periodically acquire full-providers service registration information and its timestamp in the registration center for persistent storage;
[0027] A monitoring center module is configured to monitor each node in the registration center in real time, and if it is determined that any registration center node data is unavailable, record the failure time and establish a connection between the service gateway and the emergency center;
[0028] An emergency center module is configured to match the failure time and the timestamp in the self-service portal, load the full-providers service registration information corresponding to the failure time, and replace the registration center to provide external services for the service gateway or application.
[0029] On the other hand, the embodiments of the present specification also provide a computer device, which comprises a memory, a processor, and a computer program stored in the memory, and the processor implements the above-mentioned method when executing the computer program.
[0030] On the other hand, the embodiments of the present specification also provide a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the above-mentioned method.
[0031] Finally, the embodiment of the present specification also provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to realize the method described above.
[0032] With the embodiment of the present specification, a design of an emergency center based on persistent data is provided. The present scheme registers the service gateway or application through the connection registration center and the emergency center, and the self-service portal and the monitoring center are also connected between the registration center and the emergency center. By obtaining the provider service registration information, any node in the registration center is randomly selected for service registration or renewal, and the provider service registration information is synchronized to at least two random nodes in the registration center. The nodes in the registration center provide external services for the service gateway or application. At the same time, the self-service portal periodically obtains the full amount of provider service registration information and its timestamp in the registration center for persistent storage, so as to ensure that the full amount of provider service registration information at any time point can be obtained at any time. The monitoring center monitors each node in the registration center in real time to ensure that any registration center node data can be found in time when there is a problem. If it is judged that any registration center node data is unavailable due to downtime or network failure, the fault time is recorded and the service gateway is connected with the emergency center. The emergency center obtains the fault time of the last heartbeat detection before the network failure, and matches the fault time and the timestamp in the self-service portal, loads the full amount of provider service registration information corresponding to the fault time, and uses the emergency center to replace the registration center to provide external services for the service gateway or application. Thus, the persistence of the registration data of the registration center is realized, and the emergency center can ensure that all interfaces can be taken over externally, and the overall scheme of the emergency center with the above features. At the same time, the emergency center with the real-time data monitoring and fault perception capability of the registration center automatically switches to the mode, providing single micro-service level registration data recovery capability. BRIEF DESCRIPTION OF DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present specification or the prior art, the drawings needed in the embodiment or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present specification, and those skilled in the art can also obtain other drawings according to these drawings without creating any creative labor.
[0034] Figure 1 An implementation system schematic diagram of an emergency processing method of a persistent data registration center in the embodiment of the present specification is shown;
[0035] Figure 2 An implementation system schematic diagram of an emergency processing method of a persistent data registration center in the embodiment of the present specification is shown;
[0036] Figure 3Fig. 1 shows a flowchart of a process of loading full-service provider registration information corresponding to the fault time in an embodiment of the present specification;
[0037] Figure 4 Fig. 2 shows a flowchart of a process of replacing the registration center for the service gateway or application to provide external services in an embodiment of the present specification;
[0038] Figure 5 Fig. 3 shows a structural diagram of an emergency processing system of the persistent data registration center in the embodiment;
[0039] Figure 6 Fig. 4 shows a structural diagram of an emergency processing device of the persistent data registration center in the embodiment;
[0040] Figure 7 Fig. 5 shows a structural diagram of a computer device in an embodiment of the present specification.
[0041]
BRIEF DESCRIPTION OF THE DRAWINGS
[0042] 101, service gateway or application;
[0043] 102, registration center;
[0044] 103, emergency center;
[0045] 601, information acquisition module;
[0046] 602, registration center module;
[0047] 603, self-service portal module;
[0048] 604, monitoring center module;
[0049] 605, emergency center module;
[0050] 702, computer device;
[0051] 704, processing device;
[0052] 706, storage resource;
[0053] 708, driving system;
[0054] 710, input / output module;
[0055] 712, input device;
[0056] 714, output device;
[0057] 716, presentation device;
[0058] 718, graphical user interface;
[0059] 720、network interface;
[0060] 722、communication link;
[0061] 724、communication bus. DETAILED DESCRIPTION
[0062] The technical solutions in the embodiments of the present specification will be described clearly and completely below in combination with the drawings in the embodiments of the present specification. Obviously, the described embodiments are only part of the embodiments of the present specification, rather than all the embodiments. Based on the embodiments in the embodiments of the present specification, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the embodiments of the present specification.
[0063] It should be noted that the terms "first", "second", and the like in the description and claims of the embodiments of the present specification and the above-described drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the embodiments of the present specification described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, device, product or equipment that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0064] It should be noted that the acquisition, storage, use, processing, etc. of data in the technical solutions of the embodiments of the present specification comply with the relevant provisions of national laws and regulations.
[0065] It should be noted that in the embodiments of the present specification, some industry existing solutions of software, components, models, etc. may be mentioned, which should be considered as exemplary, and the purpose is only to illustrate the feasibility of the technical solution implementation of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0066] As Figure 1As shown in the embodiment of the present specification, the schematic diagram of the implementation system of the emergency processing method of the persistent data registration center is shown, which includes a service gateway or application 101, a registration center 102 and an emergency center 103. The service gateway or application 101, the registration center 102 and the emergency center 103 can communicate through a network, which can include a local area network (Local Area Network, LAN for short), a wide area network (Wide Area Network, WAN for short), the Internet or a combination thereof, and is connected to a website, a user device (such as a computing device) and a backend system. Alternatively, the registration center 102 can be a node of a cloud computing system, or each server can be a separate cloud computing system, including multiple computers interconnected by a network and working as a distributed processing system.
[0067] The full-amount provider service registration information is obtained and sent to the registration center 102, the registration center 102 creates a data synchronization task according to the full-amount provider service registration information, and sends it to at least two different registration center modules in the registration center for processing, and then provides external services through the service gateway or application 101, and at the same time, when the registration center 102 has a downtime or a link problem, the modules in the registration center 102 can be replaced by the emergency center 103 to work.
[0068] In addition, it should be noted that, Figure 1 The application environment shown is only one provided by the embodiment of the present specification, and other application environments can also be included in actual application, which is not limited by the present specification.
[0069] In view of the problems in the prior art, the embodiment of the present specification provides an emergency processing method of a persistent data registration center. In the embodiment of the present specification, Figure 2 As shown in the embodiment of the present specification, the flowchart of the emergency processing method of the persistent data registration center is shown. The emergency processing process of the persistent data registration center is described in the figure. The order of the steps listed in the embodiment is only one of the many step execution orders, and does not represent the only execution order. In actual system or device product execution, the method order shown in the embodiment or the drawing can be executed or executed in parallel. Specifically, as Figure 2 As shown, the method can include: a service gateway or application connecting a registration center and an emergency center, and a self-service portal and a monitoring center are also connected between the registration center and the emergency center;
[0070] Step 201: obtaining provider service registration information, randomly selecting any node in the registration center for service registration or renewal, and synchronizing the provider service registration information to at least two random nodes in the registration center;
[0071] Step 202: randomly selecting a node in the registration center to provide external services for the service gateway or application;
[0072] Step 203: the self-service portal periodically acquires full-providers service registration information and its timestamp in the registration center for persistent storage;
[0073] Step 204: the monitoring center monitors each node in the registration center in real time, and if it is determined that the data of any node is unavailable, records the failure time and establishes a connection between the service gateway and the emergency center;
[0074] Step 205: the emergency center matches according to the failure time and the timestamp in the self-service portal, loads the full-providers service registration information corresponding to the failure time, and replaces the registration center to provide external services for the service gateway or application.
[0075] By using the embodiments of the present specification, a design of an emergency center based on persistent data is provided. According to the present scheme, the service gateway or application is connected with the registration center and the emergency center, and the self-service portal and the monitoring center are further connected between the registration center and the emergency center. By acquiring the providers service registration information, any node in the registration center is randomly selected for service registration or renewal, and the providers service registration information is synchronized to at least two random nodes in the registration center. The nodes in the registration center provide external services for the service gateway or application. Meanwhile, the self-service portal periodically acquires full-providers service registration information and its timestamp in the registration center for persistent storage, so as to ensure that the full-providers service registration information at any time point can be acquired at any time. The monitoring center monitors each node in the registration center in real time, so as to ensure that the problem of the registration center node can be found in time. If it is determined that any registration center node data is unavailable due to downtime or network failure, the failure time is recorded and the service gateway is connected with the emergency center. The emergency center acquires the failure time of the last heartbeat detection before the network failure, and matches according to the failure time and the timestamp in the self-service portal, loads the full-providers service registration information corresponding to the failure time, and uses the emergency center to replace the registration center to provide external services for the service gateway or application. Thus, the persistence of the registration center registration data is realized, and the emergency center can ensure to take over all interfaces externally, and the overall scheme of the emergency center with the above features is provided. At the same time, the emergency center with the real-time data monitoring and failure perception ability of the registration center automatically switches the mode, and provides single-micro-service-level registration data recovery ability.
[0076] In the embodiments of the present application, when the network environment and the registration center node are normally running, the portal will pull the full-service provider registration information from the registration center at regular intervals and save it to the database or other persistent storage with a timestamp. When the network problem occurs intermittently and the registration information of the service provider system changes, causing the data of the registration center nodes to be out of sync, for example, one instance of the service provider system is down, but the service caller cannot continuously perceive that the instance is down and continues to send transactions to it, which will cause continuous error reporting, and then the image needs to be replaced and the application needs to be restarted to enable the emergency center. Then, according to the timestamp, a snapshot is selected, and the registration center module is switched to the corresponding emergency module, which provides services to the outside before requesting the portal to pull the full-service provider information at the corresponding time point and put it into the local cache.
[0077] In the embodiments of the present application, in order to obtain the state of each node in the registration center in a timely manner and ensure that the fault can be found as soon as possible when a network fault or downtime occurs, the monitoring center further includes,
[0078] The real-time monitoring includes heartbeat detection of each node in the registration center, real-time detection of the number of service gateways or applications and error log alarms, and determination of whether the registration center node data is available.
[0079] Specifically, during running, the system is in snapshot mode, and the background address and other related information cannot be changed. When the background instance is restarted or a new instance is expanded, it will be registered in the registration center. Therefore, when the real-time change of the service provider registration information on the monitoring registration center is obvious, such as a significant decrease, it can be determined that the network has a fault. At the same time, according to different business needs, the registration center monitoring center can also set different thresholds. When the number of nodes with problems reaches the threshold, the fault time is recorded and the service gateway is connected to the emergency center.
[0080] In the embodiments of the present application, in order to minimize data loss, as shown in Figure 3 Loading the full-service provider registration information corresponding to the fault time further includes,
[0081] Step 301: The emergency center provides services to the outside, including restoring the full-service provider registration information corresponding to the fault time;
[0082] Step 302: If there is data variation of part of the microservices or gateways after the fault time, the self-service portal dynamically modifies and issues the data variation according to the full-service provider registration information after the fault time.
[0083] Specifically, between the discovery of the fault in the monitoring center and the recording of the fault time to the emergency center to completely replace the registration center to provide external services, there may still be data updates or changes in the registration center. Therefore, in order to avoid the loss of data changes during this period, after loading the full provider service registration information corresponding to the fault time in the emergency center, the self-service portal will also confirm whether there is data change after the fault time according to the full provider service registration information stored after the fault time, and if so, it will dynamically modify and issue according to the data change recorded in the full provider service registration information.
[0084] In the embodiments of the present specification, in order to ensure that the registration center can resume normal work after the network recovers to normal, as shown in Figure 4 Further comprising,
[0085] Step 401: The self-service portal periodically acquires full provider service registration information and its timestamp in the emergency center for persistent storage;
[0086] Step 402: If the monitoring center detects that the registration center has recovered to normal, the registration center resumes providing external services to the service gateway or application.
[0087] In the embodiments of the present specification, in order to acquire the full provider service registration information, the self-service portal periodically acquires full provider service registration information and its timestamp in the registration center further comprising,
[0088] The self-service portal acquires snapshot files of all nodes in the registration center according to a predetermined period as the full provider service registration information.
[0089] Further, the snapshot file includes: microservice name, instance id, registration information: provider ip port, instance state.
[0090] In another embodiment of the present specification, when there is a new provider instance that needs to access or the information of the existing provider instance changes during the operation of the emergency center, the information change of the first j node is detected, thereby creating a data synchronization task to synchronize the content of the information change to the second node, thereby realizing information synchronization in at least two nodes. At the same time, the registration data of the registration center is monitored in real time through the monitoring platform, and a customized water line can be configured according to different business capability recovery requirements to ensure that the start of the emergency center can be automatically triggered.
[0091] In another embodiment of the present specification, the emergency module can provide all external interfaces of the connection registration center, because the cluster nodes pull the same full provider service information, so as to ensure the data consistency between nodes. In the embodiment of the present specification, the problem that the existing scheme cannot avoid the data disorder of nodes caused by data synchronization failure in extreme scenarios is solved. The emergency module not only can exercise the registration center function, but also removes the complex mechanism related to registration center data synchronization. Each node loads the same static data when starting, thereby ensuring the consistency of data of each node. The registration data persistence of the registration center is realized, and the whole scheme of the emergency center with the above characteristics is realized. At the same time, the emergency center automatic switching mode with real-time data monitoring and fault sensing capability of the registration center is provided. During the takeover period of the emergency module, single micro-service level registration data recovery capability can also be provided.
[0092] In one embodiment of the present specification, as shown in Figure 5 Under the condition that the network environment and the registration center node are normally running, the portal will pull the full provider service registration information and carry the time stamp to the database or other persistent storage at regular intervals. When the environment intermittently has network problems, the data between the registration center nodes is not synchronized. At this time, the emergency center is enabled to select the full provider service information corresponding to the time point according to the time stamp and put it into the local cache. When the emergency center is running, new provider instances need to be accessed or the information of the existing provider instances changes, and the operation and maintenance personnel need to be notified to download the snapshot file corresponding to the time stamp from the portal. After adding the new provider information, the portal is uploaded and the emergency center is issued, and then the customized single micro-service level registration data recovery capability can be realized. At the same time, the registration data of the registration center is monitored in real time through the monitoring platform, and the customized water level line can be configured according to different business capability recovery requirements to automatically trigger the start of the emergency center. The emergency center can provide all external interfaces of the registration center, because the cluster nodes pull the same full provider service information, so as to ensure the data consistency between nodes.
[0093] As one embodiment of the present specification, it can also be referred to as Figure 6 The specific structure diagram of the emergency processing device of the persistent data registration center in the embodiment is shown.
[0094] The information acquisition module 601 is configured to acquire provider service registration information, randomly select any node in the registration center for service registration or renewal, and synchronize the provider service registration information to at least two random nodes in the registration center.
[0095] The registration center module 602 is configured to randomly select nodes to provide external services to the service gateway or the application.
[0096] The self-service portal module 603 is configured to periodically acquire full-service provider registration information and time stamps in the registration center and store the information persistently;
[0097] The monitoring center module 604 is configured to monitor each node in the registration center in real time, and if it is determined that any node in the registration center is unavailable, record a fault time and establish a connection between the service gateway and the emergency center module;
[0098] The emergency center module 605 is configured to match the fault time and the time stamp in the self-service portal, load full-service provider registration information corresponding to the fault time, and replace the registration center to provide external services to the service gateway or the application.
[0099] Since the principle of solving the problem of the above device is similar to the above method, the implementation of the above system can refer to the implementation of the above method, and the repeated parts will not be described.
[0100] As shown in Figure 7 FIG. 1 is a structural schematic diagram of a computer device according to an embodiment of the present specification. The computer device in the embodiment of the present specification can execute the method of the embodiment of the present specification.
[0101] The computer device 702 can include one or more processing devices 704, such as one or more central processing units (CPUs), each of which can implement one or more hardware threads. The computer device 702 can also include any storage resource 706 for storing any kind of information, such as code, settings, data, etc. Without limitation, for example, the storage resource 706 can include any one or a combination of more than one of the following: any type of RAM, any type of ROM, a flash memory device, a hard disk, an optical disk, etc. More generally, any storage resource can store information using any technology.
[0102] Further, any storage resource can provide volatile or non-volatile retention of information.
[0103] Further, any storage resource can represent a fixed or removable component of the computer device 702. In one case, the computer device 702 can perform any operation of the associated instructions when the processing device 704 executes the associated instructions stored in any storage resource or a combination of storage resources. The computer device 702 also includes one or more drive systems 708 for interacting with any storage resource, such as a hard disk drive system, an optical disk drive system, etc.
[0104] The computer device 702 can also include an input / output module 710 (I / O) for receiving input (via input device 712) and for providing output (via output device 714). One specific output mechanism can include a presentation device 716 and associated graphical user interface 718 (GUI). In other embodiments, the input / output module 710 (I / O), the input device 712, and the output device 714 can not be included, and the computer device 702 can be a standalone computer device in a networked environment. The computer device 702 can also include one or more network interfaces 720 for exchanging data with other devices via one or more communication links 722. The one or more communication buses 724 couple the various components in the computer device 702.
[0105] The communication links 722 can be implemented in any manner, such as through a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication links 722 can include any combination of hardwired links, wireless links, routers, gateway functionality, name servers, etc., governed by any protocol or combination of protocols.
[0106] The embodiments of the present specification also provide a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the above method.
[0107] The embodiments of the present specification also provide a computer readable instruction, wherein when the processor executes the instruction, the program in the instruction causes the processor to execute the above method.
[0108] It should be understood that, in various embodiments of the embodiments of the present specification, the size of the sequence number of each process described above does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present specification.
[0109] It should also be understood that, in the embodiments of the present specification, the term "and / or" is only a description of the association relationship of the associated objects, which means that there can be three relationships. For example, A and / or B can represent three cases of A alone, A and B together, and B alone. In addition, the character " / " in the embodiments of the present specification generally represents an "or" relationship between the associated objects before and after it.
[0110] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0111] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0112] In several embodiments provided by the embodiments of the present disclosure, it should be understood that the disclosed system, device and method can be implemented by other ways. For example, the device embodiments described above are merely schematic, for example, the division of the units is merely a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, and can also be electrical, mechanical or other forms of connection.
[0113] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiments of the present disclosure.
[0114] In addition, each functional unit in each embodiment of the embodiments of the present disclosure can be integrated in one processing unit, or each unit can exist physically independently, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0115] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present specification or the entire or part of the technical solutions that contribute to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present specification. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0116] The principles and implementation manners of the embodiments of the present specification are described in the embodiments of the present specification. The above embodiment description is only used to help understand the method and core idea of the embodiments of the present specification; meanwhile, for those skilled in the art, according to the idea of the embodiments of the present specification, the specific implementation manners and application ranges will be changed; in view of the above, the content of the present specification should not be understood as a limitation of the embodiments of the present specification.
Claims
1. An emergency handling method for a persistent data registry, characterized in that, The method includes a service gateway or application connection to a registry center and an emergency center, wherein a self-service portal and a monitoring center are also connected between the registry center and the emergency center. Obtain the service registration information of the provider, randomly select any node in the registration center to register or renew the service, and synchronize the service registration information of the provider to at least two random nodes in the registration center; The node selection process randomly selects a node from the registration center to provide external services to the service gateway or application. The self-service portal periodically retrieves and persistently stores the registration information of all service providers and their timestamps from the registration center. The monitoring center monitors each node in the registration center in real time. If it determines that the data of any node is unavailable, it records the time of failure and establishes a connection between the service gateway and the emergency center. The emergency center matches the fault time and the timestamp in the self-service portal, loads the full provider service registration information corresponding to the fault time, and replaces the registration center to provide external services to the service gateway or application.
2. The emergency handling method for a persistent data registry according to claim 1, characterized in that, The monitoring center further includes real-time monitoring of each node in the registration center. The real-time monitoring includes performing heartbeat detection on each node in the registry center, detecting the number of service gateways or applications and error log alarms in real time, and determining whether the node data in the registry center is available.
3. The emergency handling method for a persistent data registry according to claim 1, characterized in that, Loading the full provider service registration information corresponding to the aforementioned failure time further includes, The emergency center provides external services including restoring the full range of provider service registration information corresponding to the time of the failure. If some microservices or gateways experience data changes after the failure time, the self-service portal will dynamically modify and distribute the data changes based on the full provider service registration information after the failure time.
4. The emergency handling method for a persistent data registry according to claim 1, characterized in that, Replacing the registration center in providing external services to the service gateway or application further includes... The self-service portal periodically retrieves and persistently stores the registration information and timestamps of all service providers in the emergency center. If the monitoring center detects that the registration center has returned to normal, it will restore the registration center to provide external services to the service gateway or application.
5. The emergency handling method for a persistent data registry according to claim 1, characterized in that, The self-service portal periodically obtains the full provider service registration information and its timestamps from the registration center, further including... The self-service portal obtains snapshot files of all nodes in the registration center at predetermined intervals, which are used as the registration information for the full provider service.
6. The emergency handling method for a persistent data registry according to claim 5, characterized in that, The snapshot file includes: microservice name, instance ID, registration information: provider IP and port, instance status.
7. An emergency processing device for a persistent data registry, characterized in that, The device includes, The information acquisition module is used to acquire the service registration information of the provider, randomly select any node in the registration center to register or renew the service, and synchronize the service registration information of the provider to at least two random nodes in the registration center; The registry module is used to randomly select nodes to provide external services to service gateways or applications; The self-service portal module is used to periodically obtain the full service registration information of all providers in the registration center and their timestamps for persistent storage; The monitoring center module is used to monitor each node in the registration center in real time. If it is determined that the data of any node is unavailable, the failure time is recorded and a connection is established between the service gateway and the emergency center module. The emergency center module is used to match the fault time and the timestamp in the self-service portal, load the full provider service registration information corresponding to the fault time, and replace the registration center to provide external services to the service gateway or application.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, When the processor executes the computer program, it implements the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1 to 6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Main-standby mode service deployment method and device, equipment and storage medium
CN112637335A
Multi-machine-room independent multi-activity method and system based on RPC and electronic equipment
CN112653753A