Virtual service management method, electronic device, readable medium, and program product

By real-time monitoring and dynamic adjustment of virtual services, a function model is built to optimize the number and resource quota of back-end servers, which solves the problem of difficult to realize intelligent resource scheduling and virtual service strategy adjustment in the existing technology, and achieves efficient resource utilization and reduces operation and maintenance costs.

CN119781966APending Publication Date: 2025-04-08BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411810920.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

It is difficult for the prior art to realize intelligent resource scheduling and virtual service strategy adjustment based on real-time traffic, resulting in the possibility of service interruption or resource waste when high loads occur.

Method used

By monitoring the load information of virtual services and the resource usage information of the backend server in real time, a function model is built to describe the relationship between resource usage and load, and dynamically adjust the number of backend servers and resource quotas to achieve flexible resource scheduling.

Benefits of technology

Real-time expansion or reduction of server resources without manual intervention is achieved, operation and maintenance costs are reduced, resource waste or insufficient load, and service stability is ensured at high load and optimize resource usage at low load.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119781966A_ABST
    Figure CN119781966A_ABST
Patent Text Reader

Abstract

The invention provides a virtual service management method. The method comprises the following steps: acquiring load information of a virtual service and resource use information and load information of a back-end server; according to the load information of the virtual service, whether the number of the back-end servers needs to be adjusted is judged based on a set condition range; when it is determined that the number of the back-end servers needs to be adjusted, a function model used for describing the relation between resource use information and load information is constructed; calculating a required resource quota of the back-end server based on the function model; and dynamically adjusting the number of the back-end servers according to the resource quota. The disclosure also provides an electronic device, a computer readable medium, and a computer program product. According to the virtual service management method, the virtual service load information is collected in real time, the back-end server resources are dynamically adjusted based on the function model, optimization of service performance and resource utilization is achieved, and meanwhile the operation and maintenance cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer network technology, and in particular to a virtual service management method, an electronic device, a computer-readable medium, and a computer program product. Background Art

[0002] With the rapid development of network technology, the user scale and access volume of Internet applications have increased rapidly, which has put forward higher requirements for application service providers in terms of server processing power, computing intensity and service stability. In order to cope with large-scale user access needs, service providers usually use multiple servers to form a server cluster, and distribute user requests to the back-end server for processing through load balancing technology. This method can not only improve service performance, but also improve the reliability and scalability of the system. In the load balancing architecture, the abstract layer that uniformly provides service addresses and ports to the outside world is called a virtual service. The virtual service forwards the user's request to each real server at the back end through a scheduling algorithm, realizing the diversion of user requests and efficient allocation of resources.

[0003] Traditional load balancing systems have great limitations when facing dynamic changes in application traffic. Specifically, when the business traffic suddenly increases, insufficient backend server resources may cause request processing delays or even service interruptions; when the business traffic decreases, the backend server resources will not be reduced in time, which will cause resource waste. In addition, most current load balancers require operation and maintenance personnel to manually adjust virtual service configurations and server resource allocations, which is complex and inefficient, increases maintenance costs, and cannot meet the needs of modern service elastic management.

[0004] In recent years, with the continuous development and improvement of cloud computing and virtualization technologies, many service providers have gradually deployed application services on cloud computing and virtualization platforms, and implemented dynamic resource management through open API interfaces. However, existing technologies still find it difficult to achieve intelligent resource scheduling and virtual service policy adjustment based on real-time traffic. Specifically, how to efficiently monitor changes in business traffic and automatically adjust backend server resource quotas and load balancing policies based on monitoring data has become a technical difficulty in improving service availability and reducing operation and maintenance costs. Summary of the invention

[0005] The embodiments of the present disclosure provide a virtual service management method, an electronic device, a computer-readable medium, and a computer program product.

[0006] In a first aspect, an embodiment of the present disclosure provides a virtual service management method, comprising: obtaining load information of the virtual service and resource usage information and load information of the back-end server; judging whether it is necessary to adjust the number of the back-end servers based on the load information of the virtual service and based on a set range of conditions; when it is determined that the number of the back-end servers needs to be adjusted, constructing a function model for describing the relationship between the resource usage information and the load information; based on the function model, calculating the required resource quota of the back-end server; and dynamically adjusting the number of the back-end servers based on the resource quota.

[0007] In some embodiments, obtaining the load information of the virtual service and the resource usage information and load information of the backend server includes: collecting the load information of the virtual service and the resource usage information and load information of the backend server according to a set collection frequency.

[0008] In some embodiments, according to the load information of the virtual service, whether the number of the back-end servers needs to be adjusted is determined based on set conditions, including: performing statistical processing on the load information of the virtual service within a set collection period to obtain the processed load information of the virtual service; comparing the processed load information of the virtual service with the set condition range; and determining whether the number of the back-end servers needs to be adjusted based on the comparison result.

[0009] In some embodiments, based on the comparison result, it is determined whether the number of the back-end servers needs to be adjusted, including: when the load information of the processed virtual service exceeds the set condition range, it is determined that the back-end servers need to be expanded; when the load information of the processed virtual service is lower than the set condition range, it is determined that the back-end servers need to be reduced; when the processed load information is within the set condition range, it is determined to maintain the existing back-end servers.

[0010] In some embodiments, the load information of the virtual service within the set collection period is statistically processed to obtain the processed load information of the virtual service, including: calculating the average value of the load information of the virtual service within the set collection period, and obtaining the average load information of the virtual service as the processed load information of the virtual service; wherein the set condition range is determined by a set upper threshold and a lower threshold.

[0011] In some embodiments, when it is determined that the number of the back-end servers needs to be adjusted, a function model for describing the relationship between resource usage information and load information is constructed, including: processing the resource usage information and load information of the back-end servers to generate input data for fitting the function model; based on the input data, calculating the parameters of the function model using a fitting method; based on the calculated parameters, completing the function model for describing the relationship between resource usage information and load information.

[0012] In some embodiments, the resource usage information and load information of the back-end server are processed to generate input data for fitting the function model, including: for each time point in the set collection period at which collection is performed according to the collection frequency, the average resource usage information and average load information of all back-end servers at each time point are calculated; based on the average resource usage information and average load information of all time points in the set collection period, the input data for fitting the function model is generated.

[0013] In some embodiments, the function model is a linear relationship function model, wherein the dependent variable is load information and the independent variable is resource usage information.

[0014] In some embodiments, based on the function model, the required resource quota of the back-end server is calculated, including: when the load information of the processed virtual service exceeds the set condition range, calculating its overflow value exceeding the set upper limit threshold; based on the overflow value, using the linear relationship function model, calculating the resource quota of the back-end server that needs to be expanded.

[0015] In some embodiments, based on the function model, calculating the required resource quota of the back-end server further includes: when the load information of the processed virtual service is lower than the set condition range, calculating its underflow value which is lower than the lower limit threshold; based on the underflow value, using the linear relationship function model, calculating the resource quota of the back-end server that needs to be reduced.

