Scheduling method and device of server

By obtaining and analyzing server health values ​​to determine the server type and scheduling the backup server when a failure type is detected, the problem of failure to effectively identify server exceptions in the prior art is solved, and more accurate server scheduling is achieved.

CN119938304APending Publication Date: 2025-05-06CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411781373.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The prior art fails to effectively consider the actual service status of the server in server scheduling, resulting in the server still being scheduled to process data requests when an exception occurs on the server, resulting in service exceptions.

Method used

By obtaining the server health value of the target server, including the server response value and the server resource value, determine the server type based on these values ​​and the target threshold. If the server type is a failure type, its backup server is scheduled to process the target request.

Benefits of technology

It realizes a more accurate determination of the server status, avoiding continuing to schedule the target server to process requests when the server response value is higher than the target threshold, thereby achieving the technical effect of accurately scheduling the server.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938304A_ABST
    Figure CN119938304A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of servers, and discloses a server scheduling method and device, and the method comprises the steps: responding to a received target request, and determining a target server corresponding to the target request; obtaining a server health value of the target server; determining a server type of the target server according to the server health value and a target threshold value; and if the server type of the target server is the first type, scheduling a standby server of the target server to process the target request. Therefore, whether the server type is the fault type is determined based on the server response value of the target server, and then the standby server of the target server is scheduled to process the target request according to the server type being the fault type, so that the internal exception of the server can be identified, the server state can be determined more accurately, and the user experience is improved. And the condition that the server response value is higher than the target threshold value is avoided, and the target server is continuously scheduled to process the target request, so that the technical effect of accurately scheduling the server is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of servers, and in particular to a scheduling method and device for a server. Background Art

[0002] CDN (Content Delivery Network) refers to a group of server clusters distributed at edge nodes in various regions. The server clusters store copies of network data and enable users to obtain cached resources nearby based on the distance between the server and the user, thereby speeding up access and sharing the pressure on the source site server.

[0003] Currently, the scheduling of servers only considers the resource utilization rate of the servers, but does not consider the actual service status of the servers. When an abnormality occurs within the service, such as repeated process crashes or frequent request response errors, the system will still schedule the server to process data requests because high resource utilization has not been achieved, resulting in service abnormalities. Summary of the invention

[0004] In view of this, the present invention provides a server scheduling method, apparatus, computer equipment, storage medium, and computer program product to solve the problem of how to accurately schedule servers.

[0005] In a first aspect, the present invention provides a scheduling method for a server, the method comprising:

[0006] In response to receiving the target request, determining a target server corresponding to the target request;

[0007] Get the server health value of the target server. The server health value includes any of the following: server response value; server resource value and server response value;

[0008] Determine the server type of the target server based on the server health value and the target threshold;

[0009] If the server type of the target server is a first type, a backup server of the target server is scheduled to process the target request, and the first type is a failure type.

[0010] The server scheduling method provided by the present invention has the following advantages:

[0011] By obtaining the server health value of the target server, the server health value at least includes the server response value, or additionally includes the server resource value; according to the server health value and the target threshold, the server type of the server is determined; if the server type of the target server is a fault type, the backup server of the target server is scheduled to process the target request. Therefore, based on the server response value of the target server, it is determined whether the server type is a fault type, and then according to the server type being a fault type, the backup server of the target server is scheduled to process the target request, which can identify the internal abnormality of the server, and then achieve more accurate determination of the server status, avoid continuing to schedule the target server to process the target request when the server response value is higher than the target threshold, thereby achieving the technical effect of accurately scheduling the server.

[0012] In an optional implementation, determining the server type of the target server according to the server health value and the target threshold value includes:

[0013] When the server health value includes a server response value and a server resource value, comparing a maximum value of the server response value and the server resource value with a target threshold value to obtain a first comparison result;

[0014] According to the first comparison result, the server type of the target server is determined.

[0015] In an optional implementation, obtaining a server response value includes:

[0016] Obtain an average response time ratio and an error status code ratio of the target server within the first predetermined time, wherein the average response time ratio is the ratio of the difference between the average response time and the minimum response time to the difference between the maximum response time and the minimum response time, and the error status code ratio is the ratio of the number of error status codes generated by the server within the first predetermined time to the total number of response status codes;

[0017] The maximum value of the average response time ratio and the error status code ratio is taken as the server response value;

[0018] Alternatively, detecting whether the target server is restarted within the first predetermined time or the average response time is greater than the maximum response time;

[0019] If so, the server's response value is determined to be the maximum response value.

