Fusing control method and device of distributed system and storage medium
By configuring the gateway service cluster in the distributed system, obtaining and saving the service request response data of the external system, and performing the fuse action according to the preset fuse configuration, the cascade failure problem caused by external system failure in the distributed system is solved, and the problem of cascade failure in the distributed system is improved. System stability.
Patent Information
- Application Number
- CN202410965330.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2024-11-12
AI Technical Summary
Since it is difficult for distributed systems to accurately determine the fuse threshold of the external system, it is easy to cause cascade failure due to the failure of the external system.
By configuring the gateway service cluster in a distributed system, obtaining and saving the service request response data of the external system, determining the fuse judgment conditions based on the preset fuse configuration, and performing fuse operations of the external system when the data meets the conditions to avoid the spread of faults.
It effectively avoids the spread of external system failures to the distributed system and improves the stability of the distributed system.
Smart Images

Figure CN118945035A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a fuse control method, device and storage medium for a distributed system. Background Art
[0002] A distributed system is a group of independent computers connected together through a network to work together to complete a specific task. In a distributed system, services can call each other to complete tasks together, and can also receive and process information from external systems.
[0003] When a service fails or is overloaded, the distributed system usually uses a circuit breaker mechanism to prevent the failure or load problem from spreading to the entire system and causing the system to crash. However, due to the different business logic between the external system and the internal services of the distributed system, the circuit breaker mechanism of the relevant distributed system can only circuit breaker the calls between services, and it is difficult to accurately determine the circuit breaker threshold of the external system. This makes it easy for the distributed system to cause cascading failures due to the propagation of the failure of the external system.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of the present application is to provide a distributed system fuse control method, device and storage medium, aiming to solve the technical problem that the distributed system is prone to cascading failures due to the propagation of failures of external systems.
[0006] To achieve the above object, the present application provides a method for controlling a fuse in a distributed system, the method comprising the following steps:
[0007] After receiving the service request, forwarding the service request to the external system, and determining and saving the service data based on the service request response of the external system;
[0008] Determining the fuse judgment condition of the external system according to the preset fuse configuration;
[0009] When the service data meets the fuse judgment condition, the fuse action of the external system is executed.
[0010] In one embodiment, after receiving the service request, the step of forwarding the service request to the external system, and determining and saving the service data based on the service request response of the external system includes:
[0011] After receiving the service request, identifying the service request and determining a target external system;
[0012] forwarding the service request to the target external system, and receiving a response to the service request fed back by the target external system;
[0013] Determine a response time corresponding to the service request, and generate and save the service data according to the response time and the service request response.
[0014] In one embodiment, after the step of identifying the service request and determining the target external system after receiving the service request, the method further includes:
[0015] Determining the service status of the target external system;
[0016] When the service status is blown, obtaining and returning blown preset information of the target external system;
[0017] When the service status is normal, the steps of forwarding the service request to the target external system and receiving the service request response fed back by the target external system are performed.
[0018] In one embodiment, after the step of executing the fusing action of the external system when the service data meets the fusing judgment condition, the method further includes:
[0019] Determining the service status of the external system based on a preset time;
[0020] When the service status is blown, sending a detection message to the external system and receiving a detection response from the external system;
[0021] Verifying the detection response according to the fuse recovery condition of the external system in the fuse configuration;
[0022] When the detection response meets the fuse recovery condition, a fuse recovery action of the external system is executed.
[0023] In one embodiment, before the step of verifying the detection response according to the fuse recovery condition of the external system in the fuse configuration, the step further includes:
[0024] Obtaining a fusing time of the external system and determining a fusing time window of the external system;
[0025] When the fuse time is greater than the fuse time window, the fuse recovery action is performed.
[0026] In one embodiment, before the step of determining the fuse judgment condition of the external system according to the preset fuse configuration, the method further includes:
[0027] Obtaining preset fuse thresholds, where the fuse thresholds include an abnormality ratio threshold, an abnormality quantity threshold, and an average response time threshold;
[0028] The fuse configuration is determined according to the fuse threshold.
[0029] In one embodiment, when the service data meets the fuse judgment condition, the step of executing the fuse action of the external system further includes:
[0030] When the service data meets the fuse judgment condition, obtaining the information notification template of the fuse action, and determining the service data and the fuse threshold;
[0031] Filling the service data and the fuse threshold into the information notification template to generate a fuse notification;
[0032] Outputting the fuse notification through a preset fuse notification channel;
[0033] Based on the external system, the fuse action is performed.
[0034] In one embodiment, after the step of executing the fusing action of the external system when the service data meets the fusing judgment condition, the method further includes:
[0035] Determine the fusing time of the fusing action and obtain the service data;
[0036] Associating the service data with the fuse time with the corresponding external system to generate a fuse record;
[0037] The blown records are sorted based on blown time to generate a blown log.
[0038] In addition, to achieve the above-mentioned objectives, the present application also provides a fuse control device for a distributed system, the device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the fuse control method for the distributed system as described above.
[0039] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the distributed system fuse control method as described above are implemented.
[0040] One or more technical solutions proposed in this application have at least the following technical effects:
[0041] This application obtains and saves the business data corresponding to the business request response of the external system through the gateway service cluster when forwarding the business, and determines the fuse judgment conditions corresponding to different external systems according to the preset fuse configuration, and judges the business data according to the fuse judgment conditions. When the business data meets the fuse judgment conditions, the circuit breaker deployed in the gateway service cluster executes the fuse action of the external system, so as to timely perform the fuse according to the abnormal situation of the business data of the external system, avoid the failure of the external system from spreading to the distributed system, and improve the stability of the distributed system. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0044] Figure 1 This is a flow chart of the first embodiment of the fuse control method of the distributed system of the present application;
[0045] Figure 2 A schematic diagram of the system architecture of a distributed system involved in the first embodiment of the fuse control method of a distributed system of the present application;
[0046] Figure 3 A schematic diagram of a service request processing flow involved in the first embodiment of the fuse control method for a distributed system of the present application;
[0047] Figure 4 This is a flow chart of the second embodiment of the fuse control method of the distributed system of the present application;
[0048] Figure 5 A schematic diagram of a fuse recovery process involved in the second embodiment of the fuse control method for a distributed system of the present application;
[0049] Figure 6 This is a schematic diagram of the service retry function flow involved in the second embodiment of the fuse control method of the distributed system of the present application;
[0050] Figure 7 A schematic diagram of a flow chart of a third embodiment of a fuse control method for a distributed system of the present application;
[0051] Figure 8 It is a structural diagram of a fuse control device of a distributed system in a hardware operating environment involved in an embodiment of the present application.
[0052] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0053] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0054] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0055] The main solution of the embodiment of the present application is: after receiving a service request, forwarding the service request to an external system, and determining and saving service data based on the service request response of the external system; determining the external system's fuse judgment condition according to a preset fuse configuration; and executing the external system's fuse action when the service data meets the fuse judgment condition.
[0056] When a service fails or is overloaded, the distributed system usually uses a circuit breaker mechanism to prevent the failure or load problem from spreading to the entire system and causing the system to crash. However, since the external system and the internal services of the distributed system have different business logics, and the stability, capacity, scale and communication protocols of the external system may be different, the circuit breaker mechanism of the relevant distributed system can only circuit breaker calls between services, and it is difficult to accurately determine the circuit breaker threshold of the external system. This makes the distributed system prone to cascading failures due to the propagation of failures in the external system.
[0057] The present application configures a gateway service cluster in a distributed system, and the gateway service cluster obtains and saves the business data corresponding to the business request response of the external system when forwarding the business, and determines the fuse judgment conditions corresponding to different external systems according to the preset fuse configuration, and judges the business data according to the fuse judgment conditions. When the business data meets the fuse judgment conditions, the circuit breaker deployed in the gateway service cluster executes the fuse action of the external system, so as to timely perform the fuse according to the abnormal situation of the business data of the external system, avoid the failure of the external system from spreading to the distributed system, and improve the stability of the distributed system.
[0058] In order to better understand the above technical solution, exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0059] It should be noted that the execution subject of this embodiment can be a distributed system, or a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a fuse control device of a distributed system, etc., and this embodiment does not specifically limit this. The following uses a distributed system as an example to illustrate this embodiment and the following embodiments.
[0060] Based on this, the embodiment of the present application provides a method for controlling the fuse of a distributed system, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the fuse control method of the distributed system of the present application.
[0061] In this embodiment, the fuse control method of the distributed system includes steps S10 to S30:
[0062] Step S10: after receiving the service request, forwarding the service request to the external system, and determining and saving the service data based on the service request response of the external system;
[0063] In this embodiment, the distributed system includes a business service cluster, a gateway service cluster, a service center cluster and a data service module. The business service cluster is responsible for business functions that are different from the external system, can receive and identify the user's business request, perform preliminary processing based on the business request content, and transmit the business request to the gateway service cluster when the business request involves an external system. The gateway service cluster is configured with a fuse, which can forward the business request received by the distributed system to the external system, and complete the relevant fusing, recovery, and alarm functions through the service center cluster. The service center cluster can save business data to the data service module, and is provided with the fusing configuration of each external system. Based on the business forwarding of the gateway service cluster, the distributed system can obtain and cache the business data of the external system to determine whether a fusing action needs to be performed.
[0064] Specifically, when receiving a business request, the gateway service cluster of the distributed system can identify the business information in the business request to determine the target external system and forward the business request to the target external system. The target external system can execute the request action of the business request based on its own set functions, and generate a business request response based on the execution result, and feedback to the gateway service cluster. After receiving the business request response, the gateway service cluster returns the business request response to the business service cluster. At the same time, the gateway service cluster generates business data based on the business request response and the response time of the business request response, and transmits the business data to the service center cluster, which saves the business data to the database by querying the cache or database persistent storage.
[0065] In one embodiment, when the gateway service cluster receives the service request response, it calculates the response time according to the time when the service request is sent and the time when the service request response is received. The gateway service cluster is set with a preset response time. When the service request response is abnormal and / or the response time is longer than the preset response time, response abnormality information is generated, and after associating the response time, response abnormality information and service request response, service data is generated and transmitted to the service center cluster. Among them, the abnormal status information records the abnormal reason of the service request response.
[0066] Optionally, the gateway service cluster can also record the response waiting time of the target external system in real time. When the response waiting time reaches the preset response time, the gateway service cluster will determine that the business request response is abnormal, obtain the preset timeout information of the target external system, and return it to the business service cluster. At the same time, the gateway service cluster will record the response abnormality information of the business request response, generate business data and send it to the service center cluster.
[0067] For example, refer to Figure 2 , Figure 2 The system architecture diagram of the distributed system involved in this embodiment is shown in FIG. Taking the banking system as an example, the external system is the business system of an institution outside the bank.
[0068] like Figure 2 As shown, after the user sends a business request through an entry channel such as a mobile phone, a web page on a computer, or an application, the business request can be load balanced through the routing gateway Zuul cluster, and the business request will be sent to the service cluster according to the URL, header information or other conditions of the business request. Among them, the routing gateway Zuul cluster has service flow limiting and service consumption (Feign) functions. Service flow limiting is an important means to protect the system from traffic shocks, while service consumption is the main way of interaction between the distributed architecture and the channel end. After the service cluster performs preliminary processing such as user identity authentication and business determination on the business request, the business request is sent to the external organization gateway service cluster, that is, the gateway service cluster.
[0069] Furthermore, Figure 3 This is a schematic diagram of the business request processing flow involved in this embodiment. Figure 2 and Figure 3, the external institution gateway service cluster caches the business request and forwards the business request to the business system of the external institution, that is, the external system of the distributed system. The external system can be selected from one or more business systems such as the financial system, non-tax system, traffic management system, vehicle management system, tax system, and financial systems at all levels. After receiving the business request and executing the corresponding business action to generate a business response, the external system will return the business response to the external institution gateway service cluster. After receiving the business request response, the external institution gateway service cluster determines the correspondence between the business request and the business request response based on the sequence number (seq, sequence), and returns the corresponding information to the business service cluster in response time. Based on asynchronous sending notifications, the relevant institutional unit docking service details are synchronized to the service center cluster, and the last successful response message is cached. The service center cluster will perform asynchronous data recording and fuse logic processing. Among them, the synchronized business data includes interface information, request time, response time, response duration, return error code and other data.
[0070] In addition, in order to prevent the service center cluster from being overwhelmed by excessive business data synchronization when the external system is overloaded or fails, the gateway service cluster is also equipped with an asynchronous notification thread pool, which sets the maximum number of threads that can be processed simultaneously. After receiving the business request response from the external system, the gateway service cluster will establish an asynchronous notification thread to control the sending of business data, and discard the redundant asynchronous notification threads when the number of threads running simultaneously is greater than the maximum number of threads set by the thread pool. For example, 5 asynchronous notification threads are set for a single gateway in the gateway service cluster. If the thread pool is slow, the notification content is discarded, and only 5 services are allowed to be processed simultaneously to prevent the service center from being overwhelmed. Based on the business forwarding and asynchronous notification thread pool of the gateway service cluster, the gateway service cluster can quickly synchronize the business data of the external system, and avoid the difficulty in accurately obtaining business data when the external system fails and the excessive business data synchronization that overwhelms the service center cluster.
[0071] It should be noted that the gateway service cluster also caches the current business status of each external system. After receiving the business request of the target external system, the gateway service cluster needs to determine the target external system and the current business status of the target external system based on the seq sequence number. If the current business status is blown, the gateway service cluster obtains the blow preset information of the target external system from the service center cluster. If the current business status is normal, the gateway service cluster will forward the business request to the target external system normally and receive the business request response fed back by the target external system. Among them, the blow preset information is used to notify the target external system that the fuse has been blown.
[0072] Step S20: determining the fuse judgment condition of the external system according to the preset fuse configuration;
[0073] In this embodiment, the fuse configuration is set in the service center cluster of the distributed system. In the process of the distributed system determining whether the fuse needs to be executed, the service center cluster can determine the fuse and send the fuse instruction to the gateway service cluster, or the gateway service cluster can obtain the fuse configuration of the target external system from the service center cluster and determine whether the fuse action needs to be executed.
[0074] In one embodiment, the gateway service cluster synchronously caches the business data of the target external system, and sends a data update request to the service center cluster at the interval of the scheduled task, and obtains the business data stored in the database through the service center cluster, thereby updating the business data cached in the gateway service cluster. After updating the business data, the gateway service cluster obtains the fuse configuration of the target external system stored in the service center cluster, and determines the fuse judgment condition of the target external system according to the fuse configuration to determine whether the updated business data meets the fuse requirement. Among them, obtaining the business data stored in the database through the service center cluster can avoid cascading failures caused by the difficulty of the distributed system in timely obtaining business data and judging the fuse when the external system fails.
[0075] Exemplarily, the gateway service cluster refreshes at cyclic intervals, calls the interface provided by the central service cluster, and sends the data update request to the service center cluster based on a preset time interval. The service center cluster receives the data update request, performs a simple authentication, queries the local cache or persistent storage data, summarizes the queried business data, and returns it to the gateway in the gateway service cluster that issued the data update request.
[0076] In another embodiment, the service center cluster can summarize the stored business data to generate summary information of the business data. The summary information includes the abnormal proportion, abnormal number and average response time of the business data. The service center cluster can compare the summary information with the fuse judgment condition in the fuse configuration, and when judging the fuse, send the fuse instruction to the gateway corresponding to the target external system in the gateway service cluster to execute the fuse action.
[0077] Furthermore, the distributed management system supports the management end to adjust the fuse configuration of different external systems. The adjusted fuse configuration takes effect through interval refresh or manual triggering. Among them, the fuse configuration supports personalized function configuration such as exemption circuit breaker or blocking circuit breaker, supports modifying the fuse within the specified error code range, and collects statistics on the operation status of the external institutional unit system. The management mechanism is implemented in the circuit breaker to facilitate timely tracking and adjustment of the fuse thresholds of different external systems.
[0078] Step S30: When the service data meets the fuse judgment condition, the fuse action of the external system is executed.
[0079] In this embodiment, the fuse configuration is configured with a fuse judgment condition, wherein the fuse judgment can be based on a fuse threshold as a fuse judgment condition, or based on a trained neural network model as a fuse judgment condition, to analyze the business data and determine whether a fuse action needs to be executed.
[0080] In one example, the distributed system can determine the fuse judgment conditions and the corresponding fuse configuration according to the manually configured fuse threshold. The fuse threshold includes an abnormal proportion threshold, an abnormal number threshold, and an average response time threshold. Among them, within the specified time window, when the abnormal request percentage of the target external system exceeds the abnormal proportion threshold, and / or the abnormal response number exceeds the abnormal number threshold, and / or the average response time exceeds the average response time threshold, the gateway service system will trigger the fuse.
[0081] In another example, the distributed system can also analyze the collected business data through a neural network model to determine whether a fuse action needs to be executed. The neural network model captures the temporal dependencies in the data through a long short-term memory network (LSTM) and a deep belief network (DBN) for feature learning and dimensionality reduction. Based on business data, the target external system can be evaluated in multiple dimensions such as data throughput and response time to determine the working status of the target external system, thereby determining whether a fuse needs to be executed.
[0082] Furthermore, after determining to execute the circuit breaking action, the gateway service cluster executes the circuit breaking action through the circuit breaker configured in the gateway.
[0083] The embodiment of the present application obtains and saves the business data corresponding to the business request response of the external system through the gateway service cluster when forwarding the business, and determines the fuse judgment conditions corresponding to different external systems according to the preset fuse configuration, and judges the business data according to the fuse judgment conditions. When the business data meets the fuse judgment conditions, the circuit breaker deployed in the gateway service cluster executes the fuse action of the external system, so as to timely perform the fuse according to the abnormal situation of the business data of the external system, avoid the failure of the external system from spreading to the distributed system, and improve the stability of the distributed system.
[0084] Based on the same inventive concept, the present application also provides a second embodiment, referring to Figure 4 , Figure 4 This is a flow chart of the second embodiment of the fuse control method of the distributed system of the present application.
[0085] In this embodiment, as described in step S30, when the service data meets the fuse judgment condition, after executing the fuse action of the external system, steps S40 to S43 are also included:
[0086] Step S40: determining the service status of the external system based on the preset time;
[0087] Step S41: When the service status is blown, a detection message is sent to the external system, and a detection response from the external system is received;
[0088] Step S42: verifying the detection response according to the fuse recovery condition of the external system in the fuse configuration;
[0089] Step S43: When the detection response meets the fuse recovery condition, executing the fuse recovery action of the external system.
[0090] In this embodiment, after the fuse is blown, the gateway service cluster will start the fuse recovery mechanism. The fuse recovery mechanism can obtain the detection response of the external system based on the detection message by sending the detection message at a fixed time. The gateway service system can verify the detection response based on the fuse recovery condition in the fuse configuration, and execute the fuse recovery action of the external system when the detection response meets the fuse recovery condition.
[0091] In one embodiment, the gateway service cluster detects the external organization unit system based on a preset detection interval, and generates a detection result based on the acquired detection response, and synchronizes it to the service center cluster. The service center cluster determines whether to restore the fuse based on the detection result and the fuse configuration.
[0092] For example, refer to Figure 2 and Figure 5 , Figure 5 This is a schematic diagram of the fuse recovery process involved in this embodiment. The external agency gateway service cluster caches the last successful business request as a cache message, and obtains the cache message as a detection message to detect the availability of the external system. Consistent with normal requests, the external agency gateway service cluster synchronizes the business request response to the service center cluster, and the service center cluster synchronously returns the successful reception to the external agency gateway service cluster. The service center cluster asynchronously records data and performs fuse logic processing. If the fuse is not restored, it remains as it is. If the fuse is restored, the business recovery information is sent to the gateway service cluster. The gateway service cluster restores the fuse after receiving the business recovery information.
[0093] In this embodiment, after verifying the detection response according to the fuse recovery condition of the external system in the fuse configuration as described in step S42, steps S44 to S45 are also included:
[0094] Step S44: obtaining the fusing time of the external system and determining the fusing time window of the external system;
[0095] Step S45: When the fuse time is greater than the fuse time window, the fuse recovery action is executed.
[0096] It should be noted that in order to avoid the failure of detection message detection due to system-level limitations of external systems such as current limiting, anti-duplicate, and network attack prevention strategies, the fuse of the gateway service cluster is equipped with a service retry function based on the fuse time window. Based on this service retry function, the gateway service cluster can automatically restore the fuse after the fuse time of the external system reaches the fuse time window.
[0097] For example, Figure 6 As shown, Figure 6 The flowchart of the service retry function involved in this embodiment is shown in FIG. Among them, the service center cluster checks the business status of all external systems based on the retry interval time, determines all external systems in the fuse state, and determines the fuse time of the external system. The service center cluster screens out the external systems whose fuse time exceeds the fuse time window to determine the external systems that perform fuse recovery. The service center cluster notifies the gateway service cluster through the interface, and after the gateway in the gateway service cluster receives it, it refreshes the routing and business data and restores the fuse.
[0098] The embodiment of the present application repeats the availability detection of the external system after the fuse is blown, based on the last successful service request as a detection message within the fuse time window, and performs fuse recovery when the detection response meets the fuse recovery condition or the fuse time reaches the fuse time window.
[0099] Since the system introduced in the second embodiment of the present application is a system used to implement the method of the first embodiment of the present application, based on the method introduced in the first embodiment of the present application, the person skilled in the art can understand the specific structure and deformation of the system, so it is not repeated here. All systems used in the method of the first embodiment of the present application belong to the scope of protection of this application.
[0100] Based on the same inventive concept, the present application also provides a third embodiment, referring to Figure 7 , Figure 7 This is a flow chart of the third embodiment of the fuse control method of the distributed system of the present application.
[0101] In this embodiment, the distributed system fuse control method further includes steps S50 to S53:
[0102] Step S50: when the service data meets the fuse judgment condition, obtaining the information notification template of the fuse action, and determining the service data and the fuse threshold;
[0103] Step S51: Fill the service data and the fuse threshold into the information notification template to generate a fuse notification;
[0104] Step S52: Outputting the fuse notification through a preset fuse notification channel;
[0105] Step S53: Execute the fuse action based on the external system.
[0106] In this embodiment, the distributed system also has a circuit breaker notification function and a circuit breaker recording function. When the circuit breaker is broken or restored, the administrator can be notified through group information, text messages, emails, etc., and the system behavior can be recorded to facilitate real-time monitoring and early warning of the system.
[0107] Specifically, when the distributed system determines that the fuse condition is met, the information notification template of the fuse action is obtained, and the abnormal data information and the fuse threshold in the business data are filled into the information notification template to generate a fuse notification. The abnormal data information includes the abnormal proportion, abnormal number and average response time of the business request response. The fuse notification is output through the preset fuse notification channel. Among them, the fuse notification threshold can be selected as one or more of group information, SMS, and email.
[0108] Exemplarily, the distributed system can output the fuse notification in the group through a preset group link. For example, the distributed system outputs "the total number of financial requests within
[120] seconds is
[101] , the number of timeouts is
[81] , and the threshold of [80%] has been reached, and the financial service has been fused" as group information in the group, and sends "Financial service has been restored" after the fuse is restored. Alternatively, the distributed system can send the group information to the administrator's mobile terminal through a text message via a phone number pre-stored in the system.
[0109] Furthermore, the distributed system can record the circuit breaking in the form of logs. After determining the circuit breaking time of the circuit breaking action and obtaining the business data, the business data and the circuit breaking time are associated with the corresponding external system to generate the circuit breaking record, and the circuit breaking record is sorted based on the circuit breaking time to generate the circuit breaking log.
[0110] It should be noted that in the process of performing fuse judgment through the neural network model, the neural network model can also automatically adjust the fuse judgment condition based on the fuse records within the preset time in the fuse log, so as to avoid abnormal on and off of the target external system. For example, within the preset time, the target external system has multiple fuses, and the fuse time of each fuse is short, the neural network model can increase the threshold of the fuse judgment condition.
[0111] In an embodiment of the present application, the distributed system also has a fuse notification function and a fuse recording function, which can notify and record the fuse when it blows, so as to facilitate real-time monitoring and early warning of the system.
[0112] Since the system introduced in the third embodiment of the present application is a system used to implement the method of the first embodiment of the present application, based on the method introduced in the first embodiment of the present application, the person skilled in the art can understand the specific structure and deformation of the system, so it is not repeated here. All systems used in the method of the first embodiment of the present application belong to the scope of protection of the present application.
[0113] The present application provides a fuse control device for a distributed system, the device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the fuse control method for the distributed system in the above-mentioned embodiment one.
[0114] Reference below Figure 8 , which shows a schematic diagram of the structure of a fuse control device for a distributed system suitable for implementing an embodiment of the present application. The fuse control device for a distributed system in the embodiment of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The fuse control device of the distributed system shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0115] like Figure 8As shown, the fuse control device of the distributed system may include a processing device 1001 (e.g., a core processor, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. Various programs and data required for the operation of the fuse control device of the distributed system are also stored in RAM1004. The processing device 1001, ROM1002, and RAM1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 can allow the fuse control device of the distributed system to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a fuse control device of a distributed system with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have instead.
[0116] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0117] The fuse control device of the distributed system provided by the present application adopts the fuse control method of the distributed system in the above embodiment, which can solve the technical problem that the distributed system is prone to cascading failures due to the propagation of faults in the external system. Compared with the prior art, the beneficial effects of the fuse control device of the distributed system provided by the present application are the same as the beneficial effects of the fuse control method of the distributed system provided by the above embodiment, and other technical features in the fuse control device of the distributed system are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0118] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0119] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0120] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the fuse control method of the distributed system in the above-mentioned embodiment.
[0121] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0122] The computer-readable storage medium may be included in the fuse control device of the distributed system; or may exist independently without being assembled into the fuse control device of the distributed system.
[0123] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the fuse control device of the distributed system, the fuse control device of the distributed system: after receiving a service request, forwards the service request to an external system, and determines and saves service data based on the service request response of the external system; determines the fuse judgment condition of the external system according to a preset fuse configuration; and executes the fuse action of the external system when the service data meets the fuse judgment condition.
[0124] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0125] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0126] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0127] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned distributed system fuse control method, and can solve the technical problem that the distributed system is prone to cascading failures due to the propagation of faults in the external system. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the distributed system fuse control method provided by the above-mentioned embodiment, and will not be repeated here.
[0128] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for controlling the breaking of a distributed system, characterized in that: The method comprises the following steps: After receiving the service request, forwarding the service request to the external system, and determining and saving the service data based on the service request response of the external system; Determining the fuse judgment condition of the external system according to the preset fuse configuration; When the service data meets the fuse judgment condition, the fuse action of the external system is executed.
2. The method according to claim 1, characterized in that After receiving the service request, the steps of forwarding the service request to the external system and determining and saving the service data based on the service request response of the external system include: After receiving the service request, identifying the service request and determining a target external system; forwarding the service request to the target external system, and receiving a response to the service request fed back by the target external system; Determine a response time corresponding to the service request, and generate and save the service data according to the response time and the service request response.
3. The method according to claim 2, characterized in that After the step of identifying the service request and determining the target external system after receiving the service request, the method further includes: Determining the service status of the target external system; When the service status is blown, obtaining and returning blown preset information of the target external system; When the service status is normal, the steps of forwarding the service request to the target external system and receiving the service request response fed back by the target external system are performed.
4. The method according to claim 1, characterized in that After the step of executing the fusing action of the external system when the service data meets the fusing judgment condition, the method further includes: Determining the service status of the external system based on a preset time; When the service status is blown, sending a detection message to the external system and receiving a detection response from the external system; Verifying the detection response according to the fuse recovery condition of the external system in the fuse configuration; When the detection response meets the fuse recovery condition, a fuse recovery action of the external system is executed.
5. The method according to claim 4, characterized in that Before the step of verifying the detection response according to the fuse recovery condition of the external system in the fuse configuration, the step further includes: Obtaining a fusing time of the external system and determining a fusing time window of the external system; When the fuse time is greater than the fuse time window, the fuse recovery action is performed.
6. The method according to claim 1, characterized in that Before the step of determining the fuse judgment condition of the external system according to the preset fuse configuration, the method further includes: Obtaining preset fuse thresholds, where the fuse thresholds include an abnormality ratio threshold, an abnormality quantity threshold, and an average response time threshold; The fuse configuration is determined according to the fuse threshold.
7. The method according to claim 1, characterized in that When the service data meets the fuse judgment condition, the step of executing the fuse action of the external system also includes: When the service data meets the fuse judgment condition, obtaining the information notification template of the fuse action, and determining the service data and the fuse threshold; Filling the service data and the fuse threshold into the information notification template to generate a fuse notification; Outputting the fuse notification through a preset fuse notification channel; Based on the external system, the fuse action is performed.
8. The method according to claim 7, characterized in that After the step of executing the fusing action of the external system when the service data meets the fusing judgment condition, the method further includes: Determine the fusing time of the fusing action and obtain the service data; Associating the service data with the fuse time with the corresponding external system to generate a fuse record; The blown records are sorted based on blown time to generate a blown log.
9. A fuse control device for a distributed system, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the fuse control method for a distributed system according to any one of claims 1 to 8.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the fuse control method of the distributed system according to any one of claims 1 to 8 are implemented.
Citation Information
Cited By
Task scheduling and arranging system, method and equipment and storage medium
CN120596230A
A task scheduling and orchestration system, method, device and storage medium
CN120596230B