[0016] In some embodiments, the number of the back-end servers is dynamically adjusted according to the resource quota, including: based on the resource quota of the back-end servers that need to be expanded, if there are available shut down servers, starting the shut down back-end servers that meet the resource quota; if there are no available shut down servers, automatically creating new back-end servers that meet the resource quota; and automatically adding the started or created back-end servers to the virtual service pool.

[0017] In some embodiments, dynamically adjusting the number of back-end servers according to the resource quota further includes: based on the resource quota of the back-end server that needs to be reduced, selecting a back-end server that meets the resource quota from all current back-end servers; setting the selected back-end server to a soft shutdown state and removing it from the virtual service pool; shutting down or destroying the selected back-end server.

[0018] In some embodiments, before obtaining the load information of the virtual service and the resource usage information and load information of the back-end server, it further includes: configuring the virtual service policy according to actual business needs to define the externally published address and port of the virtual service and referencing the virtual service pool policy and virtual service traffic monitoring template; configuring the virtual service pool policy to include information of all back-end server members; configuring the virtual service traffic monitoring template to set the upper and lower thresholds, collection frequency, and collection period according to actual business needs.

[0019] In a second aspect, an embodiment of the present disclosure provides an electronic device, comprising: one or more processors; a memory on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the virtual service management method described in the first aspect of the embodiment of the present disclosure.

[0020] In a third aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, and when the computer program is executed by a processor, the virtual service management method described in the first aspect of the embodiment of the present disclosure is implemented.

[0021] In a fourth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements the virtual service management method described in the first aspect of the embodiment of the present disclosure.

[0022] The disclosed virtual service management method can expand or reduce server resources in real time without manual intervention, thus reducing operation and maintenance costs. By accurately calculating the number of resources to be expanded or reduced, resource waste or insufficient load can be avoided, service stability can be guaranteed under high load, and resource usage can be optimized under low load. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 is a flow chart of a virtual service management method according to an embodiment of the present disclosure;

[0024] Figure 2 is a flowchart of a detailed implementation of a virtual service management method according to an embodiment of the present disclosure;

[0025] Figure 3 is a schematic diagram of the composition of an electronic device according to an embodiment of the present disclosure;

[0026] Figure 4 is a block diagram of a virtual service management system according to an embodiment of the present disclosure;

[0027] Figure 5 It is a business topology diagram of load balancing and backend server resource scheduling of the example disclosed in the present invention. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the technical solution of the present disclosure, the technical solution of the present disclosure is described in detail below with reference to the accompanying drawings.

[0029] Example embodiments will be described more fully below with reference to the accompanying drawings, but the example embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. On the contrary, the purpose of providing these embodiments is to make the present disclosure thorough and complete and to enable those skilled in the art to fully understand the scope of the present disclosure.

[0030] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.

[0031] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0032] The terms used herein are only used to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a", "an" and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "comprising" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded.

[0033] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined as such herein.

[0034] In this disclosure, unless otherwise specified, the following technical terms should be understood as follows:

[0035] A virtual service is a logical service unit configured on a load balancing device, which is used to process user requests and distribute them to backend servers for processing.

[0036] A load balancer is a device or software used to distribute user requests to backend servers to ensure system performance and availability.

[0037] Soft shutdown is a method of stopping the server smoothly, removing new requests first and then processing and completing existing tasks to avoid service interruption.

[0038] Bivariate Linear Regression is a method of predicting a dependent variable based on two independent variables.

[0039] A virtualization platform is a resource management system that supports virtual machines or containerized environments, enabling dynamic resource allocation and instance management.

[0040] The present disclosure aims to solve the following technical problems caused by the dynamic changes in the number of application service visits in the prior art:

[0041] It is impossible to dynamically adjust virtual service strategies based on traffic changes. When the application service traffic suddenly increases, the application service provider cannot perceive the traffic changes in real time. Due to the lack of automated monitoring and response mechanisms, it is impossible to dynamically adjust the virtual service strategies published to the outside world based on traffic changes, resulting in access failures, slow responses, or system crashes in services published by service providers, which seriously affects user experience and business availability.

[0042] Relying on manual operations, the maintenance cost is high and the efficiency is low; when the application service access volume changes (increases or decreases), the operation and maintenance personnel need to manually modify the virtual service configuration items (such as virtual service pools and virtual service members) and backend server configurations to adapt to new traffic requirements; the maintenance process is cumbersome and prone to errors, which increases the complexity and labor cost of manual operation and maintenance, and wastes a lot of human resources.

[0043] The lack of a scientific resource allocation mechanism leads to resource waste or insufficient processing capacity. When it is necessary to expand or reduce the server, there is a lack of an accurate measurement mechanism based on current traffic, making it impossible to scientifically determine the server resource quota to be expanded or reduced. Blindly expanding the server may cause too many resources to be idle and increase operating costs. When reducing the server, insufficient resources may cause the back-end server processing capacity to be unable to meet actual traffic needs, which may again cause access slowdown or service interruption.

[0044] By improving relevant technical means, the present disclosure hopes to achieve intelligent monitoring and real-time response to changes in access volume, reduce operation and maintenance complexity, optimize server resource allocation efficiency, and improve service stability and availability.

[0045] The present invention proposes a refined virtual service management method based on real-time traffic. The method monitors the business traffic on the load balancer in real time through a virtual service module, and finely adjusts the resource quota and load balancing strategy of the back-end server according to different peak values ​​of the traffic, so as to realize elastic scheduling and optimization of server resources.

[0046] The virtual service module monitors business traffic in real time and automatically expands or reduces the number of backend servers and resource quotas based on the collected load data without manual intervention, ensuring that the service remains stable during high traffic and conserves resources during low traffic. During peak traffic, the load is relieved by expanding servers to ensure user access experience; during low traffic, the operating cost is reduced by reducing the number of servers to avoid wasting resources.

[0047] The business traffic data collected by the virtual service mainly includes two parts. One part is the total number of concurrent connections of the virtual service on the load balancing device; the other part is the CPU usage value, memory usage value, and concurrent connection number of the backend server. The concurrency number of the virtual service reflects the connection requests on the current load balancer, which is used to evaluate whether the current virtual service needs to expand or reduce the backend server. The backend server resource usage value and number of connections are used to calculate the detailed resource quota when expanding or reducing the server. These data are used to calculate the amount of resources required to expand or reduce the server to ensure accurate resource allocation.

[0048] The implementation method and process of the virtual service management method disclosed in the present invention include: the virtual service module collects the current total number of concurrent connections on the virtual service at a specified frequency to evaluate the overall load situation, as well as the resource usage values ​​of all back-end servers and the number of concurrent connections of each server; compares the average number of concurrent connections in the current collection period with the set threshold; determines whether the server needs to be expanded or reduced based on the comparison result between the average number of concurrent connections and the threshold; then uses a specific algorithm to calculate the server resource value that needs to be expanded or reduced, and adjusts the server and the virtual service policy.

