CN113032189A - Fault domain switching method, device and equipment - Google Patents

Fault domain switching method, device and equipment Download PDF

Info

Publication number
CN113032189A
CN113032189A CN202110300387.2A CN202110300387A CN113032189A CN 113032189 A CN113032189 A CN 113032189A CN 202110300387 A CN202110300387 A CN 202110300387A CN 113032189 A CN113032189 A CN 113032189A
Authority
CN
China
Prior art keywords
target
fault domain
switching
target application
information set
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110300387.2A
Other languages
Chinese (zh)
Inventor
牟启燕
杨焕军
蔡文
张颖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110300387.2A priority Critical patent/CN113032189A/en
Publication of CN113032189A publication Critical patent/CN113032189A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/202Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant
    • G06F11/2038Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant with a single idle spare processing component
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/202Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant
    • G06F11/2041Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant with more than one idle spare processing component

Abstract

The embodiment of the specification provides a fault domain switching method, a fault domain switching device and fault domain switching equipment, and relates to the technical field of artificial intelligence, wherein the fault domain switching method comprises the following steps: responding to a target fault domain switching request, and determining a target switching mode corresponding to a target application; acquiring a parameter information set of the object to be switched of the target application; acquiring an execution parameter of the target application; wherein the execution parameter is used for characterizing a fault domain switching type; and performing fault domain switching on the target application according to the parameter information set and the execution parameters based on the target switching mode. In the embodiment of the specification, fault domain switching can be performed timely and efficiently when it is determined that emergency switching needs to be performed on a target application, so that the reliability of the application is ensured.

Description