[0020] In an optional implementation, if the server type of the target server is the first type, scheduling a standby server of the target server to process the target request includes:

[0021] Get the server types of multiple servers and the response delay time of each server;

[0022] A server with the smallest response delay time and a server type of the second type is determined as a backup server, and the second type is a normal type.

[0023] In an optional embodiment, the method further includes:

[0024] When the server type of the target server is the first type, detecting the server resource value of the target server;

[0025] If the server resource value is less than the target threshold, detecting a server response value of the target server; and,

[0026] Depending on the server response value, do any of the following:

[0027] If the server response value is less than the target threshold, the server type of the target server is modified;

[0028] If the time during which the server response value is greater than or equal to the target threshold is greater than the preset time, an alarm message is sent to the monitoring end, indicating that the target server failure recovery has timed out.

[0029] In an optional implementation, obtaining the server resource value of the target server includes:

[0030] Obtain an average usage rate of each target resource of the target server within a second predetermined time to obtain multiple average usage rates;

[0031] The average usage rate with the largest value among the multiple average usage rates is used as the server resource value.

[0032] In a second aspect, the present invention provides a scheduling device for a server, the device comprising:

[0033] A response module, configured to determine a target server corresponding to the target request in response to receiving the target request;

[0034] The acquisition module is used to acquire the server health value of the target server, where the server health value includes any one of the following: server response value; server resource value and server response value;

[0035] A determination module, used to determine the server type of the target server according to the server health value and the target threshold;

[0036] The scheduling module is used to schedule a backup server of the target server to process a target request if the server type of the target server is a first type, and the first type is a fault type.

[0037] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the server scheduling method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0038] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the server scheduling method of the first aspect or any corresponding embodiment thereof.

[0039] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions, wherein the computer instructions are used to enable a computer to execute the server scheduling method of the above-mentioned first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 This is a schematic diagram of the connection relationship between an edge gateway and a server according to an embodiment of the present invention;

[0042] Figure 2 is one of the flow charts of the scheduling method of the server according to an embodiment of the present invention;

[0043] Figure 3 This is a second flowchart of the server scheduling method according to an embodiment of the present invention;

[0044] Figure 4 is a schematic diagram of a scheduling device of a server according to an embodiment of the present invention;

[0045] Figure 5 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0047] According to an embodiment of the present invention, a scheduling method embodiment of a server is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0048] CS (Cache Server): Cache refers to a technology that stores network content (such as web pages, files, pictures, videos, and other resources) that users need to access frequently in a server that is close to the user and has a fast access speed to improve the access speed of the content. The CS server is an intermediate server located between the client and the original server, used to store the above-mentioned network content.

[0049] Figure 1 Schematic diagram of the connection relationship between an edge gateway and a server according to an embodiment of the present invention. Figure 1 As shown, the edge gateway includes: a cache server level mapping module, a heartbeat detection module, a quality detection module, and a data synchronization module.

[0050] Both the primary cache server and the backup cache server include: a cache server level calculation module and an alarm module.

[0051] The cache server level mapping module in the edge gateway is connected to the cache server level calculation module in the main cache server and the backup cache server respectively, and is used to obtain the allocation of the backup cache server according to the level (i.e., server type) of the main cache server. The heartbeat detection module in the edge gateway is used to send heartbeat packets to the main cache server and the backup cache server to confirm whether the main cache server and the backup cache server are alive. If not, the corresponding server can be directly marked as a fault type. The quality detection module in the edge gateway is used to detect the link quality between the cache server and the edge gateway, including latency and packet loss rate. When there are multiple cache servers with the same or similar server health values, the cache server with a small latency can be preferentially selected. The cache server level mapping module in the edge gateway is also used to record the main and backup cache servers and data cache expiration times corresponding to the data request. When the cached data is judged to be expired, the corresponding record is deleted. The next time the data request is received, the corresponding main cache server and backup cache server are preferentially searched from the cache server level mapping module. If the request volume of the data reaches the hot data standard defined by the business, the cache data corresponding to the data request is synchronized to the cache server of the normal type. When both the primary cache server and the backup cache server are unavailable, the request can be preferentially assigned to a server with a lower health value of a normal type of server. The data synchronization module in the edge gateway is used to synchronize the data in the primary cache server to the backup cache server. The alarm modules in the primary cache server and the backup cache server are connected to the control platform (i.e., the monitoring end) to synchronize the alarm information to the operation and maintenance personnel through the control platform.