[0049] Figure 1 It is a flowchart of a virtual service management method according to an embodiment of the present disclosure.

[0050] First, refer to Figure 1 , the present disclosure provides a virtual service management method, including:

[0051] S11, obtaining load information of the virtual service and resource usage information and load information of the backend server;

[0052] S12, judging whether it is necessary to adjust the number of the backend servers based on the load information of the virtual service and the set condition range;

[0053] S13, when it is determined that the number of the backend servers needs to be adjusted, constructing a function model for describing the relationship between the resource usage information and the load information;

[0054] S14, calculating the required resource quota of the backend server based on the function model;

[0055] S15. Dynamically adjust the number of the backend servers according to the resource quota.

[0056] In some embodiments, obtaining the load information of the virtual service and the resource usage information and load information of the backend server includes:

[0057] According to the set collection frequency, the load information of the virtual service and the resource usage information and load information of the backend server are collected.

[0058] In the disclosed embodiment, the load information may include the number of concurrent connections and / or other load indicators, such as the number of requests per second (RPS), the request queue length, or the bandwidth utilization rate. The resource usage value may include the CPU usage value, the memory usage value, and other possible resource indicators, such as the disk I / O utilization rate. The traffic monitoring module of the virtual service may collect the total number of concurrent connections on the virtual service, the CPU usage value of each backend server, the memory usage value, and the number of concurrent connections of each backend server according to the set collection frequency.

[0059] In some embodiments, judging whether to adjust the number of the backend servers based on the load information of the virtual service and the set conditions includes:

[0060] Performing statistical processing on the load information of the virtual service within a set collection period to obtain processed load information of the virtual service;

[0061] Compare the processed load information of the virtual service with the set condition range;

[0062] Based on the comparison result, it is determined whether the number of the backend servers needs to be adjusted.

[0063] In the embodiment of the present disclosure, the processing method may include calculating an average value, a peak value or a rate of change, etc. After the set collection period is met (for example, a collection period of 300 seconds), the virtual service traffic monitoring module will collect 6 groups of total concurrent connections according to the set collection frequency (for example, once every 60 seconds); at the end of the collection period, the collected 6 groups of total concurrent connections are statistically processed, for example, the average total concurrent connections within the period are calculated.

[0064] In some embodiments, based on the comparison result, determining whether the number of the backend servers needs to be adjusted includes:

[0065] When the processed load information of the virtual service exceeds the set condition range, determining that the backend server needs to be expanded;

[0066] When the processed load information of the virtual service is lower than the set condition range, determining that the backend server needs to be reduced;

[0067] When the processed load information is within the set condition range, it is determined to keep the existing backend server.

[0068] In some embodiments, statistical processing is performed on the load information of the virtual service within a set collection period to obtain the processed load information of the virtual service, including:

[0069] Calculate the average value of the load information of the virtual service within the set collection period, and obtain the average load information of the virtual service as the processed load information of the virtual service;

[0070] The set condition range is determined by a set upper threshold and a set lower threshold.

[0071] In the disclosed embodiment, the business state of the current virtual service can be determined and the number of backend servers can be adjusted by comparing the average total number of concurrent connections and the condition range set by the upper threshold and the lower threshold (i.e., the busy threshold and the idle threshold). If the average total number of concurrent connections is greater than the upper threshold, it is determined that the current virtual service is in a busy state, and the backend server needs to be expanded to reduce the pressure of the load balancer; if the average total number of concurrent connections is less than the lower threshold, it is determined that the current virtual server is currently in an idle state, and the backend server needs to be reduced, and resources can be saved by shutting down or destroying some servers; if the average total number of concurrent connections is between the two thresholds, it is determined that the current configuration is normal, and the existing backend server configuration is kept unchanged; It should be understood by those skilled in the art that the set condition range may include a static threshold range, a dynamic adjustment range, or a comprehensive condition range, for example, the static threshold range can be defined by the set upper threshold and lower threshold, and the upper threshold and lower threshold can be set by the application service provider according to business needs to adapt to different load conditions and service strategies; the dynamic adjustment range can be calculated based on historical trends or prediction algorithms; the comprehensive condition range can combine different indicators to comprehensively evaluate whether the number of servers needs to be adjusted.

[0072] In some embodiments, when it is determined that the number of backend servers needs to be adjusted, a function model for describing the relationship between resource usage information and load information is constructed, including:

[0073] Processing resource usage information and load information of the backend server to generate input data for fitting the function model;

[0074] Based on the input data, the parameters of the function model are calculated using a fitting method;

[0075] Based on the calculated parameters, a function model for describing the relationship between the resource usage information and the load information is completed.

[0076] In some embodiments, processing the collected resource usage information and load information includes:

[0077] For each time point during the collection period at the collection frequency, calculate the average resource usage information and average load information of all backend servers at each time point;

[0078] Based on the average resource usage information and average load information at all time points in the acquisition period, input data for fitting the function model is generated.

[0079] In the embodiment of the present disclosure, the method of processing the resource usage information and load information of the backend server may include calculating the average value, peak value or change rate, etc. When the resource usage information is the CPU usage value and the memory usage value, the average value may be calculated in the following manner: the sum of the CPU usage values ​​is divided by the number of servers to obtain the average CPU usage value; the sum of the memory usage values ​​is divided by the number of servers to obtain the average memory usage value; the sum of the concurrent connections is divided by the number of servers to obtain the average concurrent connections.

[0080] In some embodiments, the function model is a linear relationship function model.

[0081] Among them, the dependent variable is load information and the independent variable is resource usage information.

[0082] In the embodiment of the present disclosure, when the resource usage information is the CPU usage value and the memory usage value, the regression formula of the linear relationship function model may be:

[0083] y=β0+β1x1+β2·x2,

[0084] Among them, y represents the average number of concurrent connections of the backend server, x1 represents the average CPU usage value of the backend server, x2 represents the average memory usage value of the backend server, β0 is the regression constant, and β1 and β2 are regression coefficients. The function model disclosed in the present invention is not limited to the linear relationship function model, and may also include other types of function models, such as nonlinear regression models, multivariate regression models, or prediction models based on machine learning algorithms to adapt to different actual needs and data characteristics. In addition, when the resource usage information is other information or other resource indicators, the function model can also be modified accordingly based on the relationship between the resource usage information and the load information, thereby achieving accurate modeling and prediction of the resource requirements of the backend server.

[0085] In the embodiments of the present disclosure, the calculation of the regression constant β0 and the regression coefficients β1 and β2 can be completed by the following fitting method, using programming tools, such as Python's numpy library or statsmodels library; based on MATLAB model tools; by mathematical methods, such as the least squares method or the maximum likelihood estimation method.

