A method, device and equipment for fault domain switching
Through the automated fault domain switching method, responding to fault domain switching requests, determining the switching mode and obtaining parameter information, timely fault domain switching for multiple applications is realized, solving the problem of low emergency switching efficiency in the existing technology, and improving the reliability of the application sex.
Patent Information
- Application Number
- CN202110300387.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-22
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2041-03-22
AI Technical Summary
The prior art cannot promptly perform emergency handover of fault domains for multiple applications, affecting the reliability of the application.
Provide a fault domain switching method, which determines the switching mode of the target application by responding to the target fault domain switching request, obtains the parameter information set and execution parameters of the object to be switched, and performs fault domain isolation or recovery based on the switching mode and parameters to achieve automated Fault domain switching.
Timely and efficient fault domain switching during emergency handover is achieved, ensuring application reliability and reducing the need for manual configuration and adjustment.
Smart Images

Figure CN113032189B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of artificial intelligence technology, and more particularly to a fault domain switching method, device and equipment. Background Art
[0002] For active-active or active-active applications, different applications in the prior art need to customize the corresponding fault domain switching process according to their own characteristics, so that the fault domain switching processes of different applications will be different, and manual configuration and adjustment of the switching process are required when performing fault domain switching. If multiple applications need to perform emergency switching at the same time, the technical solutions in the prior art cannot perform emergency switching of the fault domain in time to ensure the reliability of the application.
[0003] To address the above problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of this specification provide a fault domain switching method, apparatus and device to solve the problem of timely emergency switching of fault domains to ensure the reliability of applications in the prior art.
[0005] An embodiment of the present specification provides a fault domain switching method, comprising: in response to a target fault domain switching request, determining a target switching mode corresponding to a target application; obtaining a parameter information set of an object to be switched of the target application; obtaining an execution parameter of the target application; wherein the execution parameter is used to characterize the type of fault domain switching; based on the target switching mode, performing fault domain switching on the target application according to the parameter information set and the execution parameter; wherein the fault domain switching includes isolating or recovering the fault domain corresponding to the object to be switched.
[0006] An embodiment of the present specification also provides a fault domain switching device, including: a determination module, used to determine a target switching mode corresponding to a target application in response to a target fault domain switching request; a first acquisition module, used to obtain a parameter information set of an object to be switched of the target application; a second acquisition module, used to obtain execution parameters of the target application; wherein the execution parameters are used to characterize the fault domain switching type; a switching module, used to perform fault domain switching on the target application based on the target switching mode according to the parameter information set and the execution parameters; wherein the fault domain switching includes isolating or recovering the fault domain corresponding to the object to be switched.
[0007] The embodiment of the present specification also provides a fault domain switching device, including a processor and a memory for storing instructions executable by the processor, and the processor implements the steps of the fault domain switching method when executing the instructions.
[0008] The embodiment of the present specification also provides a computer-readable storage medium on which computer instructions are stored, and when the instructions are executed, the steps of the fault domain switching method are implemented.
[0009] The embodiments of this specification provide a fault domain switching method, which can determine the target switching mode corresponding to the target application in response to the target fault domain switching request. After determining the target switching mode corresponding to the target application, the parameter information set of the object to be switched of the target application and the execution parameters used to characterize the fault domain switching type of the target application can be obtained without manual configuration and adjustment. Furthermore, based on the target switching mode, the target application can be fault domain switched according to the parameter information set and the execution parameters, wherein the fault domain switching includes isolating or restoring the fault domain corresponding to the object to be switched. Therefore, when it is determined that the target application needs to be switched in an emergency, the fault domain switching can be performed in a timely and efficient manner to ensure the reliability of the application. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The drawings described herein are used to provide a further understanding of the embodiments of this specification, constitute a part of the embodiments of this specification, and do not constitute a limitation of the embodiments of this specification. In the drawings:
[0011] Figure 1 It is a schematic diagram of the steps of the fault domain switching method provided in the embodiment of this specification;
[0012] Figure 2 is a schematic diagram of a network load balancing mode provided according to an embodiment of this specification;
[0013] Figure 3 It is a schematic diagram of the application cloud start-stop container mode provided according to an embodiment of this specification;
[0014] Figure 4 is a schematic diagram of a dynamic variable adjustment mode of a configuration center provided according to an embodiment of this specification;
[0015] Figure 5 is a schematic diagram of a custom strategy mode provided according to an embodiment of this specification;
[0016] Figure 6 is a schematic diagram of the structure of a fault domain switching device provided according to an embodiment of this specification;
[0017] Figure 7 It is a structural diagram of a fault domain switching device provided according to an embodiment of this specification. DETAILED DESCRIPTION
[0018] The principles and spirit of the embodiments of this specification will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the embodiments of this specification, and are not intended to limit the scope of the embodiments of this specification in any way. On the contrary, these embodiments are provided to make the disclosure of the embodiments of this specification more thorough and complete, and to fully convey the scope of the disclosure to those skilled in the art.
[0019] Those skilled in the art know that the implementation of the embodiments of this specification can be implemented as a system, device, method or computer program product. Therefore, the embodiments disclosed in this specification can be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0020] Although the processes described below include multiple operations that occur in a particular order, it should be clear that these processes may include more or fewer operations, which may be performed sequentially or in parallel (eg, using parallel processors or a multi-threaded environment).
[0021] See also Figure 1 This embodiment can provide a fault domain switching method. The fault domain switching method can be used to efficiently perform emergency switching on a target application. The above fault domain switching method can include the following steps.
[0022] S101: In response to a target fault domain switching request, determine a target switching mode corresponding to a target application.
[0023] In this embodiment, the target switching mode corresponding to the target application can be determined in response to the target fault domain switching request. The target fault domain switching request can be initiated for the target application, and the target fault domain switching request can include information about the target application, information about the fault domain to be switched, etc. The specific information can be determined according to actual conditions, and this embodiment of the specification does not limit this.
[0024] In this embodiment, the switching modes of various applications can be centralized and managed in the same switching platform, and the target fault domain switching request can be responded to by the server of the switching platform. The server of the switching platform can be a single server or a server cluster. Of course, the function of the server can also be realized by cloud computing technology. The specific can be determined according to the actual situation, and the embodiments of this specification do not limit this.
[0025] In this embodiment, the above-mentioned target fault domain switching request can be initiated by the user by triggering a preset button in the switching platform, or it can be automatically triggered when the server scans and detects that a fault domain needs to be switched according to a preset time interval. The specific details can be determined based on actual conditions, and the embodiments of this specification do not limit this.
[0026] In this embodiment, the target application may be an application that needs to be switched to a fault domain. In some embodiments, since the same business product may include multiple related applications, multiple related applications need to be switched to a fault domain during emergency switching. Therefore, the target application may be one or more. In the case where there are multiple target applications, the target switching mode corresponding to each target application may be determined in parallel, and the fault domain switching may be performed, so that multiple applications included in the same business product may be efficiently switched to a fault domain at the same time.
[0027] In this embodiment, due to the differences in the architectures of different applications, the technical solutions adopted, etc., different switching modes are applicable to different applications, and the switching mode can be used to characterize the steps of the application to perform fault domain switching. Therefore, the target switching mode corresponding to the target application can be determined first. Among them, the target switching mode can include the specific process steps of the fault domain switching under the switching mode, and of course it can be understood that it can also include other information, such as: parameters that need to be configured, etc., which can be determined specifically according to actual conditions, and this specification embodiment does not limit this.
[0028] S102: Acquire a parameter information set of an object to be switched of a target application.
[0029] In this embodiment, a parameter information set of the object to be switched of the target application may be obtained. The object to be switched may be an address, a port number, etc. of the fault domain to be switched, and the fault domain to be switched may be one or more. The parameter information set may be used to characterize the object to be switched, and the parameter information set may include at least one value of a relevant parameter characterizing the object to be switched.
[0030] In this embodiment, since different applications may have differences in architecture, technical solutions, basic environment, etc., the parameter information contained in the parameter information set of the object to be switched that needs to be obtained in different switching modes may also be different. Therefore, in some embodiments, the parameter information set of the object to be switched of the target application can be obtained based on the target switching mode.
[0031] In this embodiment, the method of obtaining the parameter information set of the object to be switched of the target application may include: obtaining it from a preset database, or receiving the parameter information set of the object to be switched input by the user. Of course, it can be understood that other possible methods can also be used to obtain the parameter information set of the object to be switched, for example, searching for the parameter information set of the object to be switched in a web page according to certain search conditions. The specific method can be determined according to the actual situation, and the embodiment of this specification does not limit this.
[0032] S103: Acquire execution parameters of the target application; wherein the execution parameters are used to characterize the fault domain switching type.
[0033] In this implementation, in order to determine the specific type of fault switching, the execution parameters of the target application can be obtained, and the above execution parameters can be used to characterize the fault domain switching type, specifically, whether to perform fault domain isolation or fault domain recovery. The above execution parameters can be two values, isolation and recovery, and can also be represented by characters, codes, pictures, etc., which can be determined according to actual conditions, and this specification embodiment does not limit this.
[0034] In this implementation, fault domain isolation can be used to indicate that an abnormality has occurred in the fault domain and needs to be isolated, and fault domain recovery can be used normally after the abnormality has been recovered. For example, the target application includes fault domain 1, fault domain 2, fault domain 3, and fault domain 4. When an abnormality occurs in fault domain 4, fault domain 4 can be isolated so that subsequent incremental transactions will no longer flow to fault domain 4, that is, the available fault domains 1, 2, 3, and 4 of the target application are switched to fault domain 1, 2, and 3.
[0035] In this embodiment, the parameter information set of the object to be switched and the execution parameters of the target application can be obtained in parallel, or the parameter information set of the object to be switched can be obtained first and then the execution parameters of the target application can be obtained, or the execution parameters of the target application can be obtained first and then the parameter information set of the object to be switched can be obtained. The specific method can be determined according to actual conditions, and the embodiments of this specification do not limit this.
[0036] In this embodiment, the method of obtaining the execution parameters of the target application may include: obtaining from a preset database, or receiving the execution parameters of the target application input by a user. Of course, it is understandable that other possible methods may be used to obtain the execution parameters of the target application, for example, searching for the execution parameters of the target application in a web page according to certain search conditions. The specific method may be determined according to actual conditions, and this embodiment of the specification does not limit this.
[0037] S104: Based on the target switching mode, perform fault domain switching on the target application according to the parameter information set and the execution parameters; wherein the fault domain switching includes isolating or recovering the fault domain corresponding to the object to be switched.
[0038] In this embodiment, since the target switching mode includes the specific process steps for the target application to perform fault domain switching, the target application can be fault domain switched based on the target switching mode according to the parameter information set and the execution parameters, wherein the fault domain switching includes isolating or recovering the fault domain corresponding to the object to be switched.
[0039] In this embodiment, hosts / containers that may fail at the same time can be grouped by creating a fault domain and assigning one or more hosts / containers to it, and the failures of all hosts / containers in a single fault domain will be regarded as the same failure. The above-mentioned fault domain switching may include: isolation of the fault domain and recovery of the fault domain, and the specific switching type can be determined according to the execution parameters.
[0040] In this embodiment, after the fault domain switching is performed, the result of the fault domain switching can be fed back so that the fault domain switching can be performed again in time if the fault domain switching is unsuccessful. The result of the fault domain switching can be displayed in a visual manner on the interface corresponding to the switching platform, or can be sent to the maintenance personnel corresponding to the target application in the form of a file. The specific results can be determined according to the actual situation, and this embodiment of the specification does not limit this.
[0041] From the above description, it can be seen that the embodiments of this specification achieve the following technical effects: the target switching mode corresponding to the target application can be determined in response to the target fault domain switching request. After determining the target switching mode corresponding to the target application, the parameter information set of the target application's object to be switched and the execution parameters used to characterize the fault domain switching type of the target application can be obtained without manual configuration and adjustment. Furthermore, based on the target switching mode, the target application can be switched to a fault domain according to the parameter information set and the execution parameters, so that when it is determined that the target application needs to be switched in an emergency, the fault domain switching can be performed in a timely and efficient manner to ensure the reliability of the application.
[0042] In one embodiment, before determining the target switching mode corresponding to the target application, the method may further include: obtaining characteristic parameters of the target application; wherein the characteristic parameters include: the technical architecture, technical solution, and basic environment of the target application; the target switching mode applicable to the target application may be determined according to the characteristic parameters, and an association relationship between the target application and the target switching mode may be established. Furthermore, the association relationship between the target application and the target switching mode may be stored in a target database.
[0043] In this embodiment, in order to conveniently and timely call the switching mode corresponding to each application, corresponding standard switching modes can be established in advance for different types of applications. The target switching mode applicable to the target application can be determined according to the technical architecture, technical solution, basic environment, etc. of the target application. For different technical architectures, technical solutions, and basic environments, the switching mode can be divided into four types, which may include: network load balancing mode, application cloud start-stop container mode, configuration center dynamic variable adjustment, and custom strategy mode. These four standard switching modes can be configured in the switching platform in advance so that the association relationship between the switching modes of each application can be established later.
[0044] In this embodiment, the association relationship between the target application and the target switching mode can be stored in the target database so that it can be obtained in time when emergency switching is required. Correspondingly, the target switching mode corresponding to the target application can be determined according to the association relationship between the target application and the target switching mode.
[0045] In this embodiment, the target database may be a database for storing data in the switching platform, and the association between the target application and the target switching mode may be stored in the form of a key-value pair. Of course, it is understandable that it may also be stored in other possible forms, which may be determined according to actual conditions, and the embodiments of this specification do not limit this.
[0046] In one embodiment, when the target switching mode is a network load balancing mode, the parameter information set of the object to be switched may include at least: the IP address and port number of the fault domain to be switched. Correspondingly, based on the target switching mode, the fault domain of the target application is switched according to the parameter information set and the execution parameters, which may include: when the execution parameter is isolation, isolating the IP address or the load balancing software address corresponding to the IP address according to the parameter information set. When it is determined that there is a load balancing long connection in the fault domain to be switched, the load balancing long connection is terminated. Further, the load balancing policy of the target application can be updated.
[0047] In this embodiment, when the target switching mode is the network load balancing mode, the parameter information set of the object to be switched may include the address information of the load balancing, and specifically may include the IP address (Internet Protocol Address) and port number of the server in the fault domain to be switched. The above IP address and port number may be the IP address and port number of one or more servers. When a server in a fault domain fails, the entire fault domain needs to be isolated. Therefore, the fault domain to be switched can be uniquely determined based on the IP address and port number. Among them, the port number is commonly used in computer network applications and is used for links between network devices.
[0048] In this embodiment, the execution parameters may include isolation and recovery. When the execution parameter is isolation, it means that the fault domain represented by the parameter information set has an abnormality and needs to be isolated, and the fault domain can be switched according to the process configured in the network load balancing mode.
[0049] In this embodiment, the IP address or the load balancing software address (F5 address) corresponding to the IP address can be isolated according to the above parameter information set, so that subsequent incremental transactions will not flow to the fault domain corresponding to the parameter information set. At the same time, it can be determined whether the object to be switched has a load balancing long connection, and if it is determined that it exists, the load balancing long connection can be terminated.
[0050] In this embodiment, a long connection means that multiple data packets can be sent continuously on a connection, and then the connection is disconnected. During the connection maintenance period, if no data packet is sent, both parties need to send a link detection packet. A short connection means that when the two communicating parties have data exchange, a connection is established. After the data is sent, the connection is disconnected, that is, each connection only completes the sending of one business. The above-mentioned object to be switched can be the fault domain to be switched, and the above-mentioned incremental transaction refers to the transaction processing request generated after the fault domain switching is completed.
[0051] In this embodiment, the network load balancing mode can be as follows: Figure 2 As shown in , the smart DNS (GTM) can be a network load balancing management platform, and the switching platform can pass the network load balancing mode to the network load balancing management platform through an interface call. The network load balancing management platform can isolate the IP address or the load balancing software address corresponding to the IP address according to the granularity of the server IP address and port. Figure 2 In the figure, IP1 and IP2 are load balancing address VS1 and load balancing address VS2 respectively. Each fault domain can include at least one Web server (network server) and at least one APP server (application server).
[0052] In this embodiment, the above-mentioned DNS (Domain Name System) is a system on the Internet for solving the naming of online machines. It is a distributed database that maps domain names and IP addresses to each other, enabling people to access the Internet more conveniently. The above-mentioned GTM is global traffic management.
[0053] In this embodiment, Figure 2The cross in the middle indicates that fault domain 4 is isolated. Subsequent application transaction requests will only flow to fault domains 1, 2, and 3, and no longer flow to fault domain 4. To ensure that incremental transactions do not flow to fault domain 4, the load balancing policy in the load balancing (LTM / SLB) can be updated. The updated load balancing policy does not include fault domain 4. It is understandable that Figure 2 The figure is only an example. In actual application, more fault domains may be included, and more fault domains may be isolated. For example, the entire B park may be isolated. The specific details may be determined based on actual conditions, and the embodiments of this specification do not limit this.
[0054] In one embodiment, based on the target switching mode, the target application is switched to a fault domain according to the parameter information set and the execution parameter, and it may also include: when the execution parameter is recovery, the IP address of the object to be switched or the load balancing software address corresponding to the IP address is restored according to the parameter information set. When it is determined that the object to be switched has a load balancing long connection, the load balancing long connection is reestablished. Further, the load balancing strategy of the target application may be updated.
[0055] In this embodiment, when the execution parameter is recovery, it means that the previously isolated fault domain has returned to normal and can be re-enabled to process transaction requests. Therefore, the IP address or the load balancing software address corresponding to the IP address can be restored so that the incremental transaction can flow to the fault domain corresponding to the parameter information set.
[0056] In this embodiment, it can be determined whether there is a terminated load balancing long connection before the object to be switched. If it is determined that there is, the load balancing long connection can be reestablished. Further, the load balancing strategy of the target application can be updated according to the above parameter information set. For example, the transaction request can be evenly transferred to fault domain 1, fault domain 2 and fault domain 3. It can be updated to transfer the transaction request evenly to fault domain 1, fault domain 2, fault domain 3 and fault domain 4. The specific can be determined according to the actual situation, and the embodiments of this specification are not limited to this.
[0057] In one embodiment, after the target application is switched to a fault domain based on the target switching mode and the parameter information set and the execution parameter, the method may further include: obtaining the load balancing strategy in use and storing the load balancing strategy in use in the target database. Furthermore, the load balancing strategy in use may be scanned at a preset time interval to update the load balancing address and port number.
[0058] In this embodiment, the validity of the parameter configuration can be verified by a parameter health check. Specifically, the network load balancing management platform can be called to scan the user configuration at a preset time interval to check whether the IP address and port number of the object to be switched exist.
[0059] In this embodiment, the parameters can be automatically updated at preset time intervals to achieve self-discovery and automatic preservation of the parameters. The load balancing strategy in use can be obtained and stored in the target database. In some embodiments, the load balancing strategy in use can be obtained and stored according to the service group environment information of the target application configured by the user.
[0060] In this embodiment, the network load balancing management platform can be called at a preset time interval to scan the load balancing strategy in use to update the load balancing address and port number, wherein the preset time interval can be 10 minutes, 1 hour, or 1 day, and can be determined according to actual conditions, and this specification embodiment does not limit this. Compared with the technical solution in the prior art that requires manual synchronization adjustment of the switching process one by one when the application version or production environment information changes, this specification embodiment can realize the automatic update of parameters more conveniently and efficiently, saving labor costs.
[0061] In one embodiment, when the target switching mode is the application cloud start-stop container mode, the parameter information set of the object to be switched may include at least: the name, version number and group of the container to be switched. Correspondingly, based on the target switching mode, the fault domain switching of the target application is performed according to the parameter information set and the execution parameters, which may include: when the execution parameter is isolation, determining whether there is business processing in the container to be switched. When it is determined that there is no business processing in the container to be switched, the container to be switched can be isolated according to the parameter information set. When it is determined that there is business processing in the container to be switched, the container to be switched can be isolated according to the parameter information set after waiting for a preset time. Furthermore, the load balancing policy of the target application can be updated according to the parameter information set.
[0062] In this embodiment, when the target switching mode is the application cloud start-stop container mode, it means that the fault domain of the target application is composed of PAAS containers. Among them, PAAS (Platform-as-a-Service) refers to the platform for software development as a service. The container cloud platform is a containerized implementation of the lightweight PAAS platform and is a cloud computing platform built using containers, container scheduling and orchestration, and distributed technologies.
[0063] In this implementation, before isolating the container to be switched, it can be determined whether the container to be switched has any business processing. If there is any business being processed, the container to be switched can be isolated according to the parameter information set after waiting for a preset time. The preset time can be a data greater than 0, such as 30s, 10 seconds, etc., which can be determined according to actual conditions and is not limited in this embodiment of the specification.
[0064] In this embodiment, the application cloud start-stop container mode can be as follows Figure 3 As shown in , DSF is a distributed service framework and SLB is a load balancing. The switching platform can pass the application cloud start and stop container mode to the application cloud platform through an interface call. The application cloud platform can isolate the PAAS container in fault domain 4 according to the name, version number, and group granularity of the PAAS container. Figure 3 Each fault domain can contain at least one PAAS container. Figure 3 The cross in the middle indicates that fault domain 4 is isolated, and subsequent application transaction requests will only flow to fault domain 1, fault domain 2, and fault domain 3, and no longer flow to fault domain 4. In order to ensure that incremental transactions do not flow to fault domain 4, the load balancing policy in DSF / SLB can be updated to evenly transfer transaction requests to fault domain 1, fault domain 2, fault domain 3, and fault domain 4. It can be understood that Figure 3 The figure is only an example. In actual application, more fault domains may be included, and more fault domains may be isolated. For example, the entire B park may be isolated. The specific details may be determined based on actual conditions, and the embodiments of this specification do not limit this.
[0065] In one embodiment, based on the target switching mode, the target application is switched to a fault domain according to the parameter information set and the execution parameter, and may also include: when the execution parameter is recovery, starting the container to be switched according to the parameter information set. Further, the load balancing strategy of the target application may be updated according to the parameter information set.
[0066] In this embodiment, when the above execution parameter is recovery, it means that the previously isolated fault domain has returned to normal and can be re-enabled to process transaction requests. Therefore, the container to be switched can be restarted so that the incremental transaction can flow to the fault domain corresponding to the parameter information set. Further, the load balancing strategy of the target application can be updated through the routing layer according to the above parameter information set. For example, the transaction request can be evenly transferred to fault domain 1, fault domain 2 and fault domain 3. It can be updated to evenly transfer the transaction request to fault domain 1, fault domain 2, fault domain 3 and fault domain 4. The specific can be determined according to the actual situation, and the embodiments of this specification are not limited to this.
[0067] In one embodiment, after the target application is switched to a fault domain based on the target switching mode and the parameter information set and the execution parameter, the method may further include: scanning the running container corresponding to the target application at a preset time interval to obtain the name and version number of the running container. Further, the parameter configuration may be updated according to the name and version number of the running container.
[0068] In this embodiment, the validity of the parameter configuration can be verified by a parameter health check. Specifically, the application cloud management platform can be called to scan the user configuration at a preset time interval to check whether the name and version number of the object to be switched exist.
[0069] In this embodiment, the parameters can be automatically updated at preset time intervals to achieve self-discovery and automatic preservation of the parameters. The running container corresponding to the target application is scanned at preset time intervals to obtain the name and version number of the running container, and the latest acquired data is stored in the target database.
[0070] In this embodiment, the parameter configuration is updated according to the name and version number of the running container to ensure the validity of the parameters. Among them, the above-mentioned preset time interval can be 10 minutes, 1 hour, or 1 day, which can be determined according to the actual situation, and the embodiments of this specification do not limit this. Compared with the technical solution in the prior art that requires manual synchronization adjustment of the switching process one by one when the application version or production environment information changes, the embodiments of this specification can realize the automatic update of parameters more conveniently and efficiently, saving labor costs.
[0071] In one embodiment, when the target switching mode is the configuration center dynamic variable adjustment mode, the parameter information set of the object to be switched may include at least: the name of the target parameter, and the execution parameter is the value of the target parameter. Correspondingly, based on the target switching mode, performing fault domain switching on the target application according to the parameter information set and the execution parameter may include: updating the target parameter according to the execution parameter based on the parameter information set. Further, the processing flow of the incremental transaction may be adjusted according to the updated target parameter.
[0072] In this implementation, the target parameter can be used to switch the fault domain, and the target parameter can be used to characterize the object to be modified. For example, the target parameter name used normally in fault domain 4 is A, and the value is 1; when a fault occurs, the value of A can be adjusted to 2, so that fault domain 4 can be isolated and subsequent transactions will no longer flow to fault domain 4.
[0073] In this embodiment, the value of the above target parameter can be used to characterize the type of fault domain switching, for example, a target parameter A value of 1 indicates recovery, and a target parameter A value of 2 indicates isolation. The specific value can be determined according to actual conditions, and this embodiment of the specification does not limit this.
[0074] In this embodiment, the configuration center dynamic variable adjustment mode can be as follows Figure 4As shown in , the switching platform can transfer the configuration center dynamic variable adjustment mode to the configuration center management platform (CMC dynamic variable) through the interface call. The configuration center management platform uses the value of the target parameter to update the target parameter (if the parameter does not exist, a new parameter is added) and publishes the parameter to complete the hot effect. Figure 4 Each fault domain can contain at least one Web server (network server) and at least one APP server (application server). Figure 4 The cross in the middle indicates that fault domain 4 is isolated, and the check mark indicates that the target parameter is successfully updated from YYY to ZZZ. Subsequent application transaction requests will only flow to fault domains 1, 2, and 3, and no longer flow to fault domain 4. In order to ensure that incremental transactions are no longer transferred to fault domain 4, the processing flow of incremental transactions can be updated and adjusted. The transaction requests can be evenly transferred to fault domains 1, 2, 3, and 4, and adjusted to evenly transfer transaction requests to fault domains 1, 2, and 3.
[0075] In one embodiment, when the target switching mode is a custom policy mode, the parameter information set of the object to be switched may include at least: a custom process policy name. Correspondingly, based on the target switching mode, performing fault domain switching on the target application according to the parameter information set and the execution parameters may include: obtaining a configuration script corresponding to the custom process policy name according to the custom process policy name. Further, the configuration script may be used to perform fault domain switching on the target application based on the execution parameters.
[0076] In this embodiment, due to the particularity of some applications, the above three switching modes cannot be used for fault domain switching, and targeted configuration is required. Therefore, custom process strategies can be formulated for these applications, and corresponding configuration scripts can be written. Different custom process strategies can have different nouns for easy identification. Therefore, the configuration script corresponding to the custom process policy name can be obtained according to the custom process policy name, so that fault domain switching can be achieved by running the configuration script. In some embodiments, the execution parameter can be in the written configuration script, and there is no need to obtain it separately. The specific parameters can be determined according to the actual situation, and the embodiments of this specification do not limit this.
[0077] In this embodiment, the custom strategy pattern can be as follows Figure 5 As shown in , the switching platform can pass the custom policy mode of the configuration center to the open platform application version automatic installation management platform through interface calls. The application version automatic installation management platform can call the corresponding configuration script according to the custom process policy name and run the configuration script to achieve fault domain switching. Figure 5Each fault domain can contain at least one Web server (network server) and at least one APP server (application server). Figure 5 The cross in the middle indicates that fault domain 4 is isolated, and subsequent application transaction requests will only flow to fault domain 1, fault domain 2, and fault domain 3, and no longer flow to fault domain 4. In order to ensure that incremental transactions are no longer transferred to fault domain 4, the processing flow of incremental transactions can be adjusted, and the transaction requests can be evenly transferred to fault domain 1, fault domain 2, fault domain 3, and fault domain 4. Adjustment can be made to evenly transfer transaction requests to fault domain 1, fault domain 2, and fault domain 3.
[0078] In this implementation, a unified fault domain switching platform can be established, which is conducive to the preservation of production operation and maintenance management and switching processes, and can further improve the concentration and reliability of the production emergency guarantee platform. In addition, once a failure occurs at the infrastructure layer, when multiple applications need to be switched at the same time, the possible human resource bottleneck problem can be solved.
[0079] Based on the same inventive concept, a fault domain switching device is also provided in the embodiments of this specification, such as the following embodiments. Since the principle of solving the problem by the fault domain switching device is similar to that of the fault domain switching method, the implementation of the fault domain switching device can refer to the implementation of the fault domain switching method, and the repeated parts will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements the predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable. Figure 6 is a structural block diagram of a fault domain switching device according to an embodiment of this specification, such as Figure 6 As shown, it may include: a determination module 601, a first acquisition module 602, a second acquisition module 603, and a switching module 604. The structure is described below.
[0080] The determination module 601 may be used to determine a target switching mode corresponding to a target application in response to a target fault domain switching request;
[0081] A first acquisition module 602 may be used to acquire a parameter information set of a to-be-switched object of a target application;
[0082] The second acquisition module 603 may be used to acquire execution parameters of the target application; wherein the execution parameters are used to characterize the fault domain switching type;
[0083] The switching module 604 may be used to perform fault domain switching on the target application based on the target switching mode, according to the parameter information set and the execution parameters; wherein the fault domain switching includes isolating or restoring the fault domain corresponding to the object to be switched.
[0084] The embodiment of this specification also provides an electronic device, which can be specifically referred to in Figure 7 The electronic device composition structure diagram of the fault domain switching method provided by the embodiment of the present specification is shown, and the electronic device may specifically include an input device 71, a processor 72, and a memory 73. Among them, the input device 71 can be specifically used to input a target fault domain switching request. The processor 72 can be specifically used to respond to the target fault domain switching request, determine the target switching mode corresponding to the target application; obtain the parameter information set of the object to be switched of the target application; obtain the execution parameters of the target application; wherein the execution parameters are used to characterize the fault domain switching type; based on the target switching mode, the target application is fault domain switched according to the parameter information set and the execution parameters; wherein the fault domain switching includes isolating or recovering the fault domain corresponding to the object to be switched. The memory 73 can be specifically used to store parameters such as the parameter information set and the execution parameters.
[0085] In this embodiment, the input device can specifically be one of the main devices for information exchange between the user and the computer system. The input device can include a keyboard, a mouse, a camera, a scanner, a light pen, a handwriting input board, a voice input device, etc.; the input device is used to input the original data and the program for processing these numbers into the computer. The input device can also obtain and receive data transmitted from other modules, units, and devices. The processor can be implemented in any appropriate manner. For example, the processor can take the form of a computer-readable medium, a logic gate, a switch, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a programmable logic controller, and an embedded microcontroller, etc., such as a microprocessor or a processor and a computer-readable program code (such as software or firmware) that can be executed by the (micro) processor. The memory can specifically be a memory device used to store information in modern information technology. The memory can include multiple levels. In a digital system, anything that can store binary data can be a memory; in an integrated circuit, a circuit with a storage function without a physical form is also called a memory, such as a RAM, a FIFO, etc.; in a system, a storage device with a physical form is also called a memory, such as a memory stick, a TF card, etc.
[0086] In this embodiment, the functions and effects specifically realized by the electronic device can be explained in comparison with other embodiments and will not be described in detail here.
[0087] The embodiments of the present specification also provide a computer storage medium based on a fault domain switching method, wherein the computer storage medium stores computer program instructions, which can achieve the following when executed: in response to a target fault domain switching request, determining a target switching mode corresponding to a target application; obtaining a parameter information set of an object to be switched of the target application; obtaining execution parameters of the target application; wherein the execution parameters are used to characterize the type of fault domain switching; based on the target switching mode, performing fault domain switching on the target application according to the parameter information set and the execution parameters; wherein the fault domain switching includes isolating or recovering the fault domain corresponding to the object to be switched.
[0088] In this embodiment, the storage medium includes, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a cache, a hard disk (HDD), or a memory card. The memory may be used to store computer program instructions. The network communication unit may be an interface for network connection communication set in accordance with the standard specified by the communication protocol.
[0089] In this embodiment, the functions and effects specifically implemented by the program instructions stored in the computer storage medium can be explained in comparison with other embodiments and will not be repeated here.
[0090] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of this specification can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the embodiments of this specification are not limited to any specific combination of hardware and software.
[0091] Although the embodiments of this specification provide method operation steps as described in the above embodiments or flowcharts, more or fewer operation steps may be included in the method based on routine or no creative labor. In the steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided by the embodiments of this specification. When the device or terminal product of the method described in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or drawings (for example, a parallel processor or a multi-threaded processing environment).
[0092] It should be understood that the above description is for illustration and not for limitation. By reading the above description, many embodiments and many applications beyond the examples provided will be apparent to those skilled in the art. Therefore, the scope of the embodiments of this specification should not be determined with reference to the above description, but should be determined with reference to the full scope of the aforementioned claims and the equivalents possessed by these claims.
[0093] The above is only a preferred embodiment of the embodiment of this specification, and is not intended to limit the embodiment of this specification. For those skilled in the art, the embodiment of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiment of this specification shall be included in the protection scope of the embodiment of this specification.
Claims
1. A fault domain switching method, characterized in that: include: In response to the target fault domain switching request, determine the target switching mode corresponding to the target application, the target switching mode includes network load balancing mode, application cloud start and stop container mode, configuration center dynamic variable adjustment mode, and custom strategy mode; Acquire a parameter information set of an object to be switched of the target application based on the target switching mode; Acquiring execution parameters of the target application; wherein the execution parameters are used to characterize fault domain isolation or fault domain recovery; Based on the target switching mode, the target application is switched to a fault domain according to the parameter information set and the execution parameter; wherein the fault domain switching includes isolating or recovering the fault domain corresponding to the object to be switched; Wherein, in the case where the target switching mode is the custom strategy mode, the parameter information set of the object to be switched includes at least: a custom process strategy name; Correspondingly, based on the target switching mode, performing fault domain switching on the target application according to the parameter information set and the execution parameter includes: According to the custom process policy name, obtain the configuration script corresponding to the custom process policy name; Based on the execution parameters, the target application is switched to a fault domain using the configuration script.
2. The method according to claim 1, characterized in that In the case where the target switching mode is a network load balancing mode, the parameter information set of the object to be switched includes at least: an IP address and a port number of the fault domain to be switched; Correspondingly, based on the target switching mode, performing fault domain switching on the target application according to the parameter information set and the execution parameter includes: In the case where the execution parameter is isolation, isolating the IP address or the load balancing software address corresponding to the IP address according to the parameter information set; When it is determined that a load balancing long connection exists in the fault domain to be switched, terminating the load balancing long connection; Update the load balancing policy of the target application.
3. The method according to claim 2, characterized in that Based on the target switching mode, performing fault domain switching on the target application according to the parameter information set and the execution parameter, further comprising: When the execution parameter is recovery, recover the IP address or the load balancing software address corresponding to the IP address according to the parameter information set; If it is determined that the object to be switched has a load balancing long connection, re-establishing the load balancing long connection; Update the load balancing policy of the target application.
4. The method according to claim 2, characterized in that: After performing fault domain switching on the target application based on the target switching mode and according to the parameter information set and the execution parameter, the method further includes: Obtain the load balancing strategy in use, and store the load balancing strategy in use in the target database; The load balancing strategy in use is scanned at a preset time interval to update the load balancing address and port number.
5. The method according to claim 1, characterized in that In the case where the target switching mode is the application cloud start-stop container mode, the parameter information set of the object to be switched includes at least: the name, version number and group of the container to be switched; Correspondingly, based on the target switching mode, performing fault domain switching on the target application according to the parameter information set and the execution parameter includes: When the execution parameter is isolation, determining whether there is business processing for the container to be switched; When it is determined that the container to be switched does not have any service processing, isolating the container to be switched according to the parameter information set; When it is determined that the container to be switched has business processing, isolating the container to be switched according to the parameter information set after waiting for a preset time; The load balancing strategy of the target application is updated according to the parameter information set.
6. The method according to claim 5, characterized in that Based on the target switching mode, performing fault domain switching on the target application according to the parameter information set and the execution parameter, further comprising: When the execution parameter is recovery, starting the container to be switched according to the parameter information set; The load balancing strategy of the target application is updated according to the parameter information set.
7. The method according to claim 5, characterized in that After performing fault domain switching on the target application based on the target switching mode and according to the parameter information set and the execution parameter, the method further includes: Scanning the running container corresponding to the target application at a preset time interval to obtain the name and version number of the running container; Update the parameter configuration according to the name and version number of the running container.
8. The method according to claim 1, characterized in that In the case where the target switching mode is the configuration center dynamic variable adjustment mode, the parameter information set of the object to be switched includes at least: the name of the target parameter, and the execution parameter is the value of the target parameter; Correspondingly, based on the target switching mode, performing fault domain switching on the target application according to the parameter information set and the execution parameter includes: Based on the parameter information set, updating the target parameter according to the execution parameter; Adjust the processing flow of incremental transactions according to the updated target parameters.
9. The method according to claim 1, characterized in that: Before determining the target switching mode corresponding to the target application, the following steps are also included: Acquire characteristic parameters of the target application; wherein the characteristic parameters include: technical architecture, technical solutions, and basic environment of the target application; Determining a target switching mode applicable to the target application according to the characteristic parameters; Establishing an association relationship between the target application and the target switching mode; The association relationship between the target application and the target switching mode is stored in a target database.
10. A fault domain switching device, characterized in that: include: A determination module, configured to determine a target switching mode corresponding to a target application in response to a target fault domain switching request, wherein the target switching mode includes a network load balancing mode, an application cloud start-stop container mode, a configuration center dynamic variable adjustment mode, and a custom strategy mode; A first acquisition module, configured to acquire a parameter information set of a to-be-switched object of the target application based on the target switching mode; A second acquisition module is used to acquire execution parameters of the target application; wherein the execution parameters are used to characterize fault domain isolation or fault domain recovery; A switching module, configured to perform fault domain switching on the target application based on the target switching mode and according to the parameter information set and the execution parameter; wherein the fault domain switching includes isolating or recovering the fault domain corresponding to the object to be switched; Wherein, in the case where the target switching mode is the custom strategy mode, the parameter information set of the object to be switched includes at least: a custom process strategy name; Correspondingly, based on the target switching mode, performing fault domain switching on the target application according to the parameter information set and the execution parameter includes: According to the custom process policy name, obtain the configuration script corresponding to the custom process policy name; Based on the execution parameters, the target application is switched to a fault domain using the configuration script.
11. A fault domain switching device, characterized in that: The method comprises a processor and a memory for storing processor-executable instructions, wherein the processor implements the steps of the method according to any one of claims 1 to 9 when executing the instructions.
12. A computer-readable storage medium, characterized in that: Computer instructions are stored thereon, and when the instructions are executed, the steps of the method according to any one of claims 1 to 9 are implemented.
