Login machine load balancing method, system, device, medium and product
By using the distribution server and LVS balancing algorithm in the Linux system to forward the request data to the target login machine, the problem of load imbalance on the login machine is solved, improving the user experience and reducing resource waste.
Patent Information
- Application Number
- CN202410956159.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-10-15
AI Technical Summary
In the Linux system, the load of login machines cannot be balanced, resulting in some login machines having extremely high loads and other login machines having extremely low loads or even no load, affecting the user experience and causing a waste of resources.
The distribution server is connected to multiple login machines of the high-performance computer cluster, and the request data is forwarded to the target according to the number of users and login machine configuration information through the LVS balancing algorithm (including polling scheduling, minimum connection scheduling, weighted least connection scheduling, etc.) Log in to the machine to achieve load balancing.
It effectively avoids the situation where the load of some login machines is too high and the load of other login machines is too low, which improves the user experience, makes full use of resources, and reduces resource waste.
Smart Images

Figure CN118784577A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of chip backend technology, and in particular to a login machine load balancing method, system, device, medium and product. Background Art
[0002] High performance computing (HPC) is a technical science that uses supercomputers to achieve parallel computing theories, methods, technologies and applications. It focuses on the core issue of using evolving parallel processing units and parallel architectures to achieve high-performance parallel computing. The research scope of this field includes parallel computing models, parallel programming models, parallel execution models, parallel adaptive frameworks, parallel architectures, parallel network communications and parallel algorithm design. In the chip industry, it mainly provides powerful computing support for the product hardware research and development stage.
[0003] In Linux systems, a login server usually refers to a server dedicated to user login and access to other servers or systems. The login server acts as an intermediary between users and other servers. Users can access and manage other servers through the login server without directly connecting to the target server. In order to achieve unified management of HPC resources, a shared login server is usually assigned to multiple users, and multiple login servers are created by analogy to facilitate users to use HPC resources through the login server. In actual usage scenarios, the login time of different users is unpredictable, and the load generated on the login server after login is also different. It is often the case that some login servers have extremely high loads while other login servers have extremely low loads or even no loads, which affects the user experience and also causes waste of resources. Summary of the invention
[0004] The present invention provides a login machine load balancing method, system, device, medium and product to solve the problem that the login usage time of different users cannot be predicted, and the load size generated on the login machine after logging in is also different. It is often the case that some login machines have extremely high loads while the loads of other login machines are extremely low or even have no load, which affects the user experience and also causes the defect of wasting resources.
[0005] The present invention provides a login machine load balancing method, which is implemented based on a distribution server. The distribution server is connected to multiple login machines of a high-performance computer cluster. The distribution server is used to provide login services to users as an external login machine. The method includes: obtaining the number of users, user request data, the number of login machines and login machine configuration information; according to at least one of the number of users, the number of login machines and the login machine configuration information, forwarding the request data to a target login machine among the multiple login machines based on an LVS balancing algorithm.
[0006] According to a login machine load balancing method provided by the present invention, the LVS balancing algorithm includes a polling scheduling algorithm, and the request data is forwarded to the target login machine based on the LVS balancing algorithm according to at least one of the number of users, the number of login machines and the login machine configuration information, including: if the number of users exceeds a preset first threshold, the number of login machines exceeds a preset second threshold and the login machine configuration information is the same, then the request data is forwarded evenly to all the login machines based on the polling scheduling algorithm.
[0007] According to a login machine load balancing method provided by the present invention, the LVS balancing algorithm includes a minimum connection scheduling algorithm, and the request data is forwarded to the target login machine based on the LVS balancing algorithm according to at least one of the number of users, the number of login machines and the login machine configuration information, including: obtaining the number of user logins and logouts within a preset time period, if the number of users exceeds a preset first threshold and the number of logins and logouts exceeds a preset third threshold, determining the number of connections corresponding to each login machine based on the minimum connection scheduling algorithm, and forwarding the most recently received request data to the login machine with the smallest number of connections.
[0008] According to a login machine load balancing method provided by the present invention, the LVS balancing algorithm includes a weighted least connection scheduling algorithm, and the request data is forwarded to the target login machine based on the LVS balancing algorithm according to at least one of the number of users, the number of login machines and the login machine configuration information, including: if the login machine configuration information is different, setting weights for the login machines according to the login machine configuration information, determining a first ratio of the weight corresponding to each login machine to the number of connections or a second ratio between the number of connections and the weight based on the weighted least connection scheduling algorithm, determining the target login machine according to the first ratio or the second ratio, and forwarding the latest received request data to the target login machine.
[0009] According to a login machine load balancing method provided by the present invention, the target login machine is determined according to the first ratio or the second ratio, and the most recently received request data is forwarded to the target login machine, including: taking the login machine with the largest first ratio or the smallest second ratio as the target login machine, and forwarding the most recently received request data to the target login machine.
[0010] The present invention also provides a login machine load balancing system, including a distribution server, which is connected to multiple login machines of a high-performance computer cluster. The distribution server is used to provide login services to users as an external login machine and execute any one of the login machine load balancing methods described. The login machine is used to send the received user request data to the high-performance computer cluster and obtain response data corresponding to the request data from the high-performance computer cluster.
[0011] According to a login machine load balancing system provided by the present invention, the distribution server is used to obtain the response data from the login machine and forward the response data to the corresponding user when the number of users does not exceed a preset first threshold and the number of login machines does not exceed a preset second threshold; the login machine is used to forward the response data to the corresponding user when the number of users exceeds a preset first threshold and / or the number of login machines exceeds a preset second threshold.
[0012] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a login machine load balancing method as described above is implemented.
[0013] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the login machine load balancing method as described in any one of the above is implemented.
[0014] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the login machine load balancing methods described above.
[0015] The login machine load balancing method, system, device, medium and product provided by the present invention package the distribution server as an external login machine for users, select the LVS balancing algorithm according to the number of users, the number of login machines and at least one of the login machine configuration information, and forward the user's request data to the target login machine among multiple login machines, thereby realizing the load balancing of the login machines. The request data of all users are distributed by the distribution server, avoiding the situation where some login machines have extremely high loads while the other login machines have extremely low loads or even no loads, thereby improving the user experience and not causing waste of resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 It is a schematic diagram of the structure of the login machine load balancing in the prior art; Figure 2 This is one of the flow charts of the login machine load balancing method provided by the present invention.
[0018] Figure 3 This is the second flow chart of the login machine load balancing method provided by the present invention.
[0019] Figure 4 This is the third flow chart of the login machine load balancing method provided by the present invention.
[0020] Figure 5 This is the fourth flow chart of the login machine load balancing method provided by the present invention.
[0021] Figure 6 It is a structural diagram of the login machine load balancing system provided by the present invention.
[0022] Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] Figure 1 It is a schematic diagram of the structure of the login machine load balancing in the prior art, such as Figure 1 As shown, in the prior art, multiple users share a designated Linux login machine, and multiple Linux login machines are created by analogy, and HPC resources are used through the login machines. In actual usage scenarios, the login time of different users is unpredictable, and the load generated on the login machine after login is also different. It is often the case that some login machines have extremely high loads while other login machines have extremely low loads or even no loads, which affects the user experience and also causes a waste of resources.
[0025] In order to solve the above problems, the present invention provides a login machine load balancing method, system, device, medium and product, which are described in detail below in conjunction with the accompanying drawings.
[0026] Figure 2 It is one of the flow charts of the login machine load balancing method provided by the present invention, such as Figure 2 As shown, the present invention provides a login machine load balancing method, which is implemented based on a distribution server, and the distribution server is connected to multiple login machines of a high-performance computer cluster, and the login machine is composed of a Linux server. The distribution server is used to provide login services to users as an external login machine. The distribution server provides login services to users as an external login machine through an SSH service, which specifically includes the following steps: installing an SSH service and an SSH client on the distribution server, and installing an SSH service on the login machine. The SSH service on the distribution server is used to respond to the request data corresponding to the user's login request. The SSH client on the distribution server is used to access the SSH service on the login machine. The SSH service on the login machine needs to be limited to only allow the SSH client on the distribution server to access, and ignore the SSH access requests of other SSH clients. The command to install the SSH service includes sudoapt-get install openssh-server. After the installation is complete, configure the SSH service and SSH client. The configuration command includes sudo nano / etc / ssh / sshd_config. The configuration items include setting users allowed to access: make sure to add the user name that you want to be able to log in to the server in the AllowUsers field. Set the login port (optional): Set the default port for SSH login, which can be modified to other ports to improve security. Other security configurations: Adjust other security configurations as needed, such as disabling root login. After the configuration is complete, save the file and restart the SSH service to make the configuration effective. The restart command includes sudo systemctl restart ssh. After the configuration is complete, when users log in, the distribution server automatically distributes them to Linux login machines with lower backend load.
[0027] The present invention provides a login machine load balancing method, which at least includes step S100 and step S200.
[0028] Step S100, obtaining the number of users, user request data, number of login machines and login machine configuration information; the number of users refers to the number of registered users or the number of users who log in after registration; the user request data refers to the data of the user requesting the service content from the HPC cluster, including job submission request, data transmission request, resource allocation request, job scheduling request, monitoring and management request, security request and system maintenance request, etc.; the job submission request refers to the user submitting various types of computing job requests, including parallel computing tasks, large-scale data processing tasks, etc. The data transmission request refers to the HPC service may need to process large-scale data transmission requests, including uploading and downloading data to / from the HPC cluster. The resource allocation request refers to the user's request to allocate computing resources (such as CPU, memory, GPU, etc.) to perform its job tasks. The job scheduling request refers to the HPC service's need to schedule jobs according to information such as job priority and resource requirements to determine when and on which nodes to run specific jobs. The monitoring and management request refers to the user's need to monitor the execution of his job, obtain performance statistics, or manage the job queue, etc. The security request refers to the HPC service's need to process security requests, including user authentication, access control, data encryption, etc. System maintenance requests refer to system maintenance requests that HPC services may need to process, such as software updates, node maintenance, and fault handling. The number of hosts refers to the number of hosts. The host configuration information includes the host name and IP address of the host, the service content that the host can provide, and the storage and performance information of the host.
[0029] Step S200, forwarding the request data to a target login machine among the multiple login machines based on an LVS balancing algorithm according to at least one of the number of users, the number of login machines and the configuration information of the login machine.
[0030] LVS (Linux Virtual Server) is an open source high-availability load balancing solution for distributing network traffic to multiple backend servers. In LVS, there are multiple load balancing algorithms to choose from to achieve traffic distribution according to different requirements and scenarios. LVS balancing algorithms include polling scheduling algorithm, weighted polling scheduling algorithm, least connection scheduling algorithm, weighted least connection algorithm, source address hash scheduling algorithm and URI hash scheduling algorithm.
[0031] Round Robin is the simplest load balancing algorithm. It distributes requests to each backend server in a round-robin manner until all servers have been polled, and then restarts. It is suitable for scenarios with similar server performance and relatively simple load balancing requirements.
[0032] The Weighted Round Robin algorithm configures a weight value for each backend server and determines the frequency of scheduling each server based on the weight value. Servers with larger weight values receive more requests and are suitable for situations where server performance is uneven.
[0033] The Least Connections algorithm distributes requests to the backend server with the least number of connections to achieve load balancing. It is suitable for situations where the backend server processing request time is uneven.
[0034] The Weighted Least Connections algorithm is similar to weighted round-robin. Each backend server has a weight value, and the scheduling frequency is determined based on the weight value and the current number of connections.
[0035] The Source IP Hash algorithm distributes requests to the same backend server based on the source IP address of the request, thus maintaining the session status of the same client.
[0036] The URI Hash dispatch algorithm distributes requests to the same backend server based on the requested URI (Uniform Resource Identifier). It is suitable for situations where specific URI requests need to be routed to the same server.
[0037] It can be understood that the present invention realizes load balancing of the login machines, and the request data of all users are distributed by the distribution server, avoiding the situation where some login machines have extremely high loads while the loads of other login machines are extremely low or even no load, thereby improving the user experience and not causing waste of resources.
[0038] Figure 3 This is the second flow chart of the login machine load balancing method provided by the present invention, such as Figure 3 As shown, based on the above embodiment, as an optional embodiment, the LVS balancing algorithm includes a polling scheduling algorithm, and the request data is forwarded to the target login machine based on the LVS balancing algorithm according to at least one of the number of users, the number of login machines and the login machine configuration information, including: if the number of users exceeds a preset first threshold, the number of login machines exceeds a preset second threshold and the login machine configuration information is the same, then the request data is forwarded evenly to all the login machines based on the polling scheduling algorithm.
[0039] Since all login servers are connected to the same storage and have the same configuration, no matter which login server you log in to, you can get the same service content each time, and the login server with low load is assigned each time. If the login machine configuration information is the same, the most basic polling scheduling algorithm can be used, that is, scheduling requests to different servers in a sequential cycle. The biggest feature of this algorithm is that it is simple to implement. The distribution server will evenly distribute all request data to each real server.
[0040] It is understandable that in conventional technical solutions, all request data and response data need to be forwarded through the distribution server. When the number of Linux login servers at the back end is large, the distribution server will become the bottleneck of the entire cluster environment. Because the response data packet contains the specific data required by the customer, the request data packet is often much smaller than the size of the response data packet. This scenario needs to be set to LVS (TUN) mode to reduce the load on the distribution server. The idea is to separate the request and response data. Through the IP tunning data packet subpacketization technology of this mode, the distribution server only processes the request data, and the response data packet is directly returned to the corresponding client of the user, thereby greatly reducing the load on the distribution server and meeting high-load business scenarios.
[0041] Figure 4 This is the third flow chart of the login machine load balancing method provided by the present invention, such as Figure 4 As shown, based on the above embodiments, as an optional embodiment, the LVS balancing algorithm includes a minimum connection scheduling algorithm, and according to at least one of the number of users, the number of login machines and the login machine configuration information, the request data is forwarded to the target login machine based on the LVS balancing algorithm, including: obtaining the number of user logins and logouts within a preset time period, if the number of users exceeds a preset first threshold and the number of logins and logouts exceeds a preset third threshold, determining the number of connections corresponding to each login machine based on the minimum connection scheduling algorithm, and forwarding the most recently received request data to the login machine with the smallest number of connections.
[0042] When there are a large number of users and a large number of users log in and out, the polling scheduling algorithm cannot promptly utilize the resources released after the user logs out in the Linux login scenario. At this time, the LVS minimum connection scheduling algorithm is used, which will assign new connection requests to the server with the smallest number of current connections. Minimum connection scheduling is a dynamic scheduling algorithm that estimates the status of the server based on the number of active connections currently on the server. The scheduler needs to record the number of connections established by each server. When a request is scheduled to a server, its connection number increases by 1; when the connection is interrupted or times out, its connection number decreases by 1.
[0043] It is understandable that the present invention can achieve dynamic balance and improve resource utilization by detecting the number of times a user logs in and out within a preset time period.
[0044] Figure 5 This is a fourth flow chart of the login machine load balancing method provided by the present invention, such as Figure 5 As shown, based on the above embodiments, as an optional embodiment, the LVS balancing algorithm includes a weighted least connection scheduling algorithm, and the request data is forwarded to the target login machine based on the LVS balancing algorithm according to at least one of the number of users, the number of login machines and the login machine configuration information, including: if the login machine configuration information is different, setting weights for the login machines according to the login machine configuration information, determining a first ratio of the weight corresponding to each login machine to the number of connections or a second ratio between the number of connections and the weight based on the weighted least connection scheduling algorithm, determining the target login machine according to the first ratio or the second ratio, and forwarding the latest received request data to the target login machine.
[0045] Optionally, the method of determining the target login machine according to the first ratio or the second ratio and forwarding the most recently received request data to the target login machine includes: taking the login machine with the largest first ratio or the smallest second ratio as the target login machine, and forwarding the most recently received request data to the target login machine. For example, if the weight of a login machine is N, and its number of connections is Z, and the ratio N / Z of this login machine is the largest, the distribution server will forward the most recently received request data to this login machine, and the number of connections Z=Z+1, that is, the number of connections is increased by one, and Z=Z-1 after the connection is disconnected.
[0046] In the above embodiment, the weight is a static value. In another embodiment, the performance of the login machine can be quantified, and the quantified data can be combined with the administrator's pre-set weight to obtain the dynamic weight of the login machine. The target login machine can be selected based on the ratio between the dynamic weight and the number of connections.
[0047] The steps of quantifying the performance of the login machine include: selecting the CPU main frequency, memory, I / O rate and the time for processing request data as factors for evaluating the performance of the login machine, setting a weight for each factor, and the sum of the four weights is 1, standardizing the CPU main frequency, memory, I / O rate, and the time for processing request data, and taking the sum of the products of the standardized factors and the weights as the total performance of each login machine, and adjusting the weights according to the time for each login machine to process the request data. Specifically, the shorter the time for the login machine to process the request data, the higher the performance of the login machine, and the higher the overall performance of the login machine.
[0048] It is understandable that when the cluster environment is more complex and there are multiple login machines with different configurations, the above algorithms cannot fully utilize the resources of the high-configuration login machines. In this scenario, the weighted minimum connection scheduling algorithm is selected. This algorithm is a superset of the minimum connection scheduling. The corresponding weight of each server represents its processing performance. The default weight of the server is 1, and the system administrator can dynamically set the weight of the server. When scheduling new connections, the weighted minimum connection scheduling tries to make the number of established connections of the server proportional to its weight as much as possible. The distribution server automatically inquires about the load of the HPC server and dynamically adjusts its weight to improve resource utilization.
[0049] To sum up, the present invention provides the same login machine IP to all users, and there is no need to provide a specified IP to each user, which facilitates the disclosure and maintenance of information. Each time a user logs in, a low-load login machine is preferentially assigned to improve the user experience; the login machine load balancing is achieved, so that all resources can be fully utilized, reducing resource waste and lowering equipment costs.
[0050] The login machine load balancing system provided by the present invention is described below. The login machine load balancing system described below and the login machine load balancing method described above can be referenced to each other.
[0051] Figure 6 It is a structural diagram of the login machine load balancing system provided by the present invention, such as Figure 6 As shown, the present invention also provides a login machine load balancing system, including a distribution server, which is connected to multiple login machines of a high-performance computer cluster. The distribution server is used to provide login services to users as an external login machine and execute any one of the login machine load balancing methods described. The login machine is used to send the received user request data to the high-performance computer cluster, and obtain response data corresponding to the request data from the high-performance computer cluster.
[0052] Optionally, the distribution server is used to obtain the response data from the login machine and forward the response data to the corresponding user when the number of users does not exceed a preset first threshold and the number of login machines does not exceed a preset second threshold; the login machine is used to forward the response data to the corresponding user when the number of users exceeds a preset first threshold and / or the number of login machines exceeds a preset second threshold.
[0053] It can be understood that the present invention separates the request and response data, and through IP tunning data packet subpackaging technology, allows the distribution server to only process the request data, and allows the login machine to return the response data packet directly to the user, thereby greatly reducing the load on the distribution server and meeting high-load business scenarios.
[0054] Figure 7An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the login machine load balancing method, which includes: obtaining the number of users, the user's request data, the number of login machines and the login machine configuration information; and forwarding the request data to the target login machine among the multiple login machines based on the LVS balancing algorithm according to at least one of the number of users, the number of login machines and the login machine configuration information.
[0055] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0056] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the login machine load balancing method provided by the above methods, and the method includes: obtaining the number of users, user request data, the number of login machines and login machine configuration information; based on at least one of the number of users, the number of login machines and the login machine configuration information, forwarding the request data to the target login machine among the multiple login machines based on the LVS balancing algorithm.
[0057] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the login machine load balancing method provided by the above-mentioned methods. The method includes: obtaining the number of users, user request data, the number of login machines and login machine configuration information; based on at least one of the number of users, the number of login machines and the login machine configuration information, forwarding the request data to the target login machine among the multiple login machines based on the LVS balancing algorithm.
[0058] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0059] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0060] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for balancing the load of a login machine, characterized in that: Based on a distribution server, the distribution server is connected to multiple login machines of a high-performance computer cluster, and the distribution server is used as an external login machine to provide login services to users. The method includes: Get the number of users, user request data, number of login machines, and login machine configuration information; According to at least one of the number of users, the number of login machines and the login machine configuration information, the request data is forwarded to a target login machine among the multiple login machines based on an LVS balancing algorithm.
2. The login machine load balancing method according to claim 1, characterized in that: The LVS balancing algorithm includes a polling scheduling algorithm, and forwarding the request data to the target login machine based on the LVS balancing algorithm according to at least one of the number of users, the number of login machines, and the login machine configuration information, includes: If the number of users exceeds a preset first threshold, the number of login machines exceeds a preset second threshold, and the configuration information of the login machines is the same, the request data is forwarded evenly to all the login machines based on the polling scheduling algorithm.
3. The login machine load balancing method according to claim 1, characterized in that: The LVS balancing algorithm includes a minimum connection scheduling algorithm, and forwarding the request data to a target login machine based on the LVS balancing algorithm according to at least one of the number of users, the number of login machines, and the login machine configuration information, includes: Obtain the number of user logins and logouts within a preset time period. If the number of users exceeds a preset first threshold and the number of logins and logouts exceeds a preset third threshold, determine the number of connections corresponding to each login machine based on the minimum connection scheduling algorithm, and forward the most recently received request data to the login machine with the smallest number of connections.
4. The login machine load balancing method according to claim 1, characterized in that: The LVS balancing algorithm includes a weighted least connection scheduling algorithm, and forwarding the request data to a target login machine based on the LVS balancing algorithm according to at least one of the number of users, the number of login machines, and the login machine configuration information, includes: If the login machine configuration information is different, set weights for the login machines according to the login machine configuration information, determine the first ratio of the weights corresponding to each login machine to the number of connections or the second ratio of the number of connections to the weight based on the weighted least connection scheduling algorithm, determine the target login machine according to the first ratio or the second ratio, and forward the most recently received request data to the target login machine.
5. The login machine load balancing method according to claim 4, characterized in that: The step of determining a target login machine according to the first ratio or the second ratio, and forwarding the most recently received request data to the target login machine includes: The login machine with the largest first ratio or the smallest second ratio is taken as the target login machine, and the most recently received request data is forwarded to the target login machine.
6. A login machine load balancing system, characterized in that: It includes a distribution server, which is connected to multiple login machines of a high-performance computer cluster. The distribution server is used to provide login services to users as an external login machine and execute the login machine load balancing method described in any one of claims 1-5. The login machine is used to send the received user request data to the high-performance computer cluster and obtain response data corresponding to the request data from the high-performance computer cluster.
7. The login machine load balancing system according to claim 6, characterized in that: The distribution server is used to obtain the response data from the login machine and forward the response data to the corresponding user when the number of users does not exceed a preset first threshold and the number of login machines does not exceed a preset second threshold; the login machine is used to forward the response data to the corresponding user when the number of users exceeds a preset first threshold and / or the number of login machines exceeds a preset second threshold.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the login machine load balancing method as described in any one of claims 1 to 5 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, the login machine load balancing method as described in any one of claims 1 to 5 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by the processor, the login machine load balancing method as described in any one of claims 1 to 5 is implemented.