[0086] In some embodiments, based on the function model, calculating the required resource quota of the backend server includes:

[0087] When the processed load information of the virtual service exceeds the set condition range, calculating an overflow value exceeding the upper limit threshold;

[0088] Based on the overflow value, the resource quota of the backend server to be expanded is calculated using the linear relationship function model.

[0089] In some embodiments, based on the function model, calculating the required resource quota of the backend server further includes:

[0090] When the processed load information of the virtual service is lower than the set condition range, calculating an underflow value lower than the lower limit threshold;

[0091] Based on the underflow value, the resource quota of the backend server that needs to be reduced is calculated using the linear relationship function model.

[0092] In the disclosed embodiment, the maximum value of the resource quota is limited by the number of CPUs and memory size currently available on the virtualization platform, and is calculated based on the set maximum CPU and memory usage. At the same time, the allocated resources must meet the standard specifications of the virtual machine instance.

[0093] In some embodiments, dynamically adjusting the number of the backend servers according to the resource quota includes:

[0094] Based on the resource quota of the backend server to be expanded, if there is an available shut down server, starting the shut down backend server that meets the resource quota;

[0095] If there is no available shut down server, a new backend server that meets the resource quota is automatically created;

[0096] Automatically add the started or created backend server to the virtual service pool.

[0097] In some embodiments, dynamically adjusting the number of the backend servers according to the resource quota further includes:

[0098] Based on the resource quota of the backend server to be reduced, selecting a backend server that meets the resource quota from all current backend servers;

[0099] Set the selected backend server to soft shutdown state and remove it from the virtual service pool;

[0100] Shut down or destroy the selected backend server.

[0101] In the disclosed embodiment, when the backend server needs to be expanded, one or more server instances are dynamically added based on the calculated required resource quota, such as the total amount of CPU and memory. The sum of the resource configurations of all newly added servers must meet the computing requirements. If the required resources exceed the upper limit of a single server, they are allocated according to the predefined instance specifications (for example, 4-core CPU and 16GB memory), and multiple servers are added. For example, if the expansion requirement is 20 CPUs and 64GB of memory, you can choose a standard instance with a specification of 4-core CPU and 16GB of memory, and add 5 servers.

[0102] In the disclosed embodiment, when it is necessary to release resources, based on the calculated total amount of CPU and memory released, select servers that meet the conditions from the backend server list to shut down or destroy. If the required released resources (for example, 3-core CPU and 64GB memory) are greater than the specifications of a single server (for example, the specifications of a single server are 2-core CPU and 32GB memory), choose to shut down one or more servers so that the total amount of released resources is closest to the calculated demand. In the example scenario, choose to shut down a server with a specification of 2-core CPU and 32GB memory, which partially meets the release demand. After completing the expansion or reduction operation, the virtual service pool and virtual service policy configuration are automatically updated, and the request traffic is redistributed to ensure service stability.

[0103] In some embodiments, before obtaining the load information of the virtual service and the resource usage information and load information of the backend server, the method further includes:

[0104] Configure virtual service policies according to actual business needs to define the externally published addresses and ports of virtual services and reference virtual service pool policies and virtual service traffic monitoring templates;

[0105] Configuring the virtual service pool policy to include information of all backend server members;

[0106] Configure the virtual service traffic monitoring template to set the upper and lower thresholds, collection frequency, and collection period according to actual business needs.

[0107] In the disclosed embodiment, the user logs in to the application load page of our company's load balancing device after confirming the external publishing address and port of the virtual service, the address and port of the back-end real server, and the load balancing method adopted by the virtual service pool according to actual business needs, and configures the virtual service policy (providing a listening address and port to the outside, referencing the virtual service pool policy, and referencing the virtual service traffic monitoring template), virtual service pool policy (all virtual service members providing real services on the back end), virtual service member policy (address + port of each back-end server), and virtual service traffic monitoring template (users set the concurrent connection number threshold, collection frequency, collection cycle, CPU threshold, memory threshold, etc. according to their own business situation) configuration items, and references the virtual service traffic monitoring template on the virtual service policy.

[0108] In the disclosed embodiment, the above-mentioned collection, calculation and adjustment process is repeated to continuously optimize resource allocation and ensure stable operation of virtual services.

[0109] This paper proposes a refined virtual service management method based on real-time traffic monitoring, which automatically expands or reduces server quotas and dynamically updates virtual service policies by collecting traffic and resource data in real time. By using scientific algorithms and automated management, this paper significantly improves service stability and resource utilization efficiency, while reducing operation and maintenance costs.

[0110] Figure 2 It is a flowchart of a detailed implementation of a virtual service management method according to an embodiment of the present disclosure.

[0111] In the embodiments of the present disclosure, refer to Figure 2 The user completes the configuration of the virtual service policy, virtual service pool policy, virtual service member policy and virtual service traffic monitoring template according to actual business needs, and references the virtual service traffic monitoring template in the virtual service policy; the virtual service traffic monitoring module collects the total number of concurrent connections on the virtual service, the CPU usage value and memory usage value of the backend server and the current number of concurrent connections of the server according to the set collection frequency.

[0112] After the set collection cycle is met, the virtual service traffic monitoring module summarizes the collected data, calculates the average total concurrent connections of the virtual service during this collection cycle, the average CPU usage value of the server, the average memory usage value and the average concurrent connections; compares the average total concurrent connections of the virtual service with the set upper and lower thresholds to determine the current business status of the virtual service.

[0113] If the average total number of concurrent connections is greater than the upper threshold, the virtual service is determined to be in a busy state; a binary linear regression model is constructed based on the average CPU usage, average memory usage, and average concurrent connections of the backend server in the current collection cycle; the regression constant and regression coefficient in the binary linear regression model are calculated based on the actual data in the collection cycle, and a linear relationship function model of the CPU usage, memory usage, and concurrent connections is constructed; the linear relationship function model is used to calculate the resource quota (CPU and memory) of the server required for concurrent connections exceeding the upper threshold; based on the calculation results, a backend server that meets the calculated resource quota is started or newly created, and is created as a virtual service member, automatically added to the virtual service pool, so that the newly added server begins to process client requests normally; and the next collection cycle is entered.

[0114] If the average total number of concurrent connections is less than the lower threshold, the virtual service is determined to be in an idle state; a binary linear regression model is constructed based on the average CPU usage value, average memory usage value and average concurrent connection number of the backend server in the current collection period; the regression constant and regression coefficient in the binary linear regression model are calculated based on the actual data in the collection period, and a linear relationship function model of the CPU usage value, memory usage value and the number of concurrent connections is constructed; the number of concurrent connections below the lower threshold is calculated, and the resource quota (CPU and memory) of the server that can be released by this difference in the number of concurrent connections is calculated using the linear relationship function model; a server that meets the resource quota is selected from all current backend servers, and the member configuration corresponding to the selected server is found in the virtual service member, and the member is set to a soft shutdown state and removed from the virtual service pool (soft shutdown indicates that no new connections are accepted, and it is closed only after the current connection is completed); after the soft shutdown is completed, the corresponding server is closed or destroyed; and the next collection period is entered.