Fault domain switching method, device and equipment
Technical Field
The embodiment of the specification relates to the technical field of artificial intelligence, in particular to a fault domain switching method, device and equipment.
Background
For applications with double or multiple activities, different applications in the prior art need to customize corresponding fault domain switching processes according to their own characteristics, so that the fault domain switching processes of different applications may have differences, and manual configuration and adjustment of the switching processes are required when performing fault domain switching. If multiple applications need to be switched in an emergency at the same time, the technical scheme in the prior art cannot be used for switching in an emergency in a fault domain in time so as to ensure the reliability of the applications.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the specification provides a fault domain switching method, a fault domain switching device and fault domain switching equipment, and aims to solve the problem that in the prior art, emergency switching of a fault domain is performed in time to ensure reliability of application.
An embodiment of the present specification provides a fault domain switching method, including: responding to a target fault domain switching request, and determining a target switching mode corresponding to a target application; acquiring a parameter information set of the object to be switched of the target application; acquiring an execution parameter of the target application; wherein the execution parameter is used for characterizing a fault domain switching type; performing fault domain switching on the target application according to the parameter information set and the execution parameter based on the target switching mode; and the fault domain switching comprises isolating or recovering the fault domain corresponding to the object to be switched.
An embodiment of the present specification further provides a fault domain switching apparatus, including: the determining module is used for responding to the target fault domain switching request and determining a target switching mode corresponding to the target application; the first acquisition module is used for acquiring a parameter information set of the object to be switched of the target application; the second acquisition module is used for acquiring the execution parameters of the target application; wherein the execution parameter is used for characterizing a fault domain switching type; the switching module is used for switching the fault domain of the target application according to the parameter information set and the execution parameter based on the target switching mode; and the fault domain switching comprises isolating or recovering the fault domain corresponding to the object to be switched.
The embodiment of the present specification further provides a fault domain switching device, which includes a processor and a memory for storing processor-executable instructions, and when the processor executes the instructions, the steps of the fault domain switching method are implemented.
The present specification also provides a computer readable storage medium, on which computer instructions are stored, which when executed implement the steps of the fault domain switching method.
The embodiments of the present specification provide a fault domain switching method, which may determine a target switching mode corresponding to a target application in response to a target fault domain switching request. After the target switching mode corresponding to the target application is determined, the parameter information set of the object to be switched of the target application and the execution parameters for representing the fault domain switching type of the target application can be obtained, and manual configuration and adjustment are not needed. Further, 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 a fault domain corresponding to the object to be switched. Therefore, the fault domain switching can be timely and efficiently carried out when the target application needs to be subjected to emergency switching, so that the reliability of the application is ensured.
Drawings
The accompanying drawings, which are included to provide a further understanding of the embodiments of the disclosure, are incorporated in and constitute a part of this specification, and are not intended to limit the embodiments of the disclosure. In the drawings:
fig. 1 is a schematic diagram illustrating steps of a fault domain switching method provided in an embodiment of the present specification;
fig. 2 is a schematic diagram of a network load balancing mode provided according to an embodiment of the present specification;
FIG. 3 is a schematic diagram of an application cloud start-stop container mode provided in accordance with an embodiment of the present description;
FIG. 4 is a schematic diagram of a configuration centric dynamic variable adjustment mode provided in accordance with an embodiment of the present description;
FIG. 5 is a schematic diagram of a custom policy schema provided in accordance with an embodiment of the present description;
fig. 6 is a schematic structural diagram of a fault domain switching apparatus provided in an embodiment of the present specification;
fig. 7 is a schematic structural diagram of a fault domain switching device provided according to an embodiment of the present specification.
Detailed Description
The principles and spirit of the embodiments of the present specification will be described with reference to a number of exemplary embodiments. It should be understood that these embodiments are presented merely to enable those skilled in the art to better understand and to implement the embodiments of the present description, and are not intended to limit the scope of the embodiments of the present description in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As will be appreciated by one skilled in the art, implementations of the embodiments of the present description may be embodied as a system, an apparatus, a method, or a computer program product. Therefore, the disclosure of the embodiments of the present specification can be embodied in the following forms: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
Although the flow described below includes operations that occur in a particular order, it should be appreciated that the processes may include more or less operations that are performed sequentially or in parallel (e.g., using parallel processors or a multi-threaded environment).
Referring to fig. 1, the present embodiment can provide a method for switching a fault domain. The fault domain switching method can be used for efficiently carrying out emergency switching on the target application. The above-mentioned fail-over method may comprise the following steps.
S101: and responding to the target fault domain switching request, and determining a target switching mode corresponding to the target application.
In this embodiment, a target switching mode corresponding to a target application may be determined in response to a target fault domain switching request. The target fault domain switching request may be initiated for a target application, and the target fault domain switching request may include information of the target application, information of a fault domain that needs to be switched, and the like, which may be determined specifically according to an actual situation, and this is not limited in this embodiment of the specification.
In this embodiment, the switching modes of the respective applications may be collectively managed in the same switching platform, and the server of the switching platform may respond to the target fault domain switching request. The server of the switching platform may be a single server or a server cluster, and certainly, the functions of the server may also be realized by a cloud computing technology. The specific situation can be determined according to actual situations, and the embodiment of the present specification does not limit the specific situation.
In this embodiment, the target fault domain switching request may be initiated by a user through triggering a preset button in a switching platform, or may be automatically triggered by a server when it is detected that a fault domain needs to be switched according to a preset time interval, which may be determined specifically according to an actual situation, and this is not limited in this embodiment of the present specification.
In this embodiment, the target application may be an application that needs to perform a fault domain switching. In some embodiments, since a plurality of related applications may be included in the same service product, and a fault domain switching needs to be performed on each of the plurality of related applications during the emergency switching, the target application may be one or more. When the number of the target applications is multiple, the target switching modes corresponding to the target applications can be determined in parallel, and the fault domain switching is performed, so that the fault domain switching can be performed on multiple applications contained in the same service product efficiently and simultaneously.
In this embodiment, because the architectures and the adopted technical solutions of different applications may have differences, different applications may be applicable to different switching modes, and the switching modes may be used to characterize the step of performing fault domain switching by the application. Therefore, the target switching mode corresponding to the target application can be determined first. The target handover mode may include specific process steps of the fault domain handover in the handover mode, and it is understood that other information may also be included, for example: the specific parameters and the like that need to be configured may be determined according to actual situations, and are not limited in the embodiments of the present specification.
S102: and acquiring a parameter information set of the object to be switched of the target application.
In this embodiment, a parameter information set of an object to be switched of a target application may be obtained. The object to be switched can be an address, a port number and the like of a fault domain to be switched, and the number of the fault domains to be switched can be one or more. The parameter information set can be used for representing the object to be switched, and the parameter information set can contain at least one value of a relevant parameter for representing the object to be switched.
In the embodiment, because different applications have differences in architecture, technical solution, basic environment, and the like, parameter information included in parameter information sets of objects to be switched that need to be acquired in different switching modes also has differences. Therefore, in some embodiments, the parameter information set of the object to be switched of the target application may be obtained based on the target switching mode.
In this embodiment, the manner of obtaining the parameter information set of the object to be switched of the target application may include: and pulling the object to be switched from a preset database, or receiving a parameter information set of the object to be switched, which is input by a user. It is understood that, the parameter information set of the object to be switched may also be obtained in other possible manners, for example, the parameter information set of the object to be switched is searched in a web page according to a certain search condition, which may be determined according to actual situations, and this is not limited in this description embodiment.
S103: acquiring an execution parameter of a target application; wherein the execution parameter is used for characterizing the fault domain switching type.
In this embodiment, in order to determine the specific type of the failover, an execution parameter of the target application may be obtained, where the execution parameter may be used to characterize the type of the failover, and specifically may characterize whether to perform the failover or the failover. The execution parameter may be two values, which are isolated and restored, or may be represented by characters, codes, pictures, and the like, which may be determined specifically according to an actual situation, and this is not limited in this specification.
In this embodiment, the fault domain isolation may be used to characterize that the fault domain needs to be isolated when an abnormality occurs, and the fault domain recovery may be that the abnormal fault is recovered and can be used normally. For example: the target application comprises a fault domain 1, a fault domain 2, a fault domain 3 and a fault domain 4, and when the fault domain 4 is abnormal, the fault domain 4 can be isolated, so that subsequent incremental transactions can not be transferred to the fault domain 4 any more, namely the fault domain 1, the fault domain 2, the fault domain 3 and the fault domain 4 which are available to the target application are switched into the fault domain 1, the fault domain 2 and the fault domain 3.
In this embodiment, the parameter information set of the object to be switched and the execution parameter of the target application may be obtained in parallel, or the parameter information set of the object to be switched may be obtained first and then the execution parameter of the target application may be obtained, or the execution parameter of the target application may be obtained first and then the parameter information set of the object to be switched may be obtained, which may be determined according to an actual situation, and the embodiment of the present specification does not limit this.
In this embodiment, the manner of acquiring the execution parameter of the target application may include: and pulling the target application from a preset database, or receiving the execution parameters of the target application input by a user. It is understood that, the execution parameter of the target application may also be obtained in other possible manners, for example, the execution parameter of the target application is searched in a web page according to a certain search condition, which may be determined according to actual situations, and this is not limited in this embodiment of the present specification.
S104: performing fault domain switching on the target application according to the parameter information set and the execution parameters based on the target switching mode; and the fault domain switching comprises isolating or recovering the fault domain corresponding to the object to be switched.
In this embodiment, since the target switching mode includes a specific process step of performing fault domain switching on the target application, the fault domain switching on the target application may be performed according to the parameter information set and the execution parameter based on the target switching mode, where the fault domain switching includes isolating or recovering a fault domain corresponding to the object to be switched.
In this embodiment, hosts/containers that may fail simultaneously may be grouped by creating a failure domain and assigning one or more hosts/containers to it, and the failure of all hosts/containers in a single failure domain will be treated as the same failure. The above-mentioned fault domain switching may include: the fault domain isolation and fault domain recovery, and the specific switching type can be determined according to the execution parameters.
In the present embodiment, after performing the fault domain switching, the result of the fault domain switching may be fed back, so that the fault domain switching may be performed again in time when the fault domain switching is unsuccessful. The result of the fault domain switching may be visually displayed on an interface corresponding to the switching platform, or may be sent to a maintenance person corresponding to the target application in a file manner, which may be determined specifically according to an actual situation, and this is not limited in this specification.
From the above description, it can be seen that the embodiments of the present specification achieve the following technical effects: a target switch mode corresponding to the target application may be determined in response to the target fail-over request. After the target switching mode corresponding to the target application is determined, the parameter information set of the object to be switched of the target application and the execution parameters for representing the fault domain switching type of the target application can be obtained, and manual configuration and adjustment are not needed. Further, the fault domain switching can be performed on the target application according to the parameter information set and the execution parameter based on the target switching mode, so that the fault domain switching can be performed timely and efficiently when the target application needs to be subjected to emergency switching, and the reliability of the application can be ensured.
In an embodiment, before determining a target switching mode corresponding to a target application, the method may further include: acquiring characteristic parameters of a target application; wherein, the characteristic parameters include: technical architecture, technical scheme and basic environment of target application; the target switching mode applicable to the target application can be determined according to the characteristic parameters, and the incidence relation between the target application and the target switching mode is established. Further, the association relationship between the target application and the target switching mode may be stored in a target database.
In this embodiment, in order to call the switching mode corresponding to each application conveniently and timely, the corresponding standard switching mode may 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 scheme, basic environment, etc. of the target application, and the switching mode can be divided into four types for different technical architectures, technical schemes, and basic environments, and may include: the method comprises a network load balancing mode, an application cloud start-stop container mode, configuration center dynamic variable adjustment and a user-defined strategy mode. These four standard switching modes can be configured in the switching platform in advance, so that the association relationship between the respective application switching modes can be established in the following.
In this embodiment, the association relationship between the target application and the target switching mode may be stored in the target database, so that the association relationship may 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 incidence relation between the target application and the target switching mode.
In this embodiment, the target database may be a database for storing data in the switching platform, and the association relationship between the target application and the target switching mode may be stored in the form of a key-value pair. It is understood that the storage may be in other possible forms, and the specific form may be determined according to practical situations, which is not limited by the embodiments of the present specification.
In an embodiment, in a case that the target switching mode is a network load balancing mode, the parameter information set of the object to be switched at least includes: the IP address and 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, which may include: and under the condition that the execution parameters are isolated, isolating the IP address or the load balancing software address corresponding to the IP address according to the parameter information set. And under the condition that the fault domain to be switched has the load balancing long connection, terminating the load balancing long connection. Further, the load balancing policy of the target application may be updated.
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 Address information of load balancing, and specifically may include an IP Address (Internet Protocol Address) and a port number of a server in the domain to be switched. The IP addresses and the port numbers can be the IP addresses and the port numbers of one or more servers, when one server in one fault domain fails, the whole fault domain needs to be isolated, and therefore the fault domain to be switched can be uniquely determined according to the IP addresses and the port numbers. Among other things, port numbers are common in computer network applications for linking between network devices.
In this embodiment, the execution parameters may include isolation and recovery. Under the condition that the execution parameters are isolated, the fault domain represented by the parameter information set needs to be isolated when abnormal occurs, and fault domain switching can be performed according to a flow configured in a network load balancing mode.
In this embodiment, the IP address or the load balancing software address (F5 address) corresponding to the IP address may be isolated according to the parameter information set, so that the subsequent incremental transaction is not circulated to the fault domain corresponding to the parameter information set. Meanwhile, whether the load balancing long connection exists in the object to be switched can be determined, and the load balancing long connection can be terminated under the condition that the load balancing long connection exists.
In this embodiment, a long connection means that a plurality of packets can be continuously transmitted over one connection, and then the connection is disconnected, and if no packet is transmitted during the connection holding period, a link check packet needs to be transmitted in both directions. The short connection means that when both communication parties have data interaction, a connection is established, and after the data transmission is completed, the connection is disconnected, that is, only one service is transmitted in each connection. The object to be switched can be a fault domain to be switched, and the incremental transaction refers to a transaction processing request generated after the fault domain switching is completed.
In this embodiment, the network load balancing mode may be as shown in fig. 2, where an intelligent dns (gtm) may be a network load balancing management platform, and the switching platform may refer 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 IP address and the port of the server. In fig. 2, IP1 and IP2 are a load balancing address VS1 and a load balancing address VS2, respectively, and each fault domain may include at least one Web server (Web server) and at least one APP server (application server).
In this embodiment, the DNS (Domain Name System) is a System for solving machine naming on the internet, and is used as a distributed database for mapping Domain names and IP addresses to each other, so that people can access the internet more conveniently, and the GTM is global traffic management.
In the present embodiment, the cross number in fig. 2 indicates that the fault domain 4 is isolated, and the transaction requests of the subsequent applications will only flow to the fault domain 1, the fault domain 2 and the fault domain 3, and will not flow to the fault domain 4. To ensure that incremental transactions are not circulated to the fault domain 4, the load balancing policy in load balancing (LTM/SLB) may be updated, and the fault domain 4 is not included in the updated load balancing policy. It should be understood that fig. 2 is only an example, and in an actual application, more fault domains may be included, or more fault domains may be isolated, for example, the B-campus is isolated as a whole, which may be determined according to a practical situation, and the embodiment of the present specification does not limit this.
In an embodiment, performing fault domain switching on the target application according to the parameter information set and the execution parameter based on the target switching mode may further include: and under the condition that the execution parameters are recovered, recovering the IP address of the object to be switched or the load balancing software address corresponding to the IP address according to the parameter information set. And under the condition that the load balancing long connection of the object to be switched is determined, reestablishing the load balancing long connection. Further, the load balancing policy of the target application may be updated.
In this embodiment, if the execution parameter is recovery, it means that the previously isolated fault domain has recovered to normal, and the fault domain may be re-enabled to process the transaction request. Therefore, the IP address or the load balancing software address corresponding to the IP address can be recovered, so that the incremental transaction can be transferred to the fault domain corresponding to the parameter information set.
In this embodiment, it may be determined whether a terminated load balancing long connection exists before the object to be switched, and if it is determined that the terminated load balancing long connection exists, the load balancing long connection may be reestablished. Further, the load balancing policy of the target application may be updated according to the parameter information set, for example: the uniform flow of transaction requests to fault domain 1, fault domain 2, and fault domain 3 may be updated to uniformly flow transaction requests to fault domain 1, fault domain 2, fault domain 3, and fault domain 4. The specific situation can be determined according to actual situations, and the embodiment of the present specification does not limit the specific situation.
In an embodiment, after performing the fault domain switching on the target application according to the parameter information set and the execution parameter based on the target switching mode, the method may further include: and acquiring the load balancing strategy in use, and storing the load balancing strategy in use in a target database. Further, the load balancing policy in use may be scanned at preset time intervals to update the load balancing address and port number.
In this embodiment, the validity of the parameter configuration may be checked through parameter health check, specifically, the user configuration may be scanned by invoking a network load balancing management platform according to a preset time interval, so as to check whether the IP address and the port number of the object to be switched exist.
In the embodiment, the parameters can be automatically updated according to the preset time interval, so that the self-discovery and automatic fresh-keeping of the parameters are realized. The load balancing policy in use may be retrieved and stored in the target database. In some embodiments, the load balancing policy in use may be obtained according to the service group environment information of the target application configured by the user, and stored.
In this embodiment, the network load balancing management platform may be invoked to scan a load balancing policy in use according to a preset time interval to update the load balancing address and the port number, where the preset time interval may be 10 minutes, 1 hour, or 1 day, and may be determined specifically according to an actual situation, which is not limited in this embodiment of the present specification. Compared with the technical scheme that the switching process needs to be manually and synchronously adjusted one by one when the application version or the production environment information changes in the prior art, the embodiment of the specification can more conveniently and efficiently realize the automatic updating of the parameters, and the labor cost is saved.
In an embodiment, when the target switching mode is the cloud start-stop container application mode, the parameter information set of the object to be switched at least includes: 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, which may include: and under the condition that the execution parameter is isolation, determining whether the container to be switched has service processing. And under the condition that the service processing does not exist in the container to be switched, isolating the container to be switched according to the parameter information set. Under the condition that the service processing exists in the container to be switched, the container to be switched can be isolated according to the parameter information set after waiting for the preset time. Further, the load balancing policy of the target application may be updated according to the parameter information set.
In the present embodiment, when the target switching mode is the application cloud start-stop container mode, it is described that the fault domain of the target application is configured by the PAAS container. The Platform-as-a-Service (PAAS) refers to a cloud computing Platform which is constructed by using a Platform developed by software as a Service, a container cloud Platform is realized by containerization of a lightweight PAAS Platform, and technologies such as container scheduling and arranging, distributing and the like are adopted.
In this embodiment, before isolating the to-be-switched container, it may be determined whether there is service processing in the to-be-switched container, and if there is a service to be processed, the to-be-switched container may be isolated according to the parameter information set after waiting for a preset time. The preset time may be data greater than 0, for example: 30s, 10 seconds and the like, and the specific conditions can be determined according to actual conditions, and the embodiment of the specification is not limited to the specific conditions.
In this embodiment, the application cloud start-stop container mode may be as shown in fig. 3, where DSF is a distributed service framework and SLB is load balancing. The switching platform can transfer the application cloud start-stop container mode to the application cloud platform through interface calling. The application cloud platform may isolate the PAAS containers in the fault domain 4 according to the name, version number, and granularity of the group of the PAAS containers. At least one PAAS container may be included in each of the failure domains in fig. 3, and the cross-reference in fig. 3 indicates that the failure domain 4 is isolated, and the transaction requests of the subsequent applications will only flow to the failure domain 1, the failure domain 2 and the failure domain 3, and not to the failure domain 4. To ensure that incremental transactions are not being streamed to fault domain 4, the load balancing policy in DSF/SLB may be updated, transaction requests may be evenly streamed to fault domain 1, fault domain 2, fault domain 3, and fault domain 4 to fault domain 1, fault domain 2, fault domain 3. It should be understood that fig. 3 is only an example, and in an actual application, more fault domains may be included, or more fault domains may be isolated, for example, the B-campus is isolated as a whole, which may be determined according to a practical situation, and the embodiment of the present specification does not limit this.
In an embodiment, performing fault domain switching on the target application according to the parameter information set and the execution parameter based on the target switching mode may further include: and starting the container to be switched according to the parameter information set under the condition that the execution parameters are recovered. Further, the load balancing policy of the target application may be updated according to the parameter information set.
In this embodiment, if the execution parameter is recovery, it means that the previously isolated fault domain has recovered to normal, and the fault domain may be re-enabled to process the transaction request. Therefore, the container to be switched can be restarted, so that the incremental transaction can be transferred to the fault domain corresponding to the parameter information set. Further, the load balancing policy of the target application may be updated by the routing layer according to the parameter information set, for example: the uniform flow of transaction requests to fault domain 1, fault domain 2, and fault domain 3 may be updated to uniformly flow transaction requests to fault domain 1, fault domain 2, fault domain 3, and fault domain 4. The specific situation can be determined according to actual situations, and the embodiment of the present specification does not limit the specific situation.
In an embodiment, after performing the fault domain switching on the target application according to the parameter information set and the execution parameter based on the target switching mode, the method may further include: and scanning the running container corresponding to the target application according to a preset time interval to obtain the name and the version number of the running container. Further, the parameter configuration may be updated according to the name and version number of the running container.
In this embodiment, validity of the parameter configuration may be checked through parameter health check, specifically, the application cloud management platform may be called according to a preset time interval to scan the user configuration, so as to check whether the name and version number of the object to be switched exist.
In the embodiment, the parameters can be automatically updated according to the preset time interval, so that the self-discovery and automatic fresh-keeping of the parameters are realized. Scanning the running container corresponding to the target application according to a preset time interval to obtain the name and the version number of the running container, and storing the latest acquired data in a target database.
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 parameter. The preset time interval may be 10 minutes, 1 hour, or 1 day, and may be determined according to actual conditions, which is not limited in the embodiments of the present specification. Compared with the technical scheme that the switching process needs to be manually and synchronously adjusted one by one when the application version or the production environment information changes in the prior art, the embodiment of the specification can more conveniently and efficiently realize the automatic updating of the parameters, and the labor cost is saved.
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 at least includes: 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, which may include: based on the parameter information set, the target parameter is updated according to the execution parameter. Further, the processing flow of the incremental transaction may be adjusted according to the updated target parameter.
In this embodiment, the switching of the fault domain may be performed using target parameters, which may be used to characterize the object to be modified. For example: the target parameter name normally used by the fault domain 4 is A, and the value is 1; when the fault occurs, the value of A can be adjusted to 2, so that the fault domain 4 can be isolated, and the subsequent transaction is not transferred to the fault domain 4.
In this embodiment, the value of the target parameter may be used to characterize the type of the fault domain switching, for example: a value of 1 for the target parameter A indicates recovery, and a value of 2 for the target parameter A indicates isolation. The specific situation can be determined according to actual situations, and the embodiment of the present specification does not limit the specific situation.
In this embodiment, the configuration center dynamic variable adjustment mode may be as shown in fig. 4, and the switching platform may refer the configuration center dynamic variable adjustment mode to the configuration center management platform (CMC dynamic variable) through an interface call. And the configuration center management platform updates the target parameters by using the values of the target parameters (if the parameters do not exist, a parameter is added), and issues the parameters to achieve hot effect. Each fault domain in fig. 4 may include at least one Web server (Web server) and at least one APP server (application server), where the cross sign in fig. 4 indicates that the fault domain 4 is isolated, the checkmark indicates that the target parameter is successfully updated from YYY to ZZZ, and the transaction requests of the subsequent applications will only flow to fault domain 1, fault domain 2, and fault domain 3, and will not flow to fault domain 4. To ensure that incremental transactions are not being transferred to fault domain 4, and the process flow of adjusting incremental transactions may be updated, the uniform transfer of transaction requests to fault domain 1, fault domain 2, fault domain 3, and fault domain 4 may be adjusted to uniformly transfer transaction requests to fault domain 1, fault domain 2, and fault domain 3.
In an embodiment, in the case that the target switching mode is the custom policy mode, the parameter information set of the object to be switched at least includes: and self-defining the name of the flow strategy. 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, which may include: and acquiring a configuration script corresponding to the custom flow strategy name according to the custom flow strategy name. Further, the target application may be fail-over with the configuration script based on the execution parameters.
In the present embodiment, since some applications have certain specificity, the fault domain switching cannot be performed by the three switching modes, and a targeted configuration is required. Therefore, custom flow strategies can be formulated for these applications and corresponding configuration scripts can be written, and different custom flow strategies can have different nouns for identification. Therefore, the configuration script corresponding to the custom flow strategy name can be obtained according to the custom flow strategy name, and fault domain switching can be realized by running the configuration script. In some embodiments, the execution parameter may be in a written configuration script, and may not need to be acquired otherwise, and may be determined according to an actual situation, which is not limited in this specification.
In this embodiment, the custom policy model may be as shown in fig. 5, and the switching platform may refer the configuration center custom policy model to the open platform application version automation installation management platform through interface call. The application version automatic installation management platform can call a corresponding configuration script according to the user-defined flow strategy name and run the configuration script to realize the switching of the fault domain. Each fault domain in fig. 5 may include at least one Web server (Web server) and at least one APP server (application server), and the cross sign in fig. 5 indicates that fault domain 4 is isolated, and the transaction requests of subsequent applications will only flow to fault domain 1, fault domain 2, and fault domain 3, and not to fault domain 4. To ensure that incremental transactions are not being transferred to fault domain 4, the processing flow of incremental transactions may be adjusted, uniformly transferring transaction requests to fault domain 1, fault domain 2, fault domain 3, and fault domain 4 may be adjusted to uniformly transfer transaction requests to fault domain 1, fault domain 2, and fault domain 3.
In the embodiment, a unified fault domain switching platform can be established, so that production operation and maintenance management and fresh keeping of a switching flow are facilitated, and intensification and reliability of a production emergency guarantee platform can be further improved. In addition, once the fault of the infrastructure layer occurs, when a plurality of applications need to be switched simultaneously, the possible bottleneck problem of human resources can be solved.
Based on the same inventive concept, the embodiment of the present specification further provides a fault domain switching apparatus, such as the following embodiments. Because the principle of the fault domain switching device for solving the problem is similar to 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 repeated details are not repeated. As used hereinafter, the term "unit" or "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated. Fig. 6 is a block diagram of a fault domain switching apparatus according to an embodiment of the present disclosure, and as shown in fig. 6, the fault domain switching apparatus may include: the determining module 601, the first obtaining module 602, the second obtaining module 603, and the switching module 604, which will be described below.
A determining module 601, configured to determine, in response to a target fault domain switching request, a target switching mode corresponding to a target application;
a first obtaining module 602, configured to obtain a parameter information set of an object to be switched of a target application;
a second obtaining module 603, configured to obtain an execution parameter of the target application; the execution parameters are used for representing the fault domain switching type;
a switching module 604, configured to perform fault domain switching on a target application according to the parameter information set and the execution parameter based on the target switching mode; and the fault domain switching comprises isolating or recovering the fault domain corresponding to the object to be switched.
The embodiment of the present specification further provides an electronic device, which may specifically refer to a schematic structural diagram of the electronic device based on the fault domain switching method provided by the embodiment of the present specification, and the electronic device may specifically include an input device 71, a processor 72, and a memory 73. The input device 71 may be specifically configured to input a target fault domain switching request. The processor 72 may specifically be configured to determine, in response to the target fault domain switching request, a target switching mode corresponding to the target application; acquiring a parameter information set of an object to be switched of a target application; acquiring an execution parameter of a target application; the execution parameters are used for representing the fault domain switching type; performing fault domain switching on the target application according to the parameter information set and the execution parameters based on the target switching mode; and the fault domain switching comprises isolating or recovering the fault domain corresponding to the object to be switched. The memory 73 may be specifically configured to store parameter information sets, execution parameters, and the like.
In this embodiment, the input device may be one of the main apparatuses for information exchange between a user and a computer system. The input devices may include a keyboard, mouse, camera, scanner, light pen, handwriting input panel, voice input device, etc.; the input device is used to input raw data and a program for processing the data into the computer. The input device can also acquire and receive data transmitted by other modules, units and devices. The processor may be implemented in any suitable way. For example, the processor may take the form of, for example, a microprocessor or processor and a computer-readable medium that stores computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, an embedded microcontroller, and so forth. The memory may in particular be a memory device used in modern information technology for storing information. The memory may include multiple levels, and in a digital system, memory may be used as long as binary data can be stored; in an integrated circuit, a circuit without a physical form and with a storage function is also called a memory, such as a RAM, a FIFO and the like; in the system, the storage device in physical form is also called a memory, such as a memory bank, a TF card and the like.
In this embodiment, the functions and effects specifically realized by the electronic device can be explained by comparing with other embodiments, and are not described herein again.
Embodiments of the present specification further provide a computer storage medium based on a fault domain switching method, where the computer storage medium stores computer program instructions, and when the computer program instructions are executed, the computer storage medium may implement: responding to a target fault domain switching request, and determining a target switching mode corresponding to a target application; acquiring a parameter information set of an object to be switched of a target application; acquiring an execution parameter of a target application; the execution parameters are used for representing the fault domain switching type; performing fault domain switching on the target application according to the parameter information set and the execution parameters based on the target switching mode; and the fault domain switching comprises isolating or recovering the fault domain corresponding to the object to be switched.
In this embodiment, the storage medium includes, but is not limited to, a Random Access Memory (RAM), a Read-Only Memory (ROM), a Cache (Cache), a Hard Disk Drive (HDD), or a Memory Card (Memory Card). The memory may be used to store computer program instructions. The network communication unit may be an interface for performing network connection communication, which is set in accordance with a standard prescribed by a communication protocol.
In this embodiment, the functions and effects specifically realized by the program instructions stored in the computer storage medium can be explained by comparing with other embodiments, and are not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the present specification described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed over a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different from that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, embodiments of the present description are not limited to any specific combination of hardware and software.
Although the embodiments herein provide the method steps as described in the above embodiments or flowcharts, more or fewer steps may be included in the method based on conventional or non-inventive efforts. In the case of steps where no causal relationship is logically necessary, the order of execution of the steps is not limited to that provided by the embodiments of the present description. When the method is executed in an actual device or end product, the method can be executed sequentially or in parallel according to the embodiment or the method shown in the figure (for example, in the environment of a parallel processor or a multi-thread processing).
It is to be understood that the above description is intended to be illustrative, and not restrictive. Many embodiments and many applications other than the examples provided will be apparent to those of skill in the art upon reading the above description. The scope of embodiments of the present specification should, therefore, be determined not with reference to the above description, but should instead be determined with reference to the appended claims, along with the full scope of equivalents to which such claims are entitled.
The above description is only a preferred embodiment of the embodiments of the present disclosure, and is not intended to limit the embodiments of the present disclosure, and it will be apparent to those skilled in the art that various modifications and variations can be made in the embodiments of the present disclosure. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the embodiments of the present disclosure should be included in the protection scope of the embodiments of the present disclosure.