[0052] In this embodiment, a server scheduling method is provided, which can be used for the above-mentioned edge gateway. Figure 2 is one of the flow charts of the scheduling method of the server according to an embodiment of the present invention, such as Figure 2 The above method includes:

[0053] Step S201, in response to receiving a target request, determining a target server corresponding to the target request.

[0054] In this embodiment, the target server may be the primary cache server. The target request may be a data request for requesting the network content. After receiving the target request, the edge gateway may use a URL Hash (Uniform Resource Locator Hash) algorithm to select a target server for processing the data request.

[0055] Step S202, obtaining the server health value of the target server.

[0056] In this embodiment, the above server health value includes any one of the following: a server response value; a server resource value and the above server response value.

[0057] The server health value indicates the current status of the server. The server response value can be the speed at which the server responds to requests. The server resource value can be the current resource usage of the server, such as processor, memory, storage space, etc.

[0058] Step S203: determining the server type of the target server according to the server health value and the target threshold.

[0059] In this embodiment, the target threshold may be a maximum acceptable value of response time, load, memory usage, etc. The servers may be classified into different types based on the comparison between the acquired server health value and the target threshold.

[0060] Step S204: If the server type of the target server is the first type, scheduling a backup server of the target server to process the target request.

[0061] In this embodiment, the first type mentioned above is a fault type.

[0062] The backup server may be a server that synchronizes the cache data on the target server and whose server type is not a faulty server. If the target server is determined to be a faulty server, the backup server of the target server needs to be scheduled to process the target request. Specifically, the target request may be forwarded to the backup server through the edge gateway.

[0063] The server scheduling method provided by the present invention has the following advantages:

[0064] By obtaining the server health value of the target server, the server health value at least includes the server response value, or additionally includes the server resource value; according to the server health value and the target threshold, the server type of the server is determined; if the server type of the target server is a fault type, the backup server of the target server is scheduled to process the target request. Therefore, based on the server response value of the target server, it is determined whether the server type is a fault type, and then according to the server type being a fault type, the backup server of the target server is scheduled to process the target request, which can identify the internal abnormality of the server, and then achieve more accurate determination of the server status, avoid continuing to schedule the target server to process the target request when the server response value is higher than the target threshold, thereby achieving the technical effect of accurately scheduling the server.

[0065] In some optional implementations, determining the server type of the target server according to the server health value and the target threshold value includes:

[0066] When the server health value includes the server response value and the server resource value, the maximum value of the server response value and the server resource value is compared with the target threshold to obtain a first comparison result; based on the first comparison result, the server type of the target server is determined.

[0067] In this embodiment, two health values ​​(server response value and server resource value) are not used directly for separate comparison, but the maximum value of the server response value and the server resource value is selected to compare with the target threshold. If the resource value of the server (such as CPU load, memory usage, etc.) is very high, even if the response value is low, the actual load of the target server may have exceeded its processable range, resulting in potential service performance degradation. By selecting the maximum value of the server response value and the server resource value, the system can more conservatively evaluate the load of the target server, discover potential problems in advance and make adjustments.

[0068] The server scheduling method in this embodiment enables the system to more flexibly and accurately evaluate the health status of the target server, thereby preventing a single indicator (such as response time or resource usage) from causing misjudgment. Selecting the maximum value of the server response value and the server resource value as the comparison object can ensure timely intervention when the server load is high, thereby improving the reliability and performance of the system. Multiple factors are comprehensively considered to determine whether the server is healthy, thereby making accurate scheduling decisions.

[0069] In some optional implementations, obtaining the server response value includes:

[0070] Obtain the average response time ratio and error status code ratio of the target server within the first predetermined time, where the average response time ratio is the ratio of the difference between the average response time and the minimum response time to the difference between the maximum response time and the minimum response time, and the error status code ratio is the ratio of the number of error status codes generated by the server within the first predetermined time to the total number of response status codes; take the maximum value of the average response time ratio and the error status code ratio as the server response value; or, detect whether the target server is restarted within the first predetermined time or whether the average response time is greater than the maximum response time; if so, determine that the response value of the server is the maximum response value.

[0071] In this embodiment, the first predetermined time may be a sampling period. The above average response time ratio is the ratio of the difference between the average response time and the minimum response time to the difference between the maximum response time and the above minimum response time, that is, (t-t_min) / (t_max-t_min), where t is the average response time, t_max is the maximum response time, and t_min is the minimum response time. The maximum response value is 1.