[0115] Enter the next collection cycle and repeat the above data collection, calculation and adjustment process to continuously optimize the resource allocation of virtual services and dynamically expand and reduce resources.

[0116] Figure 3 It is a schematic diagram of the composition of an electronic device according to an embodiment of the present disclosure.

[0117] Second, refer to Figure 3 , an embodiment of the present disclosure provides an electronic device, comprising:

[0118] One or more processors 301;

[0119] A memory 302, on which one or more programs are stored. When the one or more programs are executed by one or more processors, the one or more processors implement the virtual service management method described in the first aspect of the embodiment of the present disclosure;

[0120] One or more I / O interfaces 303 are connected between the processor and the memory and are configured to implement information exchange between the processor and the memory.

[0121] Among them, the processor 301 is a device with data processing capabilities, including but not limited to a central processing unit (CPU), etc.; the memory 302 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the I / O interface (read-write interface) 303 is connected between the processor 301 and the memory 302, and can realize information interaction between the processor 301 and the memory 302, including but not limited to a data bus (Bus), etc.

[0122] In some embodiments, the processor 301 , the memory 302 , and the I / O interface 303 are connected to each other via a bus 304 , and further connected to other components of the computing device.

[0123] In a third aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, and when the program is executed by a processor, the virtual service management method described in the first aspect of the embodiment of the present disclosure is implemented.

[0124] In a fourth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements the virtual service management method described in the first aspect of the embodiment of the present disclosure.

[0125] Figure 4 It is a block diagram of a virtual service management system according to an embodiment of the present disclosure.

[0126] Fifth, refer to Figure 4 The present disclosure provides a virtual service management system, including:

[0127] The acquisition module 401 is configured to acquire the load information of the virtual service and the resource usage information and load information of the backend server;

[0128] The judgment module 402 is configured to judge whether the number of the backend servers needs to be adjusted based on the load information of the virtual service and a set condition range;

[0129] A construction module 403 is configured to construct a function model for describing the relationship between resource usage information and load information when it is determined that the number of the backend servers needs to be adjusted;

[0130] A calculation module 404 is configured to calculate the required resource quota of the backend server based on the function model;

[0131] The adjustment module 405 is configured to dynamically adjust the number of the backend servers according to the resource quota.

[0132] In some embodiments, the acquisition module 401 is further configured to collect the load information of the virtual service and the resource usage information and load information of the backend server according to a set collection frequency.

[0133] In some embodiments, the determination module 402 includes:

[0134] A processing module, configured to perform statistical processing on the load information of the virtual service within a set collection period to obtain processed load information of the virtual service;

[0135] A comparison module, configured to compare the processed load information of the virtual service with a set condition range;

[0136] The quantity adjustment module is configured to determine whether the quantity of the backend servers needs to be adjusted based on the comparison result.

[0137] In some embodiments, the quantity adjustment module includes:

[0138] An expansion determination module, configured to determine that a backend server needs to be expanded when the processed load information of the virtual service exceeds the set condition range;

[0139] A reduction determination module, configured to determine that a backend server needs to be reduced when the processed load information of the virtual service is lower than the set condition range;

[0140] The maintenance determination module is configured to determine to maintain the existing backend server when the processed load information is within the set condition range.

[0141] In some embodiments, the processing module includes:

[0142] an average value calculation module, configured to calculate an average value of the load information of the virtual service within a set collection period, and obtain the average load information of the virtual service as the processed load information of the virtual service;

[0143] The set condition range is determined by a set upper threshold and a set lower threshold.

[0144] In some embodiments, building block 403 includes:

[0145] A generating module configured to process the resource usage information and load information of the backend server to generate input data for fitting the function model;

[0146] A parameter calculation module, configured to calculate the parameters of the function model using a fitting method based on the input data;

[0147] The model completion module is configured to complete a function model for describing the relationship between resource usage information and load information based on the calculated parameters.

[0148] In some embodiments, the generating module comprises:

[0149] An information calculation module, configured to calculate, for each time point during the collection period at the collection frequency, average resource usage information and average load information of all backend servers at each time point;

[0150] The data generation module is configured to generate input data for fitting the function model based on average resource usage information and average load information at all time points in the acquisition period.

[0151] In some embodiments, the calculation module 404 includes:

[0152] an overflow value calculation module, configured to calculate an overflow value exceeding the upper limit threshold when the processed load information of the virtual service exceeds the set condition range;

[0153] The expansion quota calculation module is configured to calculate the resource quota of the backend server to be expanded based on the overflow value and using the linear relationship function model.

[0154] In some embodiments, the calculation module 404 further includes:

[0155] an underflow value calculation module, configured to calculate an underflow value that is lower than the lower limit threshold when the load information of the processed virtual service is lower than the set condition range;

[0156] The quota reduction calculation module is configured to calculate the resource quota of the backend server that needs to be reduced based on the underflow value and using the linear relationship function model.

[0157] In some embodiments, the adjustment module 405 includes:

[0158] A startup module configured to start a shut down backend server that meets the resource quota based on the resource quota of the backend server to be expanded, if there is an available shut down server;

[0159] A creation module configured to automatically create a new backend server that meets the resource quota if there is no available shut down server;

[0160] Add a module configured to automatically add started or created backend servers to the virtual service pool.

[0161] In some embodiments, the adjustment module 405 further includes:

[0162] A selection module configured to select a backend server that meets the resource quota from all current backend servers based on the resource quota of the backend server that needs to be reduced;

[0163] A removal module configured to set the selected backend server to a soft shutdown state and remove it from the virtual service pool;

[0164] The shutdown module is configured to shut down or destroy the selected backend server.

[0165] In some embodiments, the virtual service management system further comprises:

[0166] A virtual service policy configuration module is configured to configure a virtual service policy according to actual business needs, so as to define the externally published address and port of the virtual service and reference the virtual service pool policy and the virtual service traffic monitoring template;

[0167] A virtual service pool policy configuration module, configured to configure the virtual service pool policy to include information of all backend server members;

[0168] The virtual service traffic monitoring configuration module configures the virtual service traffic monitoring template to set the upper and lower thresholds, the collection frequency, and the collection period according to actual business needs.

[0169] In order to enable those skilled in the art to more clearly understand the technical solution provided by the embodiment of the present disclosure, the virtual service management method provided by the embodiment of the present disclosure is described in detail below through specific embodiments:

[0170] Embodiment 1

[0171] Figure 5 It is a business topology diagram of load balancing and backend server resource scheduling of the example disclosed in the present invention. Figure 5 It shows the overall architecture of user requests being distributed to the backend server pool through virtual service load balancing.

