Method, device and equipment for configuring server resources required by business service operation
By real-time monitoring and dynamic adjustment of server resources during business services, the load overload problem caused by blindly reducing the number of servers is solved, and the hardware cost reduction and business service performance are guaranteed.
Patent Information
- Application Number
- CN202510357054.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-06-27
AI Technical Summary
When the business service is running, blindly reducing the number of servers may cause server load to be overloaded and affect the operation stability of the business service.
By monitoring the current status information of the physical server and virtual server used by the target business service during operation in real time, server resources are dynamically adjusted to ensure load balancing and performance optimization.
It realizes that while reducing hardware costs, it ensures the operating performance and stability of business services, and dynamically adjusts server resources, avoids load overload and resource waste.
Smart Images

Figure CN120216196A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of server management, and in particular, to a method, device, and equipment for configuring server resources required for business service operation. Background Art
[0002] When a business service is running, in order to ensure the stability of the business service operation, multiple physical servers are often allocated to provide the business service. However, considering the high hardware cost of physical servers, when optimizing resource utilization for the purpose of cost reduction and efficiency improvement, virtualization technology is usually adopted to run multiple virtual machines on one physical server, thereby reducing the number of physical servers and improving the utilization rate of hardware resources. However, if the hardware cost is simply and crudely optimized and the number of servers is blindly reduced, it is easy to cause overloading of the server load, thereby affecting the operation stability of the business service. Summary of the Invention
[0003] This application provides a method, device, and equipment for configuring server resources required for business service operation, which can achieve the purpose of dynamically adjusting server resources based on the performance and load information during the actual operation of the business service. The technical solutions are as follows:
[0004] According to one aspect of this application, a method for configuring server resources required for business service operation is provided. The method includes:
[0005] Obtain the first current server number and the first current load of the physical servers used by the target business service during the current operation, as well as the second current server number and the second current load of the virtual servers;
[0006] When there is a need to adjust the server resources of the target business service, based on the first current server number, the first current load, the second current server number, and the second current load, determine the first target server number of the physical servers and the second target server number of the virtual servers after adjustment;
[0007] Based on the first target server number and the second target server number, configure the server resources used by the target business service during operation.
[0008] According to another aspect of this application, a device for configuring server resources required for business service operation is provided. The device includes:
[0009] An obtaining module, configured to obtain the first current server number and the first current load of the physical servers used by the target business service during the current operation, as well as the second current server number and the second current load of the virtual servers;
[0010] A determination module, configured to, when there is a need to adjust server resources for the target business service, determine a first target number of physical servers and a second target number of virtual servers after adjustment based on the first current number of servers, the first current load, the second current number of servers, and the second current load;
[0011] A configuration module, configured to configure the server resources used by the target business service during operation based on the first target number of servers and the second target number of servers.
[0012] According to one aspect of the present application, there is provided an electronic device, including: a processor and a memory storing a program, the program including instructions that, when executed by the processor, cause the processor to execute the method for configuring server resources required for the operation of the business service as described above.
[0013] According to another aspect of the present application, there is provided a non-transitory computer-readable storage medium storing computer instructions, the computer instructions being used to cause the computer to execute the method for configuring server resources required for the operation of the business service as described above.
[0014] According to another aspect of the present application, there is provided a computer program product, which includes computer instructions stored in a computer-readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method for configuring server resources required for the operation of the above-mentioned business service.
[0015] The beneficial effects brought by the technical solution provided by the embodiments of the present application at least include:
[0016] By monitoring in real time the first current number of physical servers and the first current load used by the target business service during operation, as well as the second current number of virtual servers and the second current load, when there is a need to adjust server resources for the target business service, it is possible to make a decision on how to adjust the number of physical servers and virtual servers used by the business service based on the first current number of servers, the first current load, the second current number of servers, and the second current load, so as to determine the first target number of physical servers and the second target number of virtual servers after adjustment, and then configure the server resources used by the target business service according to the first target number of servers and the second target number of servers; the purpose of dynamically adjusting server resources based on the performance and load information during the actual operation of the business service is realized, so that when reducing costs and increasing efficiency, the performance and load factors of the business service can be taken into account to ensure the operation performance of the business service. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In the following description of exemplary embodiments with reference to the accompanying drawings, more details, features, and advantages of the present application are disclosed. In the drawings:
[0018] Figure 1 The flowchart of a method for configuring server resources required for the operation of a service is shown, according to an exemplary embodiment of the present application;
[0019] Figure 2 The flowchart of another method for configuring server resources required for the operation of a service is shown, according to an exemplary embodiment of the present application;
[0020] Figure 3 It is a schematic diagram of the process of adjusting server resources provided by an exemplary embodiment of the present application;
[0021] Figure 4 The flowchart of another method for configuring server resources required for the operation of a service is shown, according to an exemplary embodiment of the present application;
[0022] Figure 5 The flowchart of another method for configuring server resources required for the operation of a service is shown, according to an exemplary embodiment of the present application;
[0023] Figure 6 It is a schematic diagram of the process of adjusting server resources by a server resource adjustment system provided by an exemplary embodiment of the present application;
[0024] Figure 7 It is a schematic diagram of the structure of a device for configuring server resources required for the operation of a service provided by an embodiment of the present application;
[0025] Figure 8 The block diagram of an exemplary electronic device capable of implementing the embodiments of the present application is shown. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0026] Embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Instead, these embodiments are provided to more thoroughly and completely understand the present application. It should be understood that the drawings and embodiments of the present application are only for exemplary purposes and are not used to limit the protection scope of the present application.
[0027] It should be understood that the various steps described in the method embodiments of the present application can be executed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present application is not limited in this regard.
[0028] As used herein, the term "comprising" and its variations are open-ended, i.e., "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description. It should be noted that the concepts such as "first" and "second" mentioned in the present application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units. It should be noted that the modifiers "one" and "multiple" mentioned in the present application are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more". The names of the messages or information exchanged between multiple devices in the embodiments of the present application are only for illustrative purposes and are not used to limit the scope of these messages or information.
[0029] The following describes the solution of the present application with reference to the drawings, and details the technical solutions provided by the embodiments of the present application through specific embodiments and their application scenarios.
[0030] When a business service is running, in order to ensure the stability of the business service operation, multiple physical servers are often allocated to provide the business service. However, considering the high hardware cost of physical servers, in the optimization of resource utilization for the purpose of cost reduction and efficiency improvement, virtualization technology is usually adopted to run multiple virtual machines on one physical server, thereby reducing the number of physical servers and improving the utilization rate of hardware resources. However, if the hardware cost is simply and crudely optimized and the number of servers is blindly reduced, it is easy to cause the server load to be overloaded, thereby affecting the operation stability of the business service.
[0031] In order to ensure the operation performance of the business service while reducing the hardware cost of the business service, the present application provides a method for realizing cost reduction of business servers based on load and performance, which automatically adjusts the server resources used by the business service by real-time monitoring the performance load of the business system, improving the resource utilization rate and management efficiency. Please refer to Figure 1 , which shows a flowchart of a method for configuring server resources required for the operation of a business service according to an exemplary embodiment of the present application. This method is described by taking its application to a server resource adjustment system as an example. As Figure 1 shown, the method includes:
[0032] Step 101: Obtain the first current server quantity and the first current load of the physical servers used by the target business service during the current operation, as well as the second current server quantity and the second current load of the virtual servers.
[0033] Among them, the idea of the server cost reduction method provided in this application is as follows: By comprehensively analyzing the system performance and load, when the system load becomes high, the load is evenly distributed by quickly expanding the number of virtual servers, so as to ensure that the performance of the business service always remains in a highly efficient and reliable state. On the contrary, when the system load becomes low, the number of servers is quickly reduced to ensure that the business service does not waste too many resources, so that the system always remains in a highly efficient operating state with relatively low costs.
[0034] Based on the above idea of the server cost reduction method, in a possible implementation, during the operation of the business service, the server status information of the servers currently used by the business service is monitored in real time. The server status information may include: the first current server quantity of the physical servers currently used by the business service, the first current load of each physical server, the second current server quantity of the virtual servers currently used, the second current load of each virtual server, etc. It may also include other performance index information, such as processor utilization rate, memory consumption, network traffic, etc.; so as to automatically adjust the server resources used by the business service by analyzing the above performance and load information later.
[0035] Optionally, if the target business server does not use virtual servers during the current operation, the second current server quantity is 0, and the second current load is also 0.
[0036] Step 102: When there is a need to adjust the server resources of the target business service, determine the first target server quantity of the physical servers and the second target server quantity of the virtual servers based on the first current server quantity, the first current load, the second current server quantity, and the second current load.
[0037] When there is a need to adjust the server resources of the target business service, in order to take into account the server load status during the server resource adjustment and avoid blindly adjusting and affecting the operation stability of the business service, in a possible implementation, based on the first current server quantity, the first current load, the second current server quantity, and the second current load, make a decision on how to adjust the server quantity of the physical servers and the server quantity of the virtual servers used by the business service, so as to determine the first target server quantity of the physical servers and the second target server quantity of the virtual servers after adjustment.
[0038] Optionally, when determining whether there is a need to adjust the server resources for the target business service, the adjustment instruction can be triggered manually, and then based on the adjustment instruction, the adjustment process is executed; or the server resource adjustment system can automatically determine whether to adjust the server resources of the target business service according to the monitored performance and load information.
[0039] Step 103: Configure the server resources used by the target business service during operation based on the first target server quantity and the second target server quantity.
[0040] Furthermore, based on the adjusted first target server quantity and the second target server quantity, configure the server resources used by the target business service during operation.
[0041] Exemplarily, if 4 physical servers are deployed for the target business service during the current operation, and the current load of each physical server is 20%, the hardware cost of 4 physical servers needs to be borne; when adjusting the server resources, based on the current load information and the number of servers, 3 physical servers can be replaced with virtual servers. After the adjustment, the number of physical servers used by the target business service is 1, and the number of virtual servers is 3. One physical server can be virtualized into 3 virtual servers using virtualization technology; it is equivalent to only using the hardware cost of two physical servers, and the load of each server remains unchanged, ensuring the operation performance of the business service while achieving a reduction in hardware costs.
[0042] In summary, the embodiment of the present application provides a method for configuring the server resources required for the operation of a business service: by real-time monitoring of the first current server quantity and the first current load of the physical servers used by the target business service during operation, and the second current server quantity and the second current load of the virtual servers, when there is a need to adjust the server resources for the target business service, based on the first current server quantity, the first current load, the second current server quantity, and the second current load, it is possible to decide how to adjust the number of physical servers and the number of virtual servers used by the business service, so as to determine the first target server quantity of the physical servers and the second target server quantity of the virtual servers after the adjustment, and then configure the server resources used by the target business service according to the first target server quantity and the second target server quantity; achieving the purpose of dynamically adjusting the server resources based on the performance and load information during the actual operation of the business service, so that when reducing costs and increasing efficiency, the performance and load factors of the business service can be taken into account to ensure the operation performance of the business service.
[0043] In the inventive concept of the present application, there are mainly two resource adjustment directions. The first direction is to reduce the number of physical servers and increase the number of virtual servers to reduce the hardware cost. The second direction is to increase the number of virtual servers to improve the running performance of business services and avoid overloading affecting the running performance of business services. In this embodiment, the specific resource adjustment process in the first direction will be exemplarily described first.
[0044] Please refer to Figure 2 , which shows a flowchart of a configuration method for server resources required for running another business service according to an exemplary embodiment of the present application. This method will be described by taking its application to a server resource adjustment system as an example. As Figure 2 shown, this method includes:
[0045] Step 201, obtain the first current server number and the first current load of the physical servers used by the target business service during the current running process, as well as the second current server number and the second current load of the virtual servers.
[0046] The implementation manner of step 201 can refer to step 101, and will not be elaborated here in this embodiment.
[0047] Step 202, if both the first current load and the second current load are less than the first load threshold, determine that there is an adjustment requirement for the server resources of the target business service, and determine the first adjustment strategy for the physical servers and the virtual servers. The first adjustment strategy is used to reduce the number of physical servers and increase the number of virtual servers.
[0048] Considering that when using virtual servers to replace physical servers to reduce the hardware cost, the virtual servers are implemented through virtualization technology on physical servers, that is, substantially one physical server needs to bear the loads of multiple virtual servers. If the average load of each virtual server is too high, it will obviously also affect the running performance of business services. Therefore, when judging whether to adopt the first direction to adjust the number of physical servers and virtual servers, a first load threshold is set, and the relationship between the first current load and the second current load and the first load threshold is judged. If both the first current load and the second current load are less than the first load threshold, it indicates that the physical servers can be replaced by virtual servers to achieve the reduction of hardware cost without affecting the running performance of business services. That is to say, if both the first current load and the second current load are less than the first load threshold, determine that there is an adjustment requirement for the server resources of the target business service, and determine the first adjustment strategy for the physical servers and the virtual servers. The first adjustment strategy is used to reduce the number of physical servers and increase the number of virtual servers.
[0049] Optionally, the first load threshold may be determined by the number of virtual servers that a physical server can be virtualized into. The more the number of virtual servers, the smaller the first load threshold. Exemplarily, if a physical server can be virtualized into 3 virtual servers, the first load threshold may be 25%, so as to prevent the sum of the loads of the three virtual servers from exceeding the maximum load of the physical server and affecting the operation performance of the business service.
[0050] Step 203: Based on the first adjustment policy, the first current number of physical servers, and the second current number of physical servers, determine the first target number of physical servers and the second target number of virtual servers after adjustment.
[0051] Under the first adjustment policy, mainly considering how many physical servers are to be replaced with virtual servers, only the factor of the number of servers currently required for the deployment of the business service needs to be considered. Therefore, in a possible implementation manner, based on the first adjustment policy, the first current number of physical servers, and the second current number of physical servers, jointly determine the first target number of physical servers and the second target number of virtual servers after adjustment.
[0052] When making a decision on the number of servers of various types after adjustment under the first adjustment policy, in order not to affect the operation performance of the business service, try to ensure that the total number of servers required for the business service remains unchanged. Correspondingly, in an exemplary example, step 203 may include steps 203A to 203D.
[0053] Step 203A: Under the first adjustment policy, based on the sum of the first current number of physical servers and the second current number of physical servers, determine the total number of servers required for the target business service.
[0054] Under the first adjustment policy, first determine the total number of servers required for the target business service during the current operation process, that is, based on the sum of the first current number of physical servers and the second current number of physical servers, determine the total number of servers required for the target business service.
[0055] Step 203B: Obtain the number of virtual servers that each physical server is virtualized into.
[0056] Furthermore, in order to minimize the hardware resource cost, that is, to minimize the number of physical servers as much as possible, by obtaining the number of virtual servers that each physical server is virtualized into, so as to determine the second target number of virtual servers after adjustment based on the number of virtual servers and the total number of servers.
[0057] Step 203C: Based on the total number of servers and the number of virtual servers, determine the second target number of virtual servers after adjustment.
[0058] First, round down the ratio of the total number of servers to the number of virtual servers, and then multiply the result of the round-down by the number of virtual servers to obtain the second target number of servers for the adjusted virtual servers. Exemplarily, under the first adjustment strategy, the formula for determining the second target number of servers can be as shown in formula (1):
[0059] Second target number of servers = floor(total number of servers / number of virtualizations) * number of virtualizations (1)
[0060] If the first current number of servers is 4 and the second current number of servers is 0, then the total number of servers is 4 and the number of virtual servers is 3. Substituting the total number of servers and the number of virtual servers into formula (1), the second target number of servers can be calculated as 3.
[0061] Step 203D: Based on the second target number of servers and the total number of servers, determine the first target number of servers for the adjusted physical servers.
[0062] After a part of the physical servers are replaced by virtual servers, the number of physical servers is the difference between the total number of servers and the number of virtual servers. Correspondingly, the difference between the total number of servers and the second target number of servers is determined as the first target number of servers for the adjusted physical servers.
[0063] Exemplarily, if the first current number of servers is 4 and the second current number of servers is 0, then the total number of servers is 4 and the number of virtual servers is 3. Substituting the total number of servers and the number of virtual servers into formula (1), the second target number of servers can be calculated as 3, and the corresponding first target number of servers for the adjusted physical servers is 1.
[0064] As Figure 3 shown, it is a schematic diagram of the server resource adjustment process provided by an exemplary embodiment of the present application. As Figure 3 shown, a business service is currently deployed using 4 physical servers. During the service operation, the load of each physical server is 20%, and the cost of 4 physical servers needs to be borne; during server resource adjustment, if one physical server can be virtualized into 3 virtual servers through virtualization technology, on the premise of ensuring service stability, 3 physical servers are replaced by 3 virtual servers. That is, after the server resource adjustment, the business service only needs to use one physical server and 3 virtual servers to complete the deployment, and the load of each server will not change, which is equivalent to only using the cost of two physical servers, thus enabling the reduction of hardware costs.
[0065] Step 204: Based on the first target number of servers and the second target number of servers, configure the server resources used by the target business service during operation.
[0066] The implementation of step 204 can refer to step 103, which will not be elaborated in this embodiment.
[0067] In this embodiment, when it is determined that the current load of each server currently used by the business service is less than the first load threshold, it is decided to adopt the first adjustment strategy to adjust the number of physical servers and virtual servers, that is, to downsize physical servers and expand virtual servers. When deciding on the number of various types of servers after adjustment, referring to the number of servers currently in use can reduce the hardware resource cost while avoiding affecting the running performance of the business service.
[0068] This embodiment gives an exemplary description of the specific resource adjustment process in the second direction. Please refer to Figure 4 , which shows a flowchart of another method for configuring server resources required for business service operation according to an exemplary embodiment of the present application. This method is described by taking its application to a server resource adjustment system as an example. As Figure 4 shown, this method includes:
[0069] Step 401, obtain the first current server quantity and the first current load of the physical servers used by the target business service during the current operation, and the second current server quantity and the second current load of the virtual servers.
[0070] The implementation of step 401 can refer to step 101, which will not be elaborated in this embodiment.
[0071] Step 402, if both the first current load and the second current load are greater than the second load threshold, determine that the target business service has a server resource adjustment requirement, and determine the second adjustment strategy for the physical servers and the virtual servers. The second adjustment strategy is used to increase the number of virtual servers.
[0072] Among them, the second direction is to increase the number of virtual servers in the case of high load to improve the running performance of the business service, avoid affecting the running performance of the business service due to overloading, and at the same time, only increasing the number of virtual servers can also reduce the hardware cost brought by directly increasing physical servers.
[0073] In a possible implementation, a second load threshold is set. By judging whether the first current load and the second current load are greater than the second load threshold, it is determined that the target business service has a server resource adjustment requirement, and the number adjustment strategy for the physical servers and the virtual servers is determined as the second adjustment strategy. The second adjustment strategy is used to increase the number of virtual servers.
[0074] Exemplarily, the second load threshold may be 40%; alternatively, the second load threshold may also be equal to the first load threshold, and the determination method of the second load threshold may also be the same as that of the first load threshold, so as to avoid the sum of the loads of multiple virtual servers running on the same physical server being greater than the maximum load of the physical server after adding virtual servers, which affects the operation performance of business services.
[0075] Step 403: Based on the second adjustment policy, the first current server quantity, the first current load, the second current server quantity, and the second current load, determine the first target server quantity of the physical server and the second target server quantity of the virtual server after adjustment.
[0076] Under the second adjustment policy, when adding virtual servers, not only the server quantity but also the load situation needs to be considered. In a possible implementation manner, based on the second adjustment policy, the first current server quantity, the first current load, the second current server quantity, and the second current load, determine the first target server quantity of the physical server and the second target server quantity of the virtual server after adjustment.
[0077] Specifically, the process of adjusting the server quantity under the second adjustment policy may include the following steps, that is, step 403 may also include steps 403A to 403E.
[0078] Step 403A: Under the second adjustment policy, determine the first average load that each physical server needs to bear and the second average load that the virtual server needs to bear.
[0079] Considering that the second adjustment policy is triggered when the load is too high, it is first necessary to obtain the first average load that the physical server can bear and the second average load that the virtual server can bear under the second adjustment policy, and then make a decision on the quantity of the adjusted servers based on the first average load and the second average load.
[0080] Optionally, considering that different business services have different service importance levels, it is more inclined to provide better response performance for business services with higher service importance levels, and the smaller the average load borne by each server, the faster the response speed of the business service. Then, in order to meet the differentiated business service requirements, under the second adjustment strategy, different first average loads and second average loads are set according to the service importance levels of different business services. In the actual adjustment process, the service importance level of the target business service can be obtained, and based on the service importance level and the preset association relationship (the preset association relationship is the association relationship between different business importance levels and the first average load and the second average load), the first average load that each physical server needs to bear and the second average load that the virtual server needs to bear are determined, and the first average load and the second average load are negatively correlated with the service importance level.
[0081] Exemplarily, the preset association relationship can be as shown in Table 1:
[0082] Table 1
[0083] Service Importance Level First Average Load Second Average Load High 20% 20% Medium 30% 25% Low 40% 30%
[0084] As can be seen from Table 1, the first average load can be different from the second average load, or the first average load is the same as the second average load. And the higher the service importance level, the less the first average load and the second average load; the lower the service importance level, the higher the first average load and the second average load.
[0085] Step 403B, determine the third current load based on the difference between the first average load and the first current load.
[0086] In the case where both the physical server and / or the virtual server on which the business service runs are overloaded, first, according to the difference between the first average load and the first current load of each physical server, determine the load that cannot be borne on the basis of the first average load that the existing physical servers can bear. Specifically, obtain the load difference between the first current load and the first average load of each physical server, and then sum up the load differences corresponding to each physical server to determine the third current load that the physical server cannot bear (or overflows).
[0087] Step 403C, determine the fourth current load based on the sum of the third current load and the second current load.
[0088] Furthermore, based on the sum of the third current load and the second current load of each virtual server, determine the total fourth current load that the adjusted virtual server needs to bear.
[0089] Step 403D, determine the second target server quantity of the adjusted virtual server based on the fourth current load and the second average load.
[0090] Given the total fourth current load that the adjusted virtual servers need to bear and the second average load that each virtual server can bear, the second target number of servers for the adjusted virtual servers can be determined according to the ratio of the fourth current load to the second average load. Specifically, the second target number of servers is the ceiling result of the ratio of the fourth current load to the second average load.
[0091] Among them, under the second adjustment policy, the formula for determining the second target number of servers can be as shown in formula (2):
[0092] Second target number of servers = Ceiling(Fourth current load / Second average load) (2)
[0093] Exemplarily, if the first current number of servers is 1, the second current number of servers is 2, the first current load of each physical server is 60%, and the second current load of each virtual server is 60%, both of which are greater than the second load threshold of 30%; then under the second adjustment policy, the first average load of the physical servers is 20%, and the second average load of the virtual servers is 20%. First, based on the second current load and the first average load, it is calculated that the third current load that 1 physical server cannot bear is 40%; then, based on the third current load and the second current load, it is determined that the total fourth current load that the adjusted virtual servers need to bear is 40% + 60% * 2 = 160%; then, substituting the fourth current load and the second average load of the virtual servers into formula (2), the second target number of servers for the adjusted virtual servers can be calculated as 8.
[0094] Step 403E, determine the first current number of servers as the first target number of servers for the adjusted physical servers.
[0095] In this embodiment, by adding virtual servers to bear the overflow load of the existing physical servers and the overflow load of the existing virtual servers, the running performance of the business service is improved. And in order to avoid excessive increase in the hardware cost of physical servers by adding physical servers, the deployed number of physical servers is not adjusted. Then, the first current number of servers of the deployed physical servers is determined as the first target number of servers for the adjusted physical servers.
[0096] Step 404, configure the server resources used by the target business service during operation based on the first target number of servers and the second target number of servers.
[0097] The implementation manner of step 404 can refer to step 103, which will not be elaborated in this embodiment.
[0098] In this embodiment, when it is determined that the load of the server used by the business service is relatively high, an appropriate number of virtual servers are added based on information such as the load status and the number of servers, so as to improve the running performance of the business service while minimizing the cost of the additional hardware resources required.
[0099] Please refer to Figure 5 , which shows a flowchart of another method for configuring server resources required for running a business service according to an exemplary embodiment of the present application. This method is described by taking its application to a server resource adjustment system as an example. As Figure 5 shown, the method includes:
[0100] Step 501, obtain the first current number of physical servers and the first current load used by the target business service during the current running process, as well as the second current number of virtual servers and the second current load.
[0101] Optionally, in addition to real-time monitoring of the first current number of physical servers, the first current load, the second current number of virtual servers, and the second current load used by the target business service during the current running process, performance information of the physical servers and virtual servers is also obtained, such as information on processor utilization, memory consumption, and network traffic, so as to comprehensively consider the performance information and load information and jointly decide how to adjust the server resources used by the target business service.
[0102] Step 502, when there is a need to adjust the server resources of the target business service and the service performance of the physical servers and virtual servers is normal, determine the first target number of physical servers and the second target number of virtual servers after adjustment based on the first current number of physical servers, the first current load, the second current number of virtual servers, and the second current load.
[0103] When there is a need to adjust the server resources of the target business service and the service performance of the physical servers and virtual servers is normal, the first target number of physical servers and the second target number of virtual servers after adjustment can be determined based on the first current number of physical servers, the first current load, the second current number of virtual servers, and the second current load. This ensures that the current service performance of the business service can be guaranteed when adjusting the server resources.
[0104] Optionally, the first target number of physical servers and the second target number of virtual servers after adjustment can also be jointly analyzed and determined based on the first current number of physical servers, the first current load, the second current number of virtual servers, the second current load, and the performance information. Exemplarily, statistical analysis, machine learning, artificial intelligence and other technologies can be used in the analysis and decision-making method to achieve more precise optimization decisions for server resources.
[0105] Step 503: Configure the server resources used during the operation of the target business service based on the first target server quantity and the second target server quantity.
[0106] The implementation manner of step 503 can refer to step 103, and will not be elaborated herein in this embodiment.
[0107] Please refer to Figure 6 , which is a schematic diagram of the process of server resource adjustment by the server resource adjustment system provided in an exemplary embodiment of the present application. Among them, the server resource adjustment system consists of a control center, a scheduling center, an automatic scaling system, a business service, a server resource pool, and a monitoring system; the monitoring system obtains performance load data from the business service in real time and forwards the performance load data to the control center. The control center judges the current performance and load conditions, determines the usage of hardware resources and the potential optimization space, and finally forms a result plan for expanding or shrinking the hardware resources of the system to the scheduling center. After receiving the input information from the control center, the scheduling center calls the physical server or virtual server resources in the server resource pool to the automatic scaling system to expand or shrink the business service, so as to increase or decrease the server resources of the business service.
[0108] In this embodiment, by obtaining service performance information, it is possible to take into account multiple factors such as cost, load, and performance during the server resource optimization decision-making, realize more reasonable resource allocation adjustment, and ensure the effectiveness of server resource adjustment.
[0109] Please refer to Figure 7 , which is a schematic structural diagram of a configuration device for server resources required for the operation of a business service provided in an embodiment of the present application. Exemplarily, as Figure 7 shown, the device 700 includes:
[0110] An obtaining module 701, configured to obtain the first current server quantity and the first current load of the physical server used by the target business service during the current operation, and the second current server quantity and the second current load of the virtual server;
[0111] A determining module 702, configured to determine the first target server quantity of the physical server and the second target server quantity of the virtual server after adjustment based on the first current server quantity, the first current load, the second current server quantity, and the second current load when there is a need to adjust the server resources of the target business service;
[0112] A configuration module 703, configured to configure the server resources used by the target business service during the operation based on the first target server quantity and the second target server quantity.
[0113] Optionally, the determining module 702 is further configured to:
[0114] If both the first current load and the second current load are less than a first load threshold, determine that there is an adjustment requirement for the server resources of the target service, and determine a first adjustment policy for the physical server and the virtual server, where the first adjustment policy is used to reduce the number of physical servers and increase the number of virtual servers;
[0115] Based on the first adjustment policy, the first current number of servers, and the second current number of servers, determine the first target number of servers of the physical server and the second target number of servers of the virtual server after adjustment.
[0116] Optionally, the determining module 702 is further configured to:
[0117] Under the first adjustment policy, based on the sum of the first current number of servers and the second current number of servers, determine the total number of servers required for the target service;
[0118] Obtain the virtual quantity of the virtual servers obtained by virtualizing each physical server;
[0119] Based on the total number of servers and the virtual quantity, determine the second target number of servers of the virtual server after adjustment;
[0120] Based on the second target number of servers and the total number of servers, determine the first target number of servers of the physical server after adjustment.
[0121] Optionally, the determining module 702 is further configured to:
[0122] If both the first current load and the second current load are greater than a second load threshold, determine that there is an adjustment requirement for the server resources of the target service, and determine a second adjustment policy for the physical server and the virtual server, where the second adjustment policy is used to increase the number of virtual servers;
[0123] Based on the second adjustment policy, the first current number of servers, the first current load, the second current number of servers, and the second current load, determine the first target number of servers of the physical server and the second target number of servers of the virtual server after adjustment.
[0124] Optionally, the determining module 702 is further configured to:
[0125] Under the second adjustment strategy, determine the first average load that each physical server needs to bear and the second average load that the virtual server needs to bear;
[0126] Based on the difference between the first average load and the first current load, determine the third current load;
[0127] Based on the sum of the third current load and the second current load, determine the fourth current load;
[0128] Based on the fourth current load and the second average load, determine the second target server quantity of the virtual server after adjustment;
[0129] Determine the first current server quantity as the first target server quantity of the physical server after adjustment.
[0130] Optionally, the determining module 702 is further configured to:
[0131] Under the second adjustment strategy, obtain the service importance level of the target business service;
[0132] Based on the service importance level, determine the first average load that each physical server needs to bear and the second average load that the virtual server needs to bear, and the first average load and the second average load are negatively correlated with the service importance level.
[0133] Optionally, the determining module 702 is further configured to:
[0134] When there is an adjustment requirement for server resources in the target business service and the service performances of the physical server and the virtual server are normal, based on the first current server quantity, the first current load, the second current server quantity, and the second current load, determine the first target server quantity of the physical server and the second target server quantity of the virtual server after adjustment.
[0135] An exemplary embodiment of the present application further provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program that can be executed by the at least one processor, and when the computer program is executed by the at least one processor, it is used to cause the electronic device to execute the method according to the embodiment of the present application.
[0136] An exemplary embodiment of the present application further provides a non-transitory computer-readable storage medium storing a computer program, where when the computer program is executed by a processor of a computer, it is used to cause the computer to execute the method according to the embodiment of the present application.
[0137] An exemplary embodiment of the present application further provides a computer program product, including a computer program, wherein the computer program, when executed by a processor of a computer, is configured to cause the computer to execute the method according to the embodiments of the present application.
[0138] Referring to Figure 8 , a block diagram of an electronic device 800 that can be used as a server or a client of the present application will now be described. It is an example of a hardware device that can be applied to various aspects of the present application. The electronic device is intended to represent various forms of digital electronic computer devices, such as, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or claimed herein.
[0139] As Figure 8 shown, the electronic device 80 includes a computing unit 801, which can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 802 or the computer program loaded from the storage unit 808 into the random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. The input / output (I / O) interface 805 is also connected to the bus 804.
[0140] A plurality of components in the electronic device 800 are connected to the I / O interface 805, including: an input unit 806, an output unit 807, a storage unit 808, and a communication unit 809. The input unit 806 can be any type of device that can input information into the electronic device 800. The input unit 806 can receive input digital or character information, and generate key signal inputs related to the user settings and / or function controls of the electronic device. The output unit 807 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 808 can include but is not limited to a magnetic disk, an optical disk. The communication unit 809 allows the electronic device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0141] The computing unit 801 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 executes the various methods and processes described above. For example, in some embodiments, Figure 1 , Figure 2 , Figure 4 , Figure 5 The methods shown can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 800 via the ROM 802 and / or the communication unit 809. In some embodiments, the computing unit 801 can be configured to execute Figure 1 , Figure 2 , Figure 4 , Figure 5 the methods shown.
[0142] The program code for implementing the methods of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowchart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0143] In the context of the present application, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0144] As used in this application, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., a magnetic disk, an optical disk, a memory, a programmable logic device (PLD)) used to provide machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and / or data to a programmable processor.
[0145] To provide for interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide for interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic, speech, or tactile input).
[0146] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0147] A computer system can include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on respective computers and having a client-server relationship to each other.
Claims
1. A method for configuring server resources required for running a business service, characterized in that: The method comprises: Obtaining a first current server quantity and a first current load of physical servers used by the target business service during the current operation, and a second current server quantity and a second current load of virtual servers; When there is a demand for adjusting server resources of the target business service, determining a first target server number of the physical servers and a second target server number of the virtual servers after adjustment based on the first current server number, the first current load, the second current server number and the second current load; Based on the first target server quantity and the second target server quantity, server resources used by the target business service during operation are configured.
2. The method according to claim 1, characterized in that When there is a demand for adjusting server resources for the target business service, determining the adjusted first target server number of the physical servers and the second target server number of the virtual servers based on the first current server number, the first current load, the second current server number, and the second current load, includes: If both the first current load and the second current load are less than a first load threshold, determining that there is a demand for adjusting the server resources for the target business service, and determining a first adjustment strategy for the physical server and the virtual server, the first adjustment strategy being used to reduce the number of the physical servers and increase the number of the virtual servers; Based on the first adjustment strategy, the first current number of servers, and the second current number of servers, the first target number of servers of the physical servers and the second target number of servers of the virtual servers after adjustment are determined.
3. The method according to claim 2, characterized in that The determining, based on the first adjustment strategy, the first current server quantity, and the second current server quantity, the first target server quantity of the physical server and the second target server quantity of the virtual server after adjustment includes: Under the first adjustment strategy, determining the total number of servers required for the target business service based on the sum of the first current number of servers and the second current number of servers; Acquire the virtual quantity of the virtual servers obtained by virtualizing each of the physical servers; Determine the adjusted second target server quantity of the virtual server based on the total number of servers and the virtual quantity; Based on the second target server quantity and the total number of servers, the first target server quantity of the adjusted physical servers is determined.
4. The method according to claim 1, characterized in that: When there is a demand for adjusting server resources for the target business service, determining the adjusted first target server number of the physical servers and the second target server number of the virtual servers based on the first current server number, the first current load, the second current server number, and the second current load, includes: If both the first current load and the second current load are greater than a second load threshold, determining that there is a demand for adjusting the server resources for the target business service, and determining a second adjustment strategy for the physical server and the virtual server, the second adjustment strategy being used to increase the number of the virtual servers; Based on the second adjustment strategy, the first current number of servers, the first current load, the second current number of servers and the second current load, the first target number of servers of the physical servers and the second target number of servers of the virtual servers after adjustment are determined.
5. The method according to claim 4, characterized in that The step of determining the first target server number of the physical servers and the second target server number of the virtual servers after adjustment based on the second adjustment strategy, the first current server number, the first current load, the second current server number, and the second current load includes: Under the second adjustment strategy, determining a first average load that each of the physical servers needs to bear and a second average load that the virtual servers need to bear; determining a third current load based on a difference between the first average load and the first current load; determining a fourth current load based on the sum of the third current load and the second current load; Determining the second target server quantity of the virtual server after adjustment based on the fourth current load and the second average load; The first current server quantity is determined as the first target server quantity of the adjusted physical servers.
6. The method according to claim 5, characterized in that The step of determining the first average load required to be borne by each of the physical servers and the second average load required to be borne by the virtual servers under the second adjustment strategy includes: Under the second adjustment strategy, obtaining a service importance level of the target business service; Based on the service importance level, the first average load required to be borne by each physical server and the second average load required to be borne by the virtual server are determined, and the first average load and the second average load are negatively correlated with the service importance level.
7. The method according to any one of claims 1 to 6, characterized in that: When there is a demand for adjusting server resources for the target business service, determining the adjusted first target server number of the physical servers and the second target server number of the virtual servers based on the first current server number, the first current load, the second current server number, and the second current load, includes: When there is a need to adjust server resources for the target business service and the service performance of the physical server and the virtual server is normal, the first target server number of the physical server and the second target server number of the virtual server after adjustment are determined based on the first current server number, the first current load, the second current server number and the second current load.
8. A device for configuring server resources required for running a business service, characterized in that: The device comprises: An acquisition module, used to acquire a first current server quantity and a first current load of physical servers used by the target business service during the current operation, and a second current server quantity and a second current load of virtual servers; a determination module, configured to determine, when there is a need to adjust server resources for the target business service, a first target server number of the physical servers and a second target server number of the virtual servers after adjustment based on the first current server number, the first current load, the second current server number and the second current load; A configuration module is used to configure server resources used by the target business service during operation based on the first target server quantity and the second target server quantity.
9. An electronic device, comprising: processor; as well as Memory for storing programs, The program includes instructions, which, when executed by the processor, enable the processor to execute the method for configuring server resources required for the operation of a business service according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable the computer to execute the method for configuring server resources required for running a business service according to any one of claims 1 to 7.