Claims (13)

1. A method for switching fault domains, comprising:
responding to a target fault domain switching request, and determining a target switching mode corresponding to a target application;
acquiring a parameter information set of the object to be switched of the target application;
acquiring an execution parameter of the target application; wherein the execution parameter is used for characterizing a fault domain switching type;
performing fault domain switching on the target application according to the parameter information set and the execution parameter based on the target switching mode; and the fault domain switching comprises isolating or recovering the fault domain corresponding to the object to be switched.
2. The method according to claim 1, wherein in the case that the target handover mode is a network load balancing mode, the parameter information set of the object to be handed over at least comprises: the IP address and the 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, including:
under the condition that the execution parameters are isolated, isolating the IP address or the load balancing software address corresponding to the IP address according to the parameter information set;
under the condition that the to-be-switched fault domain is determined to have load balancing long connection, terminating the load balancing long connection;
and updating the load balancing strategy of the target application.
3. The method of claim 2, wherein performing a failover for the target application based on the target switchover pattern according to the parameter information set and the execution parameters further comprises:
under the condition that the execution parameters are recovered, recovering an IP address or a load balancing software address corresponding to the IP address according to the parameter information set;
under the condition that the load balancing long connection of the object to be switched is determined, reestablishing the load balancing long connection;
and updating the load balancing strategy of the target application.
4. The method of claim 2, further comprising, after performing a fault domain switching on the target application according to the parameter information set and the execution parameters based on the target switching mode:
acquiring a load balancing strategy in use, and storing the load balancing strategy in use in a target database;
and scanning the load balancing strategy in use according to a preset time interval to update the load balancing address and the port number.
5. The method according to claim 1, wherein when the target switching mode is an application cloud start-stop container mode, the parameter information set of the object to be switched at least includes: 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, including:
determining whether the container to be switched has service processing or not under the condition that the execution parameter is isolated;
under the condition that the service processing does not exist in the container to be switched, isolating the container to be switched according to the parameter information set;
under the condition that the service processing exists in the container to be switched, waiting for a preset time and isolating the container to be switched according to the parameter information set;
and updating the load balancing strategy of the target application according to the parameter information set.
6. The method of claim 5, wherein performing a failover for the target application based on the target switchover pattern according to the parameter information set and the execution parameters further comprises:
under the condition that the execution parameters are recovered, starting the container to be switched according to the parameter information set;
and updating the load balancing strategy of the target application according to the parameter information set.
7. The method of claim 5, further comprising, after performing a failover of the target application according to the set of parameter information and the execution parameters based on the target switchover mode:
scanning the running container corresponding to the target application according to a preset time interval to obtain the name and the version number of the running container;
and updating the parameter configuration according to the name and the version number of the running container.
8. The method according to claim 1, wherein in the case that the target switching mode is a configuration center dynamic variable adjustment mode, the parameter information set of the object to be switched at least comprises: a name of a target parameter, the execution parameter being a 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, including:
updating the target parameter according to the execution parameter based on the parameter information set;
and adjusting the processing flow of the incremental transaction according to the updated target parameter.
9. The method according to claim 1, wherein in the case that the target switching mode is a custom policy mode, the parameter information set of the object to be switched at least includes: customizing a 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, including:
acquiring a configuration script corresponding to the custom flow strategy name according to the custom flow strategy name;
and performing fault domain switching on the target application by utilizing the configuration script based on the execution parameters.
10. The method of claim 1, prior to determining the target switching mode corresponding to the target application, further comprising:
acquiring characteristic parameters of the target application; wherein the characteristic parameters include: the technical architecture, technical scheme and basic environment of the target application;
determining a target switching mode applicable to the target application according to the characteristic parameters;
establishing an incidence relation between the target application and a target switching mode;
and storing the incidence relation between the target application and the target switching mode into a target database.
11. A fail-over apparatus, comprising:
the determining module is used for responding to the target fault domain switching request and determining a target switching mode corresponding to the target application;
the first acquisition module is used for acquiring a parameter information set of the object to be switched of the target application;
the second acquisition module is used for acquiring the execution parameters of the target application; wherein the execution parameter is used for characterizing a fault domain switching type;
the switching module is used for switching the fault domain of the target application according to the parameter information set and the execution parameter based on the target switching mode; and the fault domain switching comprises isolating or recovering the fault domain corresponding to the object to be switched.
12. A fail-over device comprising a processor and a memory for storing processor-executable instructions which, when executed by the processor, implement the steps of the method of any one of claims 1 to 10.
13. A computer-readable storage medium having stored thereon computer instructions which, when executed, implement the steps of the method of any one of claims 1 to 10.
CN202110300387.2A 2021-03-22 2021-03-22 Fault domain switching method, device and equipment Pending CN113032189A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110300387.2A CN113032189A (en) 2021-03-22 2021-03-22 Fault domain switching method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110300387.2A CN113032189A (en) 2021-03-22 2021-03-22 Fault domain switching method, device and equipment