[0172] like Figure 5As shown in the figure, the user has deployed three servers in a virtualized environment to provide external WEB services. It is required that when the business is fully loaded (the number of concurrent connections exceeds 40,000), a new server be automatically created and started to alleviate the access pressure of the current three servers; and when the business is idle (the number of concurrent connections is less than 1,000), the server be shut down to save resources without affecting the normal access of users.

[0173] Configuration steps:

[0174] (1) In a virtualized environment, three servers (2-core CPU, 16G memory) are deployed using three virtual machines with the same CPU model. The three servers use DHCP to automatically assign IP addresses. Assume that after the three servers are started, their IP addresses are 10.10.10.10, 10.10.10.20, and 10.10.10.30, and their service ports are all 80. The specific information is as follows:

[0175] Server Name Business Address Business Port Server 1 10.10.10.10 80 Server 2 10.10.10.20 80 Server 3 10.10.10.30 80

[0176] (2) Configure the virtual service traffic monitoring policy auto_policy01. Set the upper threshold of concurrent connections to 40,000 and the lower threshold to 500. Set the maximum value of server CPU usage to 95% and the minimum value to 5%. Set the maximum value of memory usage to 90% and the minimum value to 5%. The virtual service dynamic adjustment policy configuration information is as follows:

[0177] Configuration items Numeric unit Collection frequency 60 Second Collection cycle 300 Second Upper threshold of concurrent connections 40000 indivual Concurrent connection lower limit threshold 1000 indivual Maximum server CPU usage 95 % Server CPU usage lower threshold 5 % Server memory usage upper threshold 90 % Server memory usage lower threshold 5 %

[0178] (3) Configure the application load policy, and configure a virtual service vip01, a virtual service pool pool01, and three virtual service members (mem01, mem02, mem03). The external listening address set in the virtual service vip01 is 211.100.0.100, and the port is 80. The virtual service pool pool01 uses three virtual service members (mem01, mem02, mem03), and the configuration information of the three service members is mem01 (10.10.10.10:80), mem02 (10.10.10.20:80), and mem01 (10.10.10.30:80). The relationship between the policy configurations is as follows:

[0179] Policy Name Switch Status Listening Address Listening Port Citation strategy vip1 Open 211.100.0.100 80 pool01, auto_policy01 pool01 Open none none mem01, mem02, mem03 mem01 Open 10.10.10.10 80 none mem02 Open 10.10.10.20 80 none mem03 Open 10.10.10.30 80 none

[0180] The application service provider configures the application load virtual service strategy and provides a unified Web service access address 211.100.0.100:80 for Internet users to access. At the same time, the service provider sets a virtual service traffic monitoring strategy to collect the number of concurrent connections of the virtual service in real time, and automatically adjusts the number of back-end servers and service strategies according to the dynamic changes in business traffic to ensure the efficiency and stability of the service. The implementation of the entire function can be divided into four stages: the traffic data collection stage, real-time monitoring and collection of virtual service traffic data and back-end server resource usage; the business status judgment stage, based on the collected data to judge the current business load status, determine whether to expand or reduce server resources; the server resource quota calculation stage, according to the situation where the traffic exceeds or falls below the threshold, calculate the server resource quota (CPU number and memory size) required to be expanded or reduced; the server resource and strategy adjustment stage, by calling the API interface of the virtualization platform, automatically complete the expansion or reduction of server resources, and update the load balancing strategy of the virtual service in real time. The following uses the example scenario of the present disclosure to elaborate on the design and implementation of the four stages.

[0181] Phase 1: Traffic data collection

[0182] In phase 1, the virtual service traffic monitoring module is responsible for collecting key traffic data of virtual services and resource usage of backend servers at a set frequency. For example, the current number of concurrent connections on virtual service vip01, the average CPU usage value on each backend server (the total CPU usage of each server / the number of servers), the average memory usage value (the total memory usage of each server / the number of servers), and the average number of concurrent connections (the total number of concurrent connections on each server / the number of servers) are collected at a frequency of 60 seconds.

[0183] After a continuous collection period of 300 seconds, data aggregation is required. The results of data aggregation are used to determine the current business status in the second phase and calculate resource quotas in the third phase. The original data used for data aggregation are all sampled data in this collection period. For example, in this example, 6 groups of data are obtained for each indicator data in a 300-second sampling period. If the indicator data in a certain sampling period are:

[0184]

[0185] Among them, the server-related indicator data are the average values ​​of all backend server data at the time of sampling.

[0186] Calculate the average number of concurrent connections on the virtual server during this sampling period. The specific calculation method is:

[0187] Mn represents the sampling value of the number of concurrent connections on the virtual server during this period [50000, 45000, 55000, 50000, 60000, 70000].

[0188] Phase 2: Business Status Determination

[0189] In the business status determination phase, the current business load status is determined based on the total concurrent connections of the virtual service to determine whether server resources need to be adjusted. If the average value of the total concurrent number during the sampling period is greater than the set upper threshold, the virtual service is determined to be busy and server resources need to be expanded to relieve pressure; if the average value of the total concurrent number during the sampling period is less than the set upper threshold, the virtual service is determined to be idle and server resources can be reduced to save costs.

[0190] Taking this sample data as an example, within the sampling period of 300 seconds, the total concurrent number of sampling values ​​55000>40000 (upper threshold) is calculated, so the virtual service on the current load balancer is determined to be busy. Based on the above calculation results, the virtual service module determines that the virtual service on the current load balancer needs to expand the backend server resources to cope with the current high concurrent traffic, avoiding slow user access or request failure due to insufficient server processing capacity.

[0191] Phase 3: Server resource quota calculation phase

[0192] In phase two, it is determined that the virtual service is in a busy state, and it is necessary to open or create a new backend server for server expansion to alleviate the current concurrent connection pressure. The core task of phase three is to calculate the server resource quota that needs to be expanded (that is, the specific values ​​of the server's CPU and memory) to ensure that the newly added server can effectively share the current load. The specific calculation process is divided into two steps: Step 1 collects server data (CPU usage value, memory usage value, average number of concurrent connections) within the period, and uses a binary linear regression model to analyze the relationship between the independent variables (CPU and memory usage values) and the dependent variable (number of concurrent connections on the server), and then predicts the required resources. Step 2 is to use the binary linear regression model formula constructed in step 1 to calculate the CPU value and memory value of the server that needs to be expanded. The detailed process is as follows:

[0193] 1. Construct a binary linear regression model

[0194] Multiple linear regression model function formula: y = β0 + β1x1 + β2x2 + ... + β p x p +ε, y is the dependent variable, which indicates the number of concurrent connections to the server; x1, x2, x3...x p is the independent variable, β0 is the regression constant, β1, β2, ...βp is the regression coefficient.

[0195] The CPU usage values, memory usage values, and number of concurrent server connections collected during the collection period are organized into a data table for use in the following binary linear regression calculation.

[0196]

[0197] The binary linear regression model is constructed by taking the number of concurrent server connections as the dependent variable y, and the server cpu and memory usage values ​​as the independent variables x1 and x2. Input the above data into the binary linear regression algorithm to calculate the regression constant β0 and the regression coefficients β1 and β2. For example, write a python program and use numpy and statsmodels libraries to read the data in the table to calculate the regression constant (β0) and regression coefficients (β1, β2) of the binary linear regression model. According to the above results, the ideal regression constant β0 = 0.6923, the regression coefficient β1 = 0.2564, and β2 = 2083.1250 are calculated. The constructed regression model is y = 0.6923*x1+2083.1250*x2.

[0198] 2. Use regression model formula to calculate server resource quota

[0199] In the server expansion phase, the total number of connections that exceed the concurrent threshold is calculated and substituted into the regression model formula to calculate the server resource quota (CPU quantity m and memory size n) that needs to be expanded. Ensure that the expanded server can meet the load requirements and appropriately expand the resource quota during actual allocation to improve system stability.

[0200] (1) First, the total number of connections exceeding the concurrency threshold is calculated; the concurrency threshold Threshold = 40000, the current number of concurrent connections Current_conns = 55000, and the total number of connections exceeding the concurrency threshold is calculated as: Ext_conns = Current_conns - Threshold = 55000 - 40000 = 15000.

[0201] (2) Query the current remaining resources from the virtualization platform where the server is running, assuming that the number of available CPUs is Q.cpu and the available memory size is Q.mem. The resource allocation of the extended server must meet the following constraints: m∈[1,Q.cpu], n∈[1,Q.mem], that is, the allocated resources cannot exceed the maximum available resources of the virtualization platform.

[0202] (3) Calculate the extended resource quota based on the regression model

[0203] Substitute the excess number of concurrent connections Ext_conns into the regression model to calculate the required number of CPUs m and memory size n. The regression model formula is:

[0204] 15000=0.6923*(3.0*m*95%)+2083.1250*(n*90%),

[0205] Among them, 3.0 represents the CPU operating frequency, 95% is the maximum CPU usage, m represents the number of CPUs, 90% is the maximum memory usage, and n represents the memory size to be allocated. The calculated server resources must meet the amount of resources that the server can provide.

[0206] (4) Determine the extended server resource quota

[0207] According to the formula in step 3, calculate the resource quotas m and n of the server that needs to be expanded. Since (m, n) can calculate multiple sets of values, any set of values ​​can be randomly used as the calculated resource quota values. For example, according to the above formula, a set of data (m=2, n=7.2) can be calculated, indicating that the expanded server needs to use 2 CPUs and 7.2G memory. However, the numbers used in the above calculation process are calculated according to the set maximum usage of CPU and memory, so we can make appropriate expansion based on the calculated quota, for example, the calculated memory quota is 7.2G, and when allocating the actual allocation, it is allocated according to 8G.

[0208] Phase 4: Server resource and strategy adjustment phase

[0209] After calculating the resource quota of the server that needs to be expanded in phase 3, the server resource expansion and policy adjustment phase begins. The core task of this phase is to automatically create and start qualified server resources through the API interface of the virtualization platform, update the policy configuration of the virtual service pool, and ensure that the newly expanded server can share the load of the virtual service and relieve the current pressure. The entire process is automatically completed by the virtual service traffic monitoring module without manual intervention.

[0210] 1. Check if there are any closed servers available

[0211] The traffic monitoring module first calls the API interface of the virtualization platform to query whether there is a shut down server that meets the resource requirements (for example, the number of CPUs and memory size that meet the resource quota); if there is a server that meets the conditions, it will start the server directly to save resource creation time; if there is no server that meets the conditions, it will enter the server resource orchestration stage and create a new virtual machine to meet the expansion needs.

[0212] 2. Orchestrate and create new virtual machines

[0213] If there are no shut down servers that meet the conditions, the traffic monitoring module orchestrates resources through the API interface of the virtualization platform and automatically creates a new virtual machine; a new virtual machine is created according to the calculation results of stage three (for example, 2-core CPU and 8GB memory); after the virtual machine is started, an IP address is automatically assigned through the DHCP module, for example, the address 10.10.10.40; the entire process of creation and startup is fully automated to ensure timely and efficient expansion.

[0214] 3. Update the policy configuration of the virtual service pool

[0215] After the new virtual machine is started, the traffic monitoring module automatically detects the IP address and status information of the new server (for example, 10.10.10.40); adds the newly expanded server as a virtual service member to the virtual service pool of the load balancing device, for example, creates a new policy configuration item (for example, mem04); adds mem04 to the virtual service pool (for example, pool01), and the newly expanded server mem04 is immediately put into use and begins to share the connection requests of the load balancing device.

[0216] Taking this application as an example, since the three servers currently providing services (10.10.10.10, 10.10.10.20, 10.10.10.30) are all in normal operation, and the servers that are not powered off can be turned on, the traffic monitoring module arranges and creates a virtual machine with 2 cores and 8G memory through the API interface of the virtualization technology. After the virtual machine is successfully started, it automatically obtains the IP address 10.10.10.40 through the DHCP module. After the traffic monitoring module detects the address assigned by the new server, it creates a new policy configuration item mem04 in the virtual service member and adds mem04 to the virtual service pool pool01. After the above changes, the newly expanded server mem04 can start to process customer business requests normally. At this time, the latest configuration of the virtual service-related policy has changed to the following configuration:

[0217] Policy Name Switch Status Listening Address Listening Port Citation strategy vip1 Open 211.100.0.100 80 pool01, auto_policy01 pool01 Open none none mem01, mem02, mem03, mem04 mem01 Open 10.10.10.10 80 none mem02 Open 10.10.10.20 80 none mem03 Open 10.10.10.30 80 none mem04 Open 10.10.10.40 80 none

[0218] After completing the above steps, the virtual service module can automatically perform refined server expansion and service strategy adjustment according to actual business traffic, alleviate the virtual service pressure on the current load balancer, and avoid slow or inaccessible user access caused by insufficient back-end server processing capacity. The entire process does not require manual intervention by operation and maintenance personnel, which simplifies configuration operations and saves human resources for application service providers.

[0219] The virtual service module can dynamically adjust backend resources according to actual business traffic, optimize load balancing strategies, and realize a fully automated process from monitoring to expansion. This solution effectively improves service stability and resource utilization efficiency, providing a strong guarantee for the continued growth of business.

[0220] This paper focuses on realizing fine-grained adjustment of system load capacity through real-time traffic data on the load balancer. The key technical points are as follows:

[0221] Monitor the business access volume on the load balancer in real time, and accurately determine the current business status (such as busy or idle) through the set traffic threshold and specific algorithms; dynamically adjust the backend server resources and load balancing strategies based on the status determination results to ensure service stability and efficient use of resources. After the backend server changes, the system can automatically synchronize the changes to the policy configuration of the virtual service without manual intervention; the maintenance process is simplified, the complexity of operation and maintenance is reduced, and human resources and time costs are significantly saved. A comprehensive and accurate binary linear regression statistical model is used to comprehensively consider the server's CPU utilization, memory utilization, and number of concurrent connections to calculate the required resource quota; through scientific calculation methods, the system achieves the maximum benefit of system load capacity in exchange for the minimum server resource investment.

[0222] The present invention constructs a dynamic and efficient load adjustment mechanism through real-time monitoring, automated configuration synchronization and efficient resource calculation methods, which not only improves the reliability of services, but also greatly optimizes resource utilization efficiency and simplifies the operation and maintenance process.

[0223] The present disclosure has the following beneficial effects by real-time monitoring and dynamic adjustment of resource configuration and strategy of virtual services:

[0224] According to the business traffic of virtual services on the load balancer, the number of backend servers and the load balancing policy configuration are automatically adjusted. When the access pressure suddenly increases, the system can quickly expand server resources to avoid application service downtime due to excessive load, ensuring the stable operation and high availability of services;

[0225] The server resource and policy configuration adjustment is fully automated, without the need for manual intervention by operation and maintenance personnel, which greatly reduces the workload of operation and maintenance personnel, saves a lot of manpower costs for application service providers, and improves operation and maintenance efficiency;

[0226] Through accurate server resource calculation methods, we can not only quickly expand resources to meet business needs when service pressure increases, but also scientifically reduce resources to avoid resource waste when the load is low, thereby maximizing and balancing resource utilization and reducing operating costs.

[0227] The present disclosure not only improves the reliability and efficiency of application services through intelligent traffic monitoring and resource management mechanisms, but also optimizes the use and operation and maintenance mode of server resources, bringing significant technical and economic benefits to application service providers.

[0228] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0229] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly noted, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Claims

1. A virtual service management method, comprising: Obtain the load information of the virtual service and the resource usage and load information of the backend server; According to the load information of the virtual service, judging whether it is necessary to adjust the number of the backend servers based on a set condition range; When it is determined that the number of the backend servers needs to be adjusted, constructing a function model for describing the relationship between the resource usage information and the load information; Based on the function model, calculate the required resource quota of the backend server; The number of the backend servers is dynamically adjusted according to the resource quota.

2. The virtual service management method according to claim 1, wherein: Get the load information of the virtual service and the resource usage and load information of the backend server, including: According to the set collection frequency, the load information of the virtual service and the resource usage information and load information of the backend server are collected.

3. The virtual service management method according to claim 2, wherein: According to the load information of the virtual service, judging whether the number of the backend servers needs to be adjusted based on set conditions includes: Performing statistical processing on the load information of the virtual service within a set collection period to obtain processed load information of the virtual service; Compare the processed load information of the virtual service with the set condition range; Based on the comparison result, it is determined whether the number of the backend servers needs to be adjusted.

4. The virtual service management method according to claim 3, wherein: Based on the comparison result, determining whether the number of the backend servers needs to be adjusted includes: When the processed load information of the virtual service exceeds the set condition range, determining that the backend server needs to be expanded; When the processed load information of the virtual service is lower than the set condition range, determining that the backend server needs to be reduced; When the processed load information is within the set condition range, it is determined to keep the existing backend server.

5. The virtual service management method according to claim 4, performing statistical processing on the load information of the virtual service within a set collection period to obtain the processed load information of the virtual service, comprising: Calculate the average value of the load information of the virtual service within the set collection period, and obtain the average load information of the virtual service as the processed load information of the virtual service; The set condition range is determined by the set upper threshold and lower threshold.

6. The virtual service management method according to any one of claims 1 to 5, wherein: When it is determined that the number of the backend servers needs to be adjusted, a function model for describing the relationship between the resource usage information and the load information is constructed, including: Processing resource usage information and load information of the backend server to generate input data for fitting the function model; Based on the input data, the parameters of the function model are calculated using a fitting method; Based on the calculated parameters, a function model for describing the relationship between the resource usage information and the load information is completed.

7. The virtual service management method according to claim 6, wherein: Processing the resource usage information and load information of the backend server to generate input data for fitting the function model includes: For each time point during which collection is performed at the collection frequency within the set collection period, average resource usage information and average load information of all backend servers at each time point are calculated; Based on the average resource usage information and average load information at all time points in the set acquisition period, input data for fitting the function model is generated.

8. The virtual service management method according to claim 7, wherein: The function model is a linear relationship function model, wherein the dependent variable is load information and the independent variable is resource usage information.

9. The virtual service management method according to claim 8, wherein: Based on the function model, the required resource quota of the backend server is calculated, including: When the processed load information of the virtual service exceeds the set condition range, calculating an overflow value exceeding the set upper limit threshold; Based on the overflow value, the resource quota of the backend server to be expanded is calculated using the linear relationship function model.

10. The virtual service management method according to claim 9, wherein: Based on the function model, calculating the required resource quota of the backend server further includes: When the processed load information of the virtual service is lower than the set condition range, calculating an underflow value that is lower than the set lower limit threshold; Based on the underflow value, the resource quota of the backend server that needs to be reduced is calculated using the linear relationship function model.

11. The virtual service management method according to claim 10, wherein: Dynamically adjusting the number of the backend servers according to the resource quota includes: Based on the resource quota of the backend server to be expanded, if there is an available shut down server, starting the shut down backend server that meets the resource quota; If there is no available shut down server, a new backend server that meets the resource quota is automatically created; Automatically add the started or created backend server to the virtual service pool.

12. The virtual service management method according to claim 11, wherein: Dynamically adjusting the number of the backend servers according to the resource quota further includes: Based on the resource quota of the backend server to be reduced, selecting a backend server that meets the resource quota from all current backend servers; Set the selected backend server to soft shutdown state and remove it from the virtual service pool; Shut down or destroy the selected backend server.

13. The virtual service management method according to claim 11 or 12, wherein: Before obtaining the load information of the virtual service and the resource usage information and load information of the backend server, the method further includes: Configure virtual service policies according to actual business needs to define the externally published addresses and ports of virtual services and reference virtual service pool policies and virtual service traffic monitoring templates; Configuring the virtual service pool policy to include information of all backend server members; Configure the virtual service traffic monitoring template to set the upper and lower thresholds, collection frequency, and collection period according to actual business needs.

14. An electronic device comprising: one or more processors; A memory having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the virtual service management method according to any one of claims 1 to 13.

15. A computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the virtual service management method according to any one of claims 1 to 13.

16. A computer program product, comprising a computer program or instructions, wherein when the computer program or instructions are executed by a processor, the virtual service management method according to any one of claims 1 to 13 is implemented.

Citation Information

Cited By

  • Server scheduling method and system, computer program product, equipment and medium

    CN120950223A