End-to-end active-active method, device, equipment, and storage medium
By loading the switching operation interface in the end-to-end active-active solution and using asynchronous calling tools to call the switching interface in parallel, the problem of low switching efficiency in the existing technology is solved, and efficient and effective end-to-end communication link switching is achieved.
Patent Information
- Application Number
- CN202011396261.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-03
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2040-12-03
AI Technical Summary
The existing end-to-end active-active solution involves many operators, resulting in low switching efficiency and failure to guarantee switching effectiveness.
By loading the end-to-end switching operation interface, generating switching strategy instructions and sending them to the asynchronous call tool, the asynchronous call tool is used to call the switching interface in parallel to switch the target application components, and the switching results are stored and displayed as a string in a preset format.
It realizes non-blocking and efficient switching of end-to-end communication links, improves switching efficiency and ensures the effectiveness of switching.
Smart Images

Figure CN112527480B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud deployment technology, and in particular to an end-to-end active-active method, apparatus, device, and storage medium. Background Art
[0002] Currently, end-to-end active-active solutions have been proposed to ensure that end-to-end communication links can quickly switch systems and implement traffic transfer in the event of a disaster, achieving fault avoidance and rapid recovery. However, common end-to-end active-active solutions are actually separate active-active solutions for each application component. Typically, different operators perform active-active operations for each application component, resulting in a large number of personnel involved, difficult management, and often requiring more time for communication and coordination.
[0003] Therefore, the existing technology has the problem of low switching efficiency and inability to ensure switching effectiveness for the end-to-end active-active solution. Summary of the Invention
[0004] In view of this, the embodiments of the present application provide an end-to-end active-active method, apparatus, device and storage medium to solve the problem in the prior art of low switching efficiency and inability to ensure switching effectiveness due to the operations involving many operators.
[0005] A first aspect of an embodiment of the present application provides an end-to-end active-active method, including:
[0006] In response to an end-to-end switching request triggered by a user, loading and displaying an end-to-end switching operation interface;
[0007] In response to an instruction carrying a switching strategy generated by a user based on the end-to-end switching operation interface, respectively sending the calling tasks corresponding to the switching strategy to the asynchronous calling tool;
[0008] Invoke the switching interfaces corresponding to the switching strategies in the asynchronous calling tool respectively, and switch target application components based on the switching interfaces respectively, where the target application components are pre-configured end-to-end active-active application components included in the switching strategy;
[0009] For any of the switching interfaces, the switching interface and the return result of calling the switching interface are spliced into a character string in a preset format for display.
[0010] In an optional implementation, before loading and displaying the end-to-end switching operation interface in response to the end-to-end switching request triggered by the user, the method further includes:
[0011] The application components of the pre-configured end-to-end communication link are active-active in the first data center and the second data center, wherein the first data center is the primary data center and the second data center is the backup data center, and both the first data center and the second data center provide data services for the application components of the end-to-end communication link.
[0012] In an optional implementation, after pre-configuring active-active configuration of each application component of the end-to-end communication link in the first data center and the second data center, the method further includes:
[0013] For any application component of the end-to-end communication link, a switching state when the data service center of the application component is switched from the first data center to the second data center is determined based on a preset switching port of the application component.
[0014] In an optional implementation, the end-to-end switching operation interface includes a first area for users to customize switching strategies and a second area for users to select switching templates; the first area includes a first selection item for users to select an application component name or a first input box for users to enter an application component name, a second selection item for users to select the switching order of each application component or a second input box for users to enter the switching order of each application component; the second area includes a third selection item for users to select a switching template name or a third input box for users to enter a switching template name.
[0015] In an optional implementation, the asynchronous call tool includes a distributed asynchronous call tool cerely; in the asynchronous call tool, the switching interfaces corresponding to the switching strategies are respectively called, and the target application components are respectively switched based on the switching interfaces, including:
[0016] The tasks of calling the switching interfaces corresponding to the switching strategies are respectively sent to the distributed asynchronous calling tool cerely, and each of the switching interfaces is respectively called in the distributed asynchronous calling tool cerely to switch each of the target application components.
[0017] In an optional implementation, after switching each target application component based on each switching interface, the method further includes:
[0018] The call results of each switching interface are stored in the distributed database redis respectively.
[0019] In an optional implementation, for any one of the switching interfaces, the switching interface and the return result of calling the switching interface are concatenated into a character string in a preset format for display, including:
[0020] Asynchronously obtaining the call results of each switching interface from the redis based on the asynchronous call tool cerely;
[0021] For any of the switching interfaces, the switching interface and the calling result of the switching interface are spliced into a character string in a preset format for display.
[0022] A second aspect of an embodiment of the present application provides an end-to-end active-active device, including:
[0023] A loading module, configured to load and display an end-to-end switching operation interface in response to an end-to-end switching request triggered by a user;
[0024] a sending module, configured to respond to an instruction carrying a switching policy generated by a user based on the end-to-end switching operation interface, and send the calling tasks corresponding to the switching policy to the asynchronous calling tool respectively;
[0025] A switching module, configured to respectively call the switching interfaces corresponding to the switching strategies in the asynchronous calling tool, and respectively switch target application components based on the respective switching interfaces, wherein the target application components are pre-configured end-to-end active-active application components included in the switching strategy;
[0026] The display module is used to splice any one of the switching interfaces and the return result of calling the switching interface into a character string in a preset format for display.
[0027] In an optional implementation, the method further includes:
[0028] A configuration module is used to pre-configure the active-active status of each application component of the end-to-end communication link in the first data center and the second data center, wherein the first data center is the primary data center and the second data center is the backup data center, and both the first data center and the second data center provide data services for each application component of the end-to-end communication link.
[0029] In an optional implementation, the method further includes:
[0030] The verification module is used to verify the switching status of any application component of the end-to-end communication link when the data service center of the application component is switched from the first data center to the second data center based on the preset switching port of the application component.
[0031] In an optional implementation, the end-to-end switching operation interface includes a first area for users to customize switching strategies and a second area for users to select switching templates; the first area includes a first selection item for users to select an application component name or a first input box for users to enter an application component name, a second selection item for users to select the switching order of each application component or a second input box for users to enter the switching order of each application component; the second area includes a third selection item for users to select a switching template name or a third input box for users to enter a switching template name.
[0032] In an optional implementation, the asynchronous call tool includes a distributed asynchronous call tool cerely; the switching module is specifically configured to:
[0033] The tasks of calling the switching interfaces corresponding to the switching strategies are respectively sent to the distributed asynchronous calling tool cerely, and each of the switching interfaces is respectively called in the distributed asynchronous calling tool cerely to switch each of the target application components.
[0034] In an optional implementation, the method further includes:
[0035] The storage module is used to store the call results of each switching interface in the distributed database redis.
[0036] In an optional implementation, the display module includes:
[0037] An acquiring unit, configured to asynchronously acquire the calling results of each switching interface from the redis based on the asynchronous calling tool cerely;
[0038] The display unit is used to combine any one of the switching interfaces and the calling result of the switching interface into a character string in a preset format for display.
[0039] A third aspect of an embodiment of the present application provides an end-to-end active-active device, comprising a memory, a processor, and a computer program stored in the memory and executable on the end-to-end active-active device. When the processor executes the computer program, the steps of the end-to-end active-active method provided in the first aspect are implemented.
[0040] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the end-to-end active-active method provided in the first aspect are implemented.
[0041] The embodiment of the present application provides an end-to-end active-active method. Compared with the prior art, the method comprises the following steps: sending the call task corresponding to the switching strategy to an asynchronous call tool; calling the switching interface corresponding to the switching strategy in the asynchronous call tool; switching the active-active application components of the end-to-end communication link based on the switching interface, and storing the switching results in an open source database; obtaining the return results of the asynchronous call tool calling the switching interface, and splicing each of the switching interfaces and the return results of calling each of the switching interfaces into a character string in a preset format for display. The method can realize the parallel sending of multiple tasks through the asynchronous call tool, and visualize the switching process of each application component in the communication link, thereby realizing non-blocking and efficient switching of the end-to-end communication link, improving the switching efficiency, and ensuring the effectiveness of the end-to-end active-active solution.
[0042] The beneficial effects provided by the second to fourth aspects of the embodiments of the present application are the same as the beneficial effects provided by the first aspect of the embodiments of the present application, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0044] Figure 1 This is a schematic diagram of the structure of the end-to-end active-active system provided by the first embodiment of the present application;
[0045] Figure 2 This is a flow chart of an end-to-end active-active method provided in the second embodiment of the present application;
[0046] Figure 3 This is a flowchart for implementing the end-to-end active-active method provided in the third embodiment of the present application;
[0047] Figure 4 This is a flowchart for implementing the end-to-end active-active method provided in the fourth embodiment of the present application;
[0048] Figure 5 This is a structural block diagram of an end-to-end active-active device provided in the fifth embodiment of the present application;
[0049] Figure 6 This is a structural block diagram of an end-to-end active-active device provided in the sixth embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0051] The application layer active-active method involved in the embodiment of the present application can be executed by an application layer active-active device, which includes but is not limited to a single server or a cloud server cluster, etc., and is not specifically limited here.
[0052] The end-to-end active-active method involved in the embodiments of the present application is applied to enterprise disaster recovery scenarios. For example, in order to provide higher-level protection for business, enterprises require that business systems continue to provide services after emergencies such as human error, malicious attacks, and natural disasters. Active-active solutions are used to ensure business continuity. End-to-end active-active refers to the provision of relevant switching solutions and systems for each application component layer involved in the entire communication link, such as the network layer, application layer, database layer, and storage layer. When a disaster occurs, the system can be quickly switched through operation to achieve traffic transfer, achieve fault avoidance, and achieve rapid recovery.
[0053] The end-to-end active-active principle and application scenarios provided by the embodiments of the present application are exemplarily described below with reference to the accompanying drawings.
[0054] like Figure 1 As shown, Figure 1 This is a schematic diagram of the structure of the end-to-end active-active system provided by the first embodiment of this application. Figure 1As can be seen, the end-to-end active-active system 100 provided in this embodiment of the present application includes a first data center 101, a second data center 102, and an end-to-end active-active device 103. For example, the first data center 101 is a pre-deployed primary data center, the second data center 102 is a pre-deployed backup data center, and the end-to-end active-active device 103 is a configured single server or server cluster. Specifically, the first data center 101 and the second data center 102 are pre-configured by application operations and maintenance personnel when the application is deployed and launched. The first data center 101 and the second data center 102 can provide services to the outside world at the same time. The first data center 101 and the second data center 102 are both connected to the end-to-end active-active device 103. The end-to-end active-active device 103 is used to send the call task corresponding to the switching strategy to the asynchronous call tool; call the switching interface corresponding to the switching strategy in the asynchronous call tool; switch the application component with faults involved in the end-to-end communication link from the first data center 101 to the second data center 102 based on the switching interface, and store the switching result in the open source database; obtain the return result of the asynchronous call tool calling the switching interface, and splice each switching interface and the return result of calling each switching interface into a preset format string for display. The asynchronous call tool can realize the parallel sending of multiple tasks and visualize the switching process of each application component in the communication link, so as to realize non-blocking and efficient switching of the end-to-end communication link, improve the switching efficiency and ensure the effectiveness of the end-to-end active-active solution.
[0055] like Figure 2 As shown, Figure 2 This is a flow chart of the end-to-end active-active method provided in the second embodiment of this application. Figure 2 The end-to-end active-active method provided in this embodiment includes S21 to S24, which are described in detail as follows:
[0056] S21 , in response to an end-to-end switching request triggered by a user, loading and displaying an end-to-end switching operation interface.
[0057] In an embodiment of the present application, a terminal user may send an end-to-end switching request to an end-to-end active-active device. After receiving the switching request, the end-to-end active-active device loads and displays an end-to-end switching operation interface.
[0058] Exemplarily, the end-to-end switching operation interface includes a first area for users to customize switching strategies and a second area for users to select switching templates; the first area includes a first selection item for users to select an application component name or a first input box for users to enter an application component name, a second selection item for users to select the switching order of each application component or a second input box for users to enter the switching order of each application component; the second area includes a third selection item for users to select a switching template name or a third input box for users to enter a switching template name.
[0059] In addition, the end-to-end switching operation interface may further include an OK button. After the user completes the custom switching strategy through the first area or completes the switching template selection through the second area, the end-to-end switching instruction can be triggered by clicking the OK button.
[0060] S22 , in response to an instruction carrying a switching strategy generated by the user based on the end-to-end switching operation interface, respectively sending the calling tasks corresponding to the switching strategy to the asynchronous calling tool.
[0061] Exemplarily, the switching strategy includes the names of the application components to be switched and the switching order of each application component. For example, the switching strategy includes the application layer and database layer of application system A, and the switching order of the application layer and the database layer is to switch the application layer first, then the database layer. The switching order of each application component can be represented by a sequence number. For example, in this embodiment, the switching order of the application layer is recorded as 1, and the switching order of the database layer is recorded as 2.
[0062] S23, calling the switching interfaces corresponding to the switching strategies in the asynchronous calling tool respectively, and switching the target application components respectively based on the switching interfaces, wherein the target application components are pre-configured end-to-end active-active application components included in the switching strategy.
[0063] Exemplarily, the asynchronous calling tool includes a distributed asynchronous calling tool cerely; in this embodiment, the switching interfaces corresponding to the switching strategies are called respectively in the asynchronous calling tool, and each target application component is switched respectively based on each switching interface, which may include: sending the task of calling the switching interface corresponding to the switching strategy to the distributed asynchronous calling tool cerely respectively, calling each switching interface respectively in the distributed asynchronous calling tool cerely, and switching each target application component respectively.
[0064] In addition, the switching interface is uniformly designed and developed through RESTful, and is an interface defined in XML format based on HTTP or JSON format based on HTTP; the switching interface is pre-encapsulated in the first data center and the second data center respectively through a preset programming language, such as Python language.
[0065] S24 , for any one of the switching interfaces, the switching interface and the return result of calling the switching interface are spliced into a character string in a preset format for display.
[0066] Exemplarily, the preset format string can be a json format string. For example, for the switching interface of the application layer, the return result is "succuess", and the switching interface of the application layer and the result returned by calling the switching interface of the application layer are concatenated into a json format string to obtain a key-value data format, such as "application layer: succuess".
[0067] Through the above analysis, it can be known that the end-to-end active-active method provided by the embodiment of the present application is achieved by sending the calling task corresponding to the switching strategy to the asynchronous calling tool; calling the switching interface corresponding to the switching strategy in the asynchronous calling tool; switching the active-active application components of the end-to-end communication link based on the switching interface, and storing the switching results in the open source database; respectively obtaining the return results of the asynchronous calling tool calling the switching interface, and splicing each of the switching interfaces and the return results of calling each of the switching interfaces into a character string in a preset format for display. The asynchronous calling tool can be used to achieve the parallel sending of multiple tasks and visualize the switching process of each application component in the communication link, which can achieve non-blocking and efficient switching of the end-to-end communication link, improve the switching efficiency, and ensure the effectiveness of the end-to-end active-active solution.
[0068] like Figure 3 As shown, Figure 3 This is a flowchart of the implementation of the end-to-end active-active method provided in the third embodiment of this application. Figure 2 Compared with the end-to-end active-active method shown in FIG, the specific implementation process of S32 to S35 is the same as that of S21 to S24, except that S31 is included before S32, and S51 and S52 are executed sequentially. The details are as follows:
[0069] S31, pre-configure the active-active configuration of each application component of the end-to-end communication link in the first data center and the second data center, wherein the first data center is the primary data center and the second data center is the backup data center, and both the first data center and the second data center provide data services for each application component of the end-to-end communication link.
[0070] For example, the first data center and the second data center can be pre-established by operations and maintenance personnel, and each of the first data center and the second data center provides data services for various application components of the end-to-end communication link. For example, the first data center and the second data center can each provide data services for application components of the end-to-end communication link, such as the application layer, network layer, database layer, and storage layer.
[0071] In addition, pre-configuring the active-active configuration of each application component of the end-to-end communication link in the first data center and the second data center may include: sending service requests to the first data center and the second data center respectively by simulating http requests or user requests separately, and determining the service status of the first data center and the second data center based on the response results returned by the first data center and the second data center; if the service status of the first data center and the second data center are normal, determining that the active-active configuration of each application component of the end-to-end communication link is completed in the first data center and the second data center; if the service status of the first data center and the second data center is abnormal, the operation and maintenance personnel are required to rebuild it until the service status of the first data center and the second data center is normal.
[0072] S32 : In response to the end-to-end switching request triggered by the user, load and display an end-to-end switching operation interface.
[0073] S33 , in response to the instruction carrying the switching strategy generated by the user based on the end-to-end switching operation interface, the calling tasks corresponding to the switching strategy are respectively sent to the asynchronous calling tool.
[0074] S34, calling the switching interfaces corresponding to the switching strategies in the asynchronous calling tool respectively, and switching the target application components respectively based on the switching interfaces, wherein the target application components are pre-configured end-to-end active-active application components included in the switching strategy.
[0075] S35 , for any one of the switching interfaces, concatenate the switching interface and the return result of calling the switching interface into a character string in a preset format for display.
[0076] From the above analysis, it can be seen that the end-to-end active-active method provided by this embodiment, compared with the existing technology, is achieved by sending the call task corresponding to the switching strategy to the asynchronous call tool; calling the switching interface corresponding to the switching strategy in the asynchronous call tool; switching the active-active application components of the end-to-end communication link based on the switching interface, and storing the switching results in the open source database; respectively obtaining the return results of the asynchronous call tool calling the switching interface, and splicing each of the switching interfaces and the return results of calling each of the switching interfaces into a character string in a preset format for display. The asynchronous call tool can be used to achieve the parallel sending of multiple tasks and visualize the switching process of each application component in the communication link, which can achieve non-blocking and efficient switching of the end-to-end communication link, improve the switching efficiency, and ensure the effectiveness of the end-to-end active-active solution.
[0077] like Figure 4 As shown, Figure 4 This is a flowchart of the implementation of the end-to-end active-active method provided in the fourth embodiment of this application. Figure 3 Compared with the end-to-end active-active method shown in FIG, the specific implementation process of S41 is the same as S31, and S43 to S46 is the same as S32 to S35. The difference is that S42 is included after S41, and S42 and S43 are executed in sequence. The details are as follows:
[0078] S41, pre-configure the active-active configuration of each application component of the end-to-end communication link in the first data center and the second data center, wherein the first data center is the primary data center and the second data center is the backup data center, and both the first data center and the second data center provide data services for each application component of the end-to-end communication link.
[0079] S42, for any application component of the end-to-end communication link, verify the switching state when the data service center of the application component is switched from the first data center to the second data center based on the preset switching port of the application component.
[0080] Exemplarily, for any application component of the end-to-end communication link, the switching status of the application component data service center when switching from the first data center to the second data center is verified based on the preset switching port of the application component, including: sending a request to access the application component to the first data center; after receiving the access status data returned by the first data center, calling the switching port of the application component; receiving the call result of calling the switching port of the application component, and determining the switching status of the application component according to the call result; if the switching status shows that the traffic of the application component is normally switched to the second data center, then the switching status of the application component data service center when switching from the first data center to the second data center is determined; if the switching status shows that the process of the application component cannot be switched to the second data center normally, then it is determined that the application component data service center cannot be switched from the first data center to the second data center normally.
[0081] In addition, when the application component data service center cannot be normally switched from the first data center to the second data center, it is necessary to re-perform the switching status verification.
[0082] S43 , in response to the end-to-end switching request triggered by the user, loading and displaying an end-to-end switching operation interface.
[0083] S44 , in response to the instruction carrying the switching strategy generated by the user based on the end-to-end switching operation interface, respectively sending the calling tasks corresponding to the switching strategy to the asynchronous calling tool.
[0084] S45 , calling the switching interfaces corresponding to the switching strategies in the asynchronous calling tool respectively, and switching the target application components respectively based on the switching interfaces, wherein the target application components are pre-configured end-to-end active-active application components included in the switching strategy.
[0085] S46: For any one of the switching interfaces, the switching interface and the return result of calling the switching interface are spliced into a character string in a preset format for display.
[0086] Compared with the existing technology, the end-to-end active-active method is achieved by sending the call task corresponding to the switching strategy to an asynchronous call tool; calling the switching interface corresponding to the switching strategy in the asynchronous call tool; switching the active-active application components of the end-to-end communication link based on the switching interface, and storing the switching results in an open source database; respectively obtaining the return results of the asynchronous call tool calling the switching interface, and splicing each of the switching interfaces and the return results of calling each of the switching interfaces into a character string in a preset format for display. The asynchronous call tool can realize the parallel sending of multiple tasks and visualize the switching process of each application component in the communication link, which can realize non-blocking and efficient switching of the end-to-end communication link, improve switching efficiency, and ensure the effectiveness of the end-to-end active-active solution.
[0087] like Figure 5 As shown, Figure 5 This is a block diagram of the structure of the end-to-end active-active device provided in the fifth embodiment of the present application. The end-to-end active-active device in this embodiment includes modules for executing Figures 2 to 4 Each step in any embodiment. Figures 2 to 4 For the convenience of explanation, only the parts related to this embodiment are shown. Figure 5 The end-to-end active-active device 50 includes:
[0088] The loading module 51 is configured to load and display an end-to-end switching operation interface in response to an end-to-end switching request triggered by a user.
[0089] The sending module 52 is configured to send the calling tasks corresponding to the switching strategies to the asynchronous calling tool in response to the instructions carrying the switching strategies generated by the user based on the end-to-end switching operation interface.
[0090] The switching module 53 is used to call the switching interface corresponding to the switching strategy in the asynchronous call tool respectively, and switch each target application component based on each switching interface. The target application component is a pre-configured end-to-end active-active application component included in the switching strategy.
[0091] The display module 54 is configured to combine any one of the switching interfaces and the return result of calling the switching interface into a character string in a preset format for display.
[0092] In an optional implementation, the method further includes:
[0093] A configuration module is used to pre-configure the active-active status of each application component of the end-to-end communication link in the first data center and the second data center, wherein the first data center is the primary data center and the second data center is the backup data center, and both the first data center and the second data center provide data services for each application component of the end-to-end communication link.
[0094] In an optional implementation, the method further includes:
[0095] The verification module is used to verify the switching status of any application component of the end-to-end communication link when the data service center of the application component is switched from the first data center to the second data center based on the preset switching port of the application component.
[0096] In an optional implementation, the end-to-end switching operation interface includes a first area for users to customize switching strategies and a second area for users to select switching templates; the first area includes a first selection item for users to select an application component name or a first input box for users to enter an application component name, a second selection item for users to select the switching order of each application component or a second input box for users to enter the switching order of each application component; the second area includes a third selection item for users to select a switching template name or a third input box for users to enter a switching template name.
[0097] In an optional implementation, the asynchronous call tool includes a distributed asynchronous call tool cerely; the switching module 53 is specifically configured to:
[0098] The tasks of calling the switching interfaces corresponding to the switching strategies are respectively sent to the distributed asynchronous calling tool cerely, and each of the switching interfaces is respectively called in the distributed asynchronous calling tool cerely to switch each of the target application components.
[0099] In an optional implementation, the method further includes:
[0100] The storage module is used to store the call results of each switching interface in the distributed database redis.
[0101] In an optional implementation, the display module 54 includes:
[0102] An acquiring unit, configured to asynchronously acquire the calling results of each switching interface from the redis based on the asynchronous calling tool cerely;
[0103] The display unit is used to combine any one of the switching interfaces and the calling result of the switching interface into a character string in a preset format for display.
[0104] It should be understood that Figure 5 In the structural block diagram of the end-to-end active-active device 50 shown, each module is used to execute Figures 2 to 5 Each step in any embodiment, and for Figures 2 to 5 Each step in the corresponding embodiment has been explained in detail in the above embodiment. Figures 2 to 5 The relevant descriptions in the corresponding embodiments will not be repeated here.
[0105] Figure 6 This is a structural block diagram of an end-to-end active-active device provided in the sixth embodiment of this application. Figure 6 As shown, the end-to-end active-active device 60 of this embodiment includes: a processor 61, a memory 62, and a computer program 63 stored in the memory 62 and executable on the processor 61, such as an end-to-end active-active program. When the processor 61 executes the computer program 63, the steps in each embodiment of the above-mentioned end-to-end active-active method are implemented, such as Figure 2 Alternatively, the processor 61 executes the computer program 63 to implement the above Figure 5 The functions of each module or unit in the corresponding embodiment are, for example, Figure 5 For details on the functions of modules 51 to 54, please refer to Figure 5 The relevant descriptions in the corresponding embodiments are not repeated here.
[0106] Exemplarily, the computer program 63 may be divided into one or more units, which are stored in the memory 62 and executed by the processor 61 to complete the present application. The one or more units may be a series of computer program instruction segments that can perform specific functions, and the instruction segments are used to describe the execution process of the computer program 63 in the end-to-end active-active device 60. For example, the computer program 63 may be divided into a loading module, a sending module, a switching module, and a display module; the specific functions of each module are as follows: Figure 5 As stated.
[0107] The end-to-end active-active device may include, but is not limited to, a processor 61 and a memory 62. Those skilled in the art will appreciate that Figure 6 It is merely an example of the end-to-end active-active device 60 and does not constitute a limitation of the end-to-end active-active device 60. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the turntable device may also include input and output devices, network access devices, buses, etc.
[0108] The processor 61 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0109] The memory 62 can be an internal storage unit of the end-to-end active-active device 60, such as a hard disk or memory of the end-to-end active-active device 60. The memory 62 can also be an external storage device of the end-to-end active-active device 60, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the end-to-end active-active device 60. Furthermore, the memory 62 can also include both an internal storage unit of the end-to-end active-active device 60 and an external storage device. The memory 62 is used to store the computer program and other programs and data required by the end-to-end active-active device 60. The memory 62 can also be used to temporarily store data that has been output or is about to be output.
[0110] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. An end-to-end active-active method, characterized in that: Applied to an end-to-end active-active device, the end-to-end active-active device is communicatively connected to a first data center and a second data center; the end-to-end active-active method includes: Pre-configure active-active configuration of each application component of the end-to-end communication link in the first data center and the second data center, wherein the first data center is a primary data center and the second data center is a backup data center, and both the first data center and the second data center provide data services for each application component of the end-to-end communication link; In response to an end-to-end switching request triggered by a user, loading and displaying an end-to-end switching operation interface; In response to an instruction carrying a switching strategy generated by a user based on the end-to-end switching operation interface, respectively sending the calling tasks corresponding to the switching strategy to the asynchronous calling tool; Invoke the switching interfaces corresponding to the switching strategies in the asynchronous call tool, and switch target application components of the end-to-end communication link based on the switching interfaces, wherein the target application components are pre-configured end-to-end active-active application components included in the switching strategy; and the target application components include at least one application component of the end-to-end communication link. For any of the switching interfaces, the switching interface and the return result of calling the switching interface are spliced into a character string in a preset format for display; The pre-configured end-to-end communication link is configured to be active-active in the first data center and the second data center, including: Sending service requests to the first data center and the second data center respectively by simulating HTTP requests or user requests, and determining the service status of the first data center and the second data center according to the response results returned by the first data center and the second data center; If the service status of the first data center and the second data center are both normal, it is determined that each application component of the end-to-end communication link is configured to be active-active in the first data center and the second data center.
2. The method according to claim 1, wherein After pre-configuring the active-active configuration of each application component of the end-to-end communication link in the first data center and the second data center, the following steps are also included: For any application component of the end-to-end communication link, a switching state when the application component data service center is switched from the first data center to the second data center is verified based on a preset switching port of the application component.
3. The method according to any one of claims 1 to 2, characterized in that The end-to-end switching operation interface includes a first area for users to customize switching strategies and a second area for users to select switching templates; the first area includes a first selection item for users to select an application component name or a first input box for users to enter an application component name, a second selection item for users to select the switching order of each application component or a second input box for users to enter the switching order of each application component; the second area includes a third selection item for users to select a switching template name or a third input box for users to enter a switching template name.
4. The method according to claim 3, wherein The asynchronous call tool includes a distributed asynchronous call tool cerely; in the asynchronous call tool, the switching interfaces corresponding to the switching strategies are respectively called, and each target application component is switched based on each switching interface, including: The tasks of calling the switching interfaces corresponding to the switching strategies are respectively sent to the distributed asynchronous calling tool cerely, and each of the switching interfaces is respectively called in the distributed asynchronous calling tool cerely to switch each of the target application components.
5. The method according to claim 4, wherein After switching each target application component based on each switching interface, the method further includes: The call results of each switching interface are stored in the distributed database redis respectively.
6. The method according to claim 4 or 5, characterized in that For any of the switching interfaces, the switching interface and the return result of calling the switching interface are spliced into a character string in a preset format for display, including: Asynchronously obtain the call results of each switching interface from redis based on the asynchronous call tool cerely; For any of the switching interfaces, the switching interface and the calling result of the switching interface are spliced into a character string in a preset format for display.
7. An end-to-end active-active device, characterized in that: include: A configuration module, configured to pre-configure active-active configuration of each application component of an end-to-end communication link in a first data center and a second data center, wherein the first data center is a primary data center, the second data center is a backup data center, and both the first data center and the second data center provide data services for each application component of the end-to-end communication link; A loading module, configured to load and display an end-to-end switching operation interface in response to an end-to-end switching request triggered by a user; a sending module, configured to respond to an instruction carrying a switching policy generated by a user based on the end-to-end switching operation interface, and send the calling tasks corresponding to the switching policy to the asynchronous calling tool respectively; a switching module, configured to respectively call the switching interfaces corresponding to the switching strategies in the asynchronous call tool, and respectively switch target application components of the end-to-end communication link based on the respective switching interfaces, wherein the target application components are pre-configured end-to-end active-active application components included in the switching strategy; and the target application components include at least one application component of the end-to-end communication link; A display module is used to splice any one of the switching interfaces and the return result of calling the switching interface into a character string in a preset format for display; The pre-configured end-to-end communication link is configured to be active-active in the first data center and the second data center, including: Sending service requests to the first data center and the second data center respectively by simulating HTTP requests or user requests, and determining the service status of the first data center and the second data center according to the response results returned by the first data center and the second data center; If the service status of the first data center and the second data center are both normal, it is determined that each application component of the end-to-end communication link is configured to be active-active in the first data center and the second data center.
8. An end-to-end active-active device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Control method and system for achieving host and backup switching of disaster backup system
CN104461789A
Database online hot backup method and devic
CN111324617A