Publications (1)

Publication Number Publication Date
CN113032189A true CN113032189A (en) 2021-06-25

Family

ID=76472140

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110300387.2A Pending CN113032189A (en) 2021-03-22 2021-03-22 Fault domain switching method, device and equipment

Country Status (1)

Country Link
CN (1) CN113032189A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115344327A (en) * 2022-08-19 2022-11-15 中电金信软件有限公司 Application module switching method and device, electronic equipment and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100153693A1 (en) * 2008-12-17 2010-06-17 Microsoft Corporation Code execution with automated domain switching
CN107608757A (en) * 2017-08-29 2018-01-19 华为技术有限公司 A kind of isolation processing method and relevant device based on container
CN111865682A (en) * 2020-07-16 2020-10-30 北京百度网讯科技有限公司 Method and apparatus for handling faults

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100153693A1 (en) * 2008-12-17 2010-06-17 Microsoft Corporation Code execution with automated domain switching
CN107608757A (en) * 2017-08-29 2018-01-19 华为技术有限公司 A kind of isolation processing method and relevant device based on container
CN111865682A (en) * 2020-07-16 2020-10-30 北京百度网讯科技有限公司 Method and apparatus for handling faults

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115344327A (en) * 2022-08-19 2022-11-15 中电金信软件有限公司 Application module switching method and device, electronic equipment and readable storage medium
CN115344327B (en) * 2022-08-19 2023-07-28 中电金信软件有限公司 Application module switching method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US11714726B2 (en) Failover and recovery for replicated data instances
US11477105B2 (en) Monitoring of replicated data instances
US9992058B2 (en) Redundant storage solution
CN104468151B (en) A kind of system and method for keeping TCP sessions during cluster switching
CN106302596A (en) A kind of method and apparatus of service discovery
CN107919977A (en) A kind of on-line rapid estimation of the distributed consensus system based on Paxos agreements, the method and apparatus of online capacity reducing
CN104158707A (en) Method and device of detecting and processing brain split in cluster
US10523822B2 (en) Methods, systems, and computer readable storage devices for adjusting the use of virtual resources providing communication services based on load
CN113032189A (en) Fault domain switching method, device and equipment
CN110351122B (en) Disaster recovery method, device, system and electronic equipment
CN112615944B (en) Method and system for master-slave synchronization of distributed DNS (Domain name System)
CN107707595A (en) A kind of member organizes variation and device
CN115426251B (en) Disaster recovery method, device and medium of cloud host
CN115190040B (en) High-availability realization method and device for virtual machine
US11947431B1 (en) Replication data facility failure detection and failover automation
EP4060502A1 (en) Digital hybrid cloud computing infrastructure for implementing an automatic active-passive disaster recovery
US11750695B1 (en) Dynamic quarantine of impaired servers
JP2016219898A (en) Communication system and redundancy configuration method
CN108572890A (en) Transaction Information synchronous method and device
JP2017167783A (en) Node and data arrangement method

Legal Events

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