[0072] The server scheduling method in this embodiment measures the health and response quality of the server by comprehensively calculating the average response time ratio and the error status code ratio. The final server response value is determined by the maximum value of these two ratios, and special processing of restart and abnormal response time must also be considered. This method helps to evaluate the server load status more carefully and dynamically, identify problems in time and take corresponding measures. In this way, server performance can be monitored and optimized more accurately, misjudgment caused by fluctuations in a single indicator can be reduced, and the stability and reliability of the system can be improved.

[0073] In some optional implementations, if the server type of the target server is the first type, scheduling a backup server of the target server to process the target request includes:

[0074] The server types of multiple servers and the response delay time of each server are obtained; and a server with the smallest response delay time and a server type of the second type is determined as the above-mentioned backup server, and the above-mentioned second type is a normal type.

[0075] In this embodiment, the response delay time is the network delay between each server and the edge gateway. A normal type of server can be a server that can normally process business requests with large amounts of data, or a server that can only normally process requests within the acceptable data volume range of the system, but the number of concurrent requests received does not exceed the acceptable data volume range.

[0076] The server scheduling method in this embodiment dynamically selects a backup server to ensure that even when the target server type is the first type and fails or is overloaded, the system can continue to work normally through an efficient backup server scheduling strategy. By making intelligent selections based on server type and response delay time, the reliability and response speed of the system can be improved, ensuring timely processing of user requests.

[0077] In some optional implementations, the above method further includes:

[0078] When the server type of the target server is the first type, the server resource value of the target server is detected; if the server resource value is less than the target threshold, the server response value of the target server is detected; and according to the server response value, any one of the following operations is performed: if the server response value is less than the target threshold, the server type of the target server is modified; if the duration that the server response value is greater than or equal to the target threshold is greater than a preset duration, an alarm message is sent to the monitoring end, and the alarm message indicates that the fault recovery of the target server has timed out.

[0079] In this embodiment, when it is determined that the target server is of a fault type, it is detected whether the server resource value drops below the target threshold. When the server resource value is lower than the target threshold, it is detected whether the server response value is lower than the target threshold. If so, the server type is modified. If the server response value is not lower than the target threshold within a predetermined period of time, it is determined that the target server fault recovery has timed out, and an alarm message is sent to the monitoring end.

[0080] The server scheduling method in this embodiment dynamically monitors the server resource value and the server response value, sets the target threshold and the predetermined time limit, ensures that the resource bottleneck or failure of the server can be discovered in time, and makes flexible adjustments and alarms according to the real-time status, which helps to improve the operation efficiency of the server, optimize the use of resources, and ensure the high availability and reliability of the system.

[0081] In some optional implementations, obtaining the server resource value of the target server includes:

[0082] The average usage rate of each target resource of the target server within the second predetermined time is obtained to obtain multiple average usage rates; the average usage rate with the largest value among the multiple average usage rates is used as the server resource value.

[0083] In this embodiment, the average utilization rates (server response values ​​and server resource values) of multiple target resources are not directly used for separate comparison, but the average utilization rate with the largest value among the multiple average utilization rates is selected as the above server resource value for comparison with the target threshold. If the processor load of the target server is very high, even if the memory utilization rate is low, the actual load of the target server may have exceeded its processable range, resulting in potential service performance degradation.

[0084] The server scheduling method in this embodiment prevents the misjudgment of the server type of the target server due to the influence of the resource usage rate of a single server. Selecting the average usage rate with the largest value among multiple average usage rates as the above server resource value can ensure timely intervention when the server resource usage rate is high, thereby improving the reliability and performance of the system. Multiple factors are comprehensively considered to determine whether the server is healthy, so as to make accurate scheduling decisions.

[0085] Figure 3 FIG. 2 is a second flowchart of a scheduling method for a server according to an embodiment of the present invention. Figure 3 As shown, it includes: performing cache server detection and server level grouping. Upon receiving a user request (i.e., a target request), a primary cache server is selected from the first group. Determine whether the target server level is 1 (i.e., a server that can normally process business requests with large amounts of data). If so, respond to the user data request and end; if not, determine whether the target server level is 2 (i.e., it can only normally process requests within the acceptable data range of the system). If so, determine whether the current request reaches the upper limit of the request (if so, assign the data request to the backup server; if not, respond to the user data request); if not, determine whether the target server level is 3 (i.e., the fault type). If so, assign the data request to the backup server. Determine whether the backup server service level is 3. If so, assign the data request to the server with the smallest service value in Group 1; if not, respond to the user data request and end.

[0086] The present invention provides a scheduling device for a server. Figure 4 is a schematic diagram of a scheduling device for a server according to an embodiment of the present invention, the device comprising:

[0087] A response module 401 is used to determine a target server corresponding to the target request in response to receiving the target request;

[0088] The acquisition module 402 is used to acquire the server health value of the target server, where the server health value includes any one of the following: a server response value; a server resource value and the server response value;

[0089] The determination module 403 is used to determine the server type of the target server according to the server health value and the target threshold;

[0090] The scheduling module 404 is used to schedule a backup server of the target server to process the target request if the server type of the target server is a first type, and the first type is a failure type.

[0091] The server scheduling device provided by the present invention has the following advantages:

[0092] By obtaining the server health value of the target server, the server health value at least includes the server response value, or additionally includes the server resource value; according to the server health value and the target threshold, the server type of the server is determined; if the server type of the target server is a fault type, the backup server of the target server is scheduled to process the target request. Therefore, based on the server response value of the target server, it is determined whether the server type is a fault type, and then according to the server type being a fault type, the backup server of the target server is scheduled to process the target request, which can identify the internal abnormality of the server, and then achieve more accurate determination of the server status, avoid continuing to schedule the target server to process the target request when the server response value is higher than the target threshold, thereby achieving the technical effect of accurately scheduling the server.

[0093] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0094] The scheduling device of the server in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0095] The embodiment of the present invention also provides a computer device having the above Figure 4 The scheduling device of the server is shown.

[0096] See also Figure 5 , Figure 5 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 5 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.

[0097] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include an integrated circuit. The integrated circuit may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0098] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0099] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0100] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0101] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0102] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0103] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0104] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A server scheduling method, characterized in that: The method comprises: In response to receiving the target request, determining a target server corresponding to the target request; Obtaining a server health value of the target server, wherein the server health value includes any one of the following: a server response value; a server resource value and the server response value; Determining a server type of the target server according to the server health value and the target threshold; If the server type of the target server is a first type, a backup server of the target server is scheduled to process the target request, and the first type is a failure type.

2. The method according to claim 1, characterized in that The determining the server type of the target server according to the server health value and the target threshold value includes: When the server health value includes the server response value and the server resource value, comparing a maximum value of the server response value and the server resource value with the target threshold value to obtain a first comparison result; The server type of the target server is determined according to the first comparison result.

3. The method according to claim 1, characterized in that Obtain the server response value, including: Obtaining an average response time ratio and an error status code ratio of the target server within a first predetermined time, wherein the average response time ratio is a ratio of a difference between an average response time and a minimum response time to a difference between a maximum response time and the minimum response time, and the error status code ratio is a ratio of the number of error status codes generated by the server within the first predetermined time to the total number of response status codes; The maximum value of the average response time ratio and the error status code ratio is used as the server response value; Alternatively, detecting whether the target server is restarted within a first predetermined time or the average response time is greater than the maximum response time; If yes, it is determined that the response value of the server is the maximum response value.

4. The method according to any one of claims 1 to 3, characterized in that If the server type of the target server is the first type, scheduling a standby server of the target server to process the target request includes: Get the server types of multiple servers and the response delay time of each server; A server with the smallest response delay time and a second type of server type is determined as the backup server, and the second type is a normal type.

5. The method according to any one of claims 1 to 3, characterized in that The method further comprises: When the server type of the target server is the first type, detecting a server resource value of the target server; If the server resource value is less than the target threshold, detecting a server response value of the target server; and Based on the server response value, perform any of the following operations: If the server response value is less than the target threshold, modifying the server type of the target server; If the time during which the server response value is greater than or equal to the target threshold is longer than a preset time, an alarm message is sent to the monitoring end, where the alarm message indicates that the target server failure recovery has timed out.

6. The method according to any one of claims 1 to 3, characterized in that Obtaining the server resource value of the target server includes: Obtain an average usage rate of each target resource of the target server within a second predetermined time to obtain multiple average usage rates; The average usage rate with the largest value among the multiple average usage rates is used as the server resource value.

7. A scheduling device for a server, characterized in that: The device comprises: A response module, configured to determine a target server corresponding to the target request in response to receiving the target request; An acquisition module, used to acquire a server health value of the target server, wherein the server health value includes any one of the following: a server response value; a server resource value and the server response value; A determination module, configured to determine a server type of the target server according to the server health value and a target threshold; The scheduling module is used to schedule a backup server of the target server to process the target request if the server type of the target server is a first type, and the first type is a failure type.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the server scheduling method according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the server scheduling method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to cause a computer to execute the server scheduling method according to any one of claims 1 to 6.