Load balancing method, device, electronic device, storage medium and program product
By broadcasting the registration notification of AP to multiple instance AC processes in the FTTR server, and determining whether to send a management right acquisition request based on its own load, the problem of load balancing between multiple instance ACs is solved, and the load balancing effect without manual intervention and low resource occupation is achieved.
Patent Information
- Application Number
- CN202210892787.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-27
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2042-07-27
AI Technical Summary
In an FTTR server, how to achieve load balancing between multiple instance ACs, especially without manual intervention and communication between instance ACs.
By deploying the management rights allocation process and multiple instance AC processes on the server, broadcasting the registration notification of AP to multiple instance AC processes. Each instance AC process determines whether its own load meets the reception conditions and sends a management rights acquisition request to the management rights allocation process. The management rights allocation process allocates the management rights of AP to the instance AC process that meets the conditions, so that it establishes a connection with the AP.
It realizes dynamic adjustment of load without manual intervention and communication between instance AC to ensure load balancing between instance ACs, with high efficiency and low resource occupancy.
Smart Images

Figure CN115334080B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a load balancing method, device, electronic device, storage medium and program product. Background Art
[0002] AP (Access Point) and AC (Access Controller) are the two main parts of WLAN (wireless local area network) equipment. With the development of WLAN networks, the market has higher requirements for the security and stability of WLAN networks, and cloud AC is an inevitable trend.
[0003] A FTTR (Fiber to The Room) server should contain at least two AC instances organized into an AC group. How to achieve load balancing between each AC instance is a question worth exploring. There are two main load methods in related technologies. One is to statically specify the AC instance corresponding to each AP. The disadvantage is that manual access is required and load balancing during operation cannot be achieved. The other is that each AC instance in the AC group communicates regularly, and each AC instance knows the load of all AC instances, so as to allocate AP connections. The disadvantage is that regular communication occupies resources. Summary of the invention
[0004] In view of the above problems, embodiments of the present invention provide a load balancing method, apparatus, electronic device, storage medium, and program product to overcome the above problems or at least partially solve the above problems.
[0005] A first aspect of an embodiment of the present invention provides a load balancing method, which is applied to a server, wherein a management rights allocation process and multiple instance AC processes are deployed on the server; the method comprises:
[0006] Broadcasting a registration notification of the AP to the multiple AC processes of the instances;
[0007] The multiple instance AC processes each determine whether their own load meets the receiving condition of the registration notification;
[0008] The instance AC process whose own load meets the reception condition of the registration notification sends a request for obtaining the management right of the AP to the management right allocation process;
[0009] The management right allocation process allocates the management right of the AP to an instance AC process that sends the management right acquisition request;
[0010] The AC process of the instance that obtains the management right establishes a connection with the AP.
[0011] Optionally, the management right allocation process allocates the management right of the AP to an instance AC process that sends the management right acquisition request, including:
[0012] The management right allocation process allocates the management right to the instance AC process that first sends the management right acquisition request. The higher the load of the instance AC process that meets the reception condition of the registration notification, the slower the speed of sending the management right acquisition request.
[0013] Optionally, the AC process of the instance whose load satisfies the receiving condition of the registration notification sends a request for obtaining the management right of the AP to the management right allocation process, including:
[0014] The instance AC process whose own load meets the receiving condition of the registration notification and whose own load is higher than the load threshold sends the management right acquisition request after monitoring the registration notification and delaying for a fixed time;
[0015] The instance AC process whose own load meets the receiving condition of the registration notification and whose own load is not higher than the load threshold immediately sends the management right acquisition request after monitoring the registration notification.
[0016] Optionally, the multiple instance AC processes each determine whether their own load meets the receiving condition of the registration notification, including:
[0017] The multiple instance AC processes each determine whether their own load and at least one of the following factors meet the receiving conditions of the registration notification, and the factors include: AP models supported by themselves, their own performance parameter values, and the maximum number of APs that can be received.
[0018] Optionally, after the management right allocation process allocates the management right of the AP to an instance AC process that sends the management right acquisition request, the process further includes:
[0019] The management right allocation process broadcasts a notification that the management right has been allocated;
[0020] The instance AC process whose own load meets the receiving condition of the registration notification stops sending the management right acquisition request of the AP after monitoring the notification.
[0021] Optionally, the AC process of the instance that obtains the management right establishes a connection with the AP, including:
[0022] The AC process of the instance that obtains the management right notifies the AP of its own address and port number;
[0023] The instance AC process that obtains the management right establishes a connection with the AP according to the information returned by the AP after receiving the address and the port number.
[0024] A second aspect of an embodiment of the present invention provides a load balancing device, which is applied to a server, wherein a management right allocation process and multiple instance AC processes are deployed on the server; the device comprises:
[0025] A broadcast module, configured to broadcast a registration notification of the AP to the multiple instance AC processes;
[0026] A judgment module, configured to enable each of the multiple instance AC processes to judge whether its own load meets the receiving condition of the registration notification;
[0027] A sending module, configured to enable an instance AC process whose load satisfies a receiving condition of the registration notification to send a management right acquisition request of the AP to the management right allocation process;
[0028] an allocation module, configured to enable the management right allocation process to allocate the management right of the AP to an instance AC process that sends the management right acquisition request;
[0029] The connection module is used to enable the instance AC process that obtains the management right to establish a connection with the AP.
[0030] Optionally, the allocation module includes:
[0031] The allocation unit is used to enable the management right allocation process to allocate the management right to the instance AC process that first sends the management right acquisition request. The higher the load of the instance AC process whose own load meets the receiving condition of the registration notification, the slower the speed of sending the management right acquisition request.
[0032] Optionally, the sending module includes:
[0033] A first sending unit, configured to enable an instance AC process whose load satisfies a receiving condition of the registration notification and whose load is higher than a load threshold to send the management right acquisition request after delaying a fixed time after listening to the registration notification;
[0034] The second sending unit is used to make the instance AC process whose load meets the receiving condition of the registration notification and whose load is not higher than the load threshold send the management right acquisition request immediately after monitoring the registration notification.
[0035] Optionally, the judging module includes:
[0036] A judgment unit is used to enable the multiple instance AC processes to each judge whether their own load and at least one of the following factors meet the receiving conditions of the registration notification, and the factors include: the AP model supported by themselves, their own performance parameter values, and the maximum number of APs that can be received.
[0037] Optionally, after the management right allocation process allocates the management right of the AP to an instance AC process that sends the management right acquisition request, the process further includes:
[0038] A notification module, used to enable the management right allocation process to broadcast a notification that the management right has been allocated;
[0039] The stopping module is used to make the instance AC process whose load satisfies the receiving condition of the registration notification stop sending the management right acquisition request of the AP after monitoring the notification.
[0040] Optionally, the connection module includes:
[0041] a notification unit, configured to enable the AC process of the instance that obtains the management right to notify the AP of its own address and port number;
[0042] The establishing unit is used to enable the instance AC process that obtains the management right to establish a connection with the AP according to the information returned by the AP after receiving the address and the port number.
[0043] According to a third aspect of an embodiment of the present invention, an electronic device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the load balancing method as described in the first aspect.
[0044] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the load balancing method as described in the first aspect.
[0045] According to a fifth aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the load balancing method as described in the first aspect is implemented.
[0046] The embodiments of the present invention include the following advantages:
[0047] In this embodiment, upon receiving the registration notification from the AP, each instance AC can determine whether to send the management right acquisition request of the AP to the management right allocation process according to its own load. The management right allocation process allocates the management right to an instance AC process that sends the management right acquisition request, so that the instance AC and the AP are connected. There is no need to share load information between multiple instance ACs, and the management right allocation process does not need to know the load information of the instance AC, and the management right allocation can complete the allocation of management rights, thereby achieving load balancing between instance ACs. The whole process has the advantages of no need for manual intervention, no need for communication between instance ACs, high efficiency, and low resource occupation. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0049] Figure 1 is a flow chart of the steps of a load balancing method in an embodiment of the present invention;
[0050] Figure 2 It is a schematic diagram of the competition for management rights of AC processes in the related art;
[0051] Figure 3 It is a schematic diagram of the competition for management rights of AC processes in the related art;
[0052] Figure 4 is a schematic diagram of competition for management rights among AC processes in an example according to an embodiment of the present invention;
[0053] Figure 5 It is a structural diagram of a load balancing device in an embodiment of the present invention. DETAILED DESCRIPTION
[0054] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0055] Reference Figure 1 As shown, a flow chart of the steps of a load balancing method in an embodiment of the present invention is shown. The load balancing method is applied to a server, which may be an FTTR server, or a server having the same or similar functions as the FTTR server. A management rights allocation process and multiple instance AC processes are deployed on the server, and the multiple instance AC processes form an AC group. Figure 1 As shown, the load balancing method may specifically include the following steps:
[0056] Step S11: broadcasting the registration notification of the AP to the multiple AC processes.
[0057] According to the configuration file, the AP can learn the IP (Internet Protocol) and Port (port number) of the server, and then send a registration request to the server. According to the registration request, the server broadcasts the registration notification of the AP to multiple instance AC processes, so that the AP can establish a connection with an instance AC process in the server.
[0058] Step S12: The multiple instance AC processes each determine whether their own load meets the receiving condition of the registration notification.
[0059] After receiving the registration notification of the AP broadcast by the server, each instance AC process determines whether its own load meets the receiving condition of the registration notification. The receiving condition can be set according to actual needs. For example, it can be to determine whether its own load is still idle or whether its own load exceeds a fixed value.
[0060] Optionally, in addition to determining whether its own load meets the conditions for receiving registration notifications, each instance AC process may also determine whether one or more factors such as the AP models it supports, its own performance parameters, and the maximum number of APs that can be received meet the conditions for receiving registration notifications.
[0061] In this way, the instance AC process that meets the receiving condition of the registration notification and thus sends the request for obtaining the management right of the AP can be an instance AC process that is more compatible with the AP in multiple aspects.
[0062] Step S13: The instance AC process whose own load meets the reception condition of the registration notification sends a request for obtaining the management right of the AP to the management right allocation process.
[0063] An instance AC process whose own load does not meet the conditions for receiving the registration notification, or an instance AC process whose own load and one or more factors do not meet the conditions for receiving the registration notification, ignores the registration notification.
[0064] An instance AC process whose own load meets the receiving condition of the registration notification, or an instance AC process whose own load and one or more factors meet the receiving condition of the registration notification, sends a management right acquisition request of the AP to the management right allocation process.
[0065] Step S14: the management right allocation process allocates the management right of the AP to an instance AC process that sends the management right acquisition request.
[0066] The management right of an AP is unique and can only belong to one instance AC process. The management right allocation process allocates the management right of the AP to one of the instance AC processes that sends the management right acquisition request.
[0067] Optionally, when management rights are allocated to an instance AC process, the management rights allocation process will broadcast a notification that management rights have been allocated to all instance AC processes. The instance AC process whose own load meets the receiving conditions for registration notification, or the instance AC process whose own load and one or more factors meet the receiving conditions for registration notification, will stop sending management rights acquisition requests for the AP after hearing the notification that management rights have been allocated.
[0068] In this way, other instance AC processes that are bound to be unable to obtain the management right can be prevented from continuing to send management right acquisition requests, thereby saving computing resources.
[0069] Optionally, the management right allocation process does not know the load of each instance AC process, and when allocating management rights, it allocates management rights to the instance AC process that first sends the management right acquisition request. The management right allocation process will first receive the management right acquisition request that is sent first.
[0070] Because the instance AC process with a higher load sends a management rights acquisition request more slowly, the instance AC process that meets the registration notification receiving conditions and has the lowest load will send a management rights acquisition request first, and the management rights allocation process will allocate management rights to the instance AC process with the lowest load.
[0071] In this way, there is no need to share load information between instances AC, and the management right allocation process does not need to know the load information of instance AC processes. It is possible to allocate management rights to instance AC processes that meet the receiving conditions for registration notifications and have the lowest load.
[0072] Optionally, based on the above technical solution, in order to further ensure that the management rights are allocated to the instance AC process that meets the conditions and has the lowest or lower load, the instance AC process whose load is higher than the load threshold can be set to send the management rights acquisition request after a fixed delay. The load threshold can be set according to actual needs.
[0073] An instance AC process whose own load meets the receiving conditions of the registration notification and whose own load is higher than the load threshold sends the management right acquisition request after a fixed time delay after listening to the registration notification; an instance AC process whose own load meets the receiving conditions of the registration notification and whose own load is not higher than the load threshold sends the management right acquisition request immediately after listening to the registration notification.
[0074] For example, the load threshold is 50%, the conditions for receiving the registration notification include that the load does not exceed 80%, the fixed time is 1 second, and the instance AC process-1 is a process whose other factors meet the conditions for receiving the registration notification and whose load is 40%, and the instance AC process-2 is a process whose other factors meet the conditions for receiving the registration notification and whose load is 70%. Although both the instance AC process-1 and the instance AC process-2 will send a request for obtaining management rights, the instance AC process-1 will send the request for obtaining management rights immediately after listening to the registration notification, and the instance AC process-2 will send the request for obtaining management rights after listening to the registration notification with a delay of 1 second.
[0075] In this way, it can be ensured that the management right is allocated to the AC process of the instance that meets the conditions and has the lowest or lower load.
[0076] Step S15: The AC process of the instance that obtains the management right establishes a connection with the AP.
[0077] The instance AC process that obtains the management right of the AP can establish a connection with the AP, thereby implementing the management of the AP by the instance AC.
[0078] Optionally, the AC process of the instance that has obtained the management right establishes a connection with the AP through the following steps: the AC process of the instance that has obtained the management right notifies the AP of its own address (IP) and port number (Port); after receiving the address and port number of the AC process of the instance, the AP sends information according to the address and port number, and the AC process of the instance that has obtained the management right establishes a connection with the AP according to the information returned by the AP after receiving the address and port number. In this way, the connection between the AC process of the instance that has obtained the management right and the AP can be established.
[0079] Optionally, the instance AC process may also establish a connection with the AP in other ways. For example, the server obtains information about the AP and connects the AP with the instance AC process.
[0080] By adopting the technical solution of the embodiment of the present application, upon receiving the registration notification of the AP, each instance AC can determine whether to send the management right acquisition request of the AP to the management right allocation process according to its own load, and the management right allocation process allocates the management right to an instance AC process that sends the management right acquisition request, so that the instance AC and the AP are connected. Among them, there is no need to share load information between multiple instance ACs, and the management right allocation process does not need to know the load information of the instance AC, and the allocation of management rights can be completed, thereby achieving load balancing between instance ACs.
[0081] In addition, by adopting the technical solution of the embodiment of the present application, dynamic adjustment of the load can be achieved. Instead of directly determining the instance AC process corresponding to each AP, when each AP is connected, its management rights can be dynamically allocated to the instance AC process that meets the conditions and has the lowest or lower load.
[0082] Therefore, the technical solution of the embodiment of the present application has the advantages of no need for human intervention in the entire process, no need for communication between instance ACs, high efficiency, and low resource occupancy. It solves the problems in related technologies that require human intervention, low efficiency and high maintenance costs, and cannot dynamically adjust the load, resulting in internal resource consumption.
[0083] Figure 2 A schematic diagram of the competition for management rights among instance AC processes in the related art is shown, wherein the instance AC process corresponding to each AP is determined by static designation. This method requires manual intervention and cannot achieve load balancing during operation.
[0084] Figure 3 A schematic diagram of the competition for management rights of instance AC processes in the related art is shown, wherein multiple instance AC processes periodically share load information. After sharing the load information, instance AC process-1 with a lower load establishes a connection with the AP after learning that its load is lower. The disadvantage of this method is that the instance ACs need to communicate periodically, which occupies resources.
[0085] Figure 4 A schematic diagram of the instance AC process competing for management rights in an embodiment of the present application is shown, wherein load information is not shared between multiple instance AC processes. The AP sends a registration notification to the server, and the server broadcasts the registration notification to multiple instance AC processes, and each instance AC process determines whether it meets the receiving conditions of the registration notification. The instance AC process that meets the conditions sends a management rights acquisition request to the management rights allocation process. The management rights allocation process allocates management rights to the instance AC process that first sends the management rights acquisition request, so that a connection is established between the instance AC process and the AP. In this way, the management rights can be simply and quickly allocated to the instance AC process that meets the conditions and has the lowest load.
[0086] Optionally, based on the above technical solution, if the AP connected to the server is to be migrated to other servers, the address and port number of the server in the configuration file of the AP can be modified to the address and port number of the other server, and the AP will send a registration notification to the other server according to the address and port number of the other server in the configuration file, thereby establishing a connection with the instance AC process included in the other server. Among them, the other server is also deployed with a management right allocation process and multiple instance AC processes. After sending a registration notification to other servers, the other server will also broadcast the registration notification to multiple instance AC processes deployed by itself. The multiple instance ACs each determine whether their own load meets the receiving conditions of the registration notification. The instance AC process whose own load meets the receiving conditions of the registration notification sends a management right acquisition request of the AP to the management right allocation process; the management right allocation process allocates the management right of the AP to the instance AC process that first sends the management right acquisition request, so that the instance AC process establishes a connection with the AP.
[0087] When migrating an AP to another server, it is necessary to disconnect the AP from the instance AC process of the original server. When the AP is disconnected from the instance AC process, it is not necessary to notify other instance AC processes.
[0088] Optionally, based on the above technical solution, the management rights allocation process can be a redis process (a key-value storage system). When notifying each instance AC process AP of a registration request, it brings the competing key. An instance AC successfully executes setnx (lock) on the competing key in redis, and the value (value) records the information of the instance AC process that successfully competes (obtains management rights). When other instances AC execute setnx on the competing key, they will return failure because the key already exists, that is, the competition fails.
[0089] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0090] Figure 5 is a structural diagram of a load balancing device according to an embodiment of the present invention, the device is applied to a server, and a management right allocation process and multiple instance AC processes are deployed on the server; Figure 5 As shown, the device includes a broadcast module, a judgment module, a sending module, an allocation module and a connection module, wherein:
[0091] A broadcast module, configured to broadcast a registration notification of the AP to the multiple instance AC processes;
[0092] A judgment module, configured to enable each of the multiple instance AC processes to judge whether its own load meets the receiving condition of the registration notification;
[0093] A sending module, configured to enable an instance AC process whose load satisfies a receiving condition of the registration notification to send a management right acquisition request of the AP to the management right allocation process;
[0094] an allocation module, configured to enable the management right allocation process to allocate the management right of the AP to an instance AC process that sends the management right acquisition request;
[0095] The connection module is used to enable the instance AC process that obtains the management right to establish a connection with the AP.
[0096] Optionally, the allocation module includes:
[0097] The allocation unit is used to enable the management right allocation process to allocate the management right to the instance AC process that first sends the management right acquisition request. The higher the load of the instance AC process whose own load meets the receiving condition of the registration notification, the slower the speed of sending the management right acquisition request.
[0098] Optionally, the sending module includes:
[0099] A first sending unit, configured to enable an instance AC process whose load satisfies a receiving condition of the registration notification and whose load is higher than a load threshold to send the management right acquisition request after delaying a fixed time after listening to the registration notification;
[0100] The second sending unit is used to make the instance AC process whose load meets the receiving condition of the registration notification and whose load is not higher than the load threshold send the management right acquisition request immediately after monitoring the registration notification.
[0101] Optionally, the judging module includes:
[0102] A judgment unit is used to enable the multiple instance AC processes to each judge whether their own load and at least one of the following factors meet the receiving conditions of the registration notification, and the factors include: the AP model supported by themselves, their own performance parameter values, and the maximum number of APs that can be received.
[0103] Optionally, after the management right allocation process allocates the management right of the AP to an instance AC process that sends the management right acquisition request, the process further includes:
[0104] A notification module, used to enable the management right allocation process to broadcast a notification that the management right has been allocated;
[0105] The stopping module is used to make the instance AC process whose load satisfies the receiving condition of the registration notification stop sending the management right acquisition request of the AP after monitoring the notification.
[0106] Optionally, the connection module includes:
[0107] a notification unit, configured to enable the AC process of the instance that obtains the management right to notify the AP of its own address and port number;
[0108] The establishing unit is used to enable the instance AC process that obtains the management right to establish a connection with the AP according to the information returned by the AP after receiving the address and the port number.
[0109] It should be noted that the device embodiment is similar to the method embodiment, so the description is relatively simple, and the relevant parts can be referred to the method embodiment.
[0110] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0111] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0112] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, apparatuses, electronic devices, and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0113] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0114] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0115] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0116] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0117] The above is a detailed introduction to a load balancing method, device, electronic device, storage medium and program product provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A load balancing method, characterized in that: Applied to a server, a management rights allocation process and multiple instance AC processes are deployed on the server; the method comprises: Broadcasting a registration notification of the AP to the multiple AC processes of the instances; The multiple instance AC processes each determine whether their own load meets the receiving condition of the registration notification; The instance AC process whose own load meets the reception condition of the registration notification sends a request for obtaining the management right of the AP to the management right allocation process; The management right allocation process allocates the management right of the AP to an instance AC process that sends the management right acquisition request; The AC process of the instance that obtains the management right establishes a connection with the AP; The management right allocation process allocates the management right of the AP to an instance AC process that sends the management right acquisition request, including: The management right allocation process allocates the management right to the instance AC process that first sends the management right acquisition request. The higher the load of the instance AC process that meets the reception condition of the registration notification, the slower the speed of sending the management right acquisition request.
2. The method according to claim 1, characterized in that The instance AC process whose own load meets the receiving condition of the registration notification sends a management right acquisition request of the AP to the management right allocation process, including: The instance AC process whose own load meets the receiving condition of the registration notification and whose own load is higher than the load threshold sends the management right acquisition request after monitoring the registration notification and delaying for a fixed time; The instance AC process whose own load meets the receiving condition of the registration notification and whose own load is not higher than the load threshold immediately sends the management right acquisition request after monitoring the registration notification.
3. The method according to claim 1, characterized in that The multiple AC processes of each instance judge whether their own load meets the receiving condition of the registration notification, including: The multiple instance AC processes each determine whether their own load and at least one of the following factors meet the receiving conditions of the registration notification, and the factors include: AP models supported by themselves, their own performance parameter values, and the maximum number of APs that can be received.
4. The method according to any one of claims 1 to 3, characterized in that: After the management right allocation process allocates the management right of the AP to an instance AC process that sends the management right acquisition request, the process further includes: The management right allocation process broadcasts a notification that the management right has been allocated; The instance AC process whose own load meets the receiving condition of the registration notification stops sending the management right acquisition request of the AP after monitoring the notification.
5. The method according to any one of claims 1 to 3, characterized in that: The AC process of the instance that obtains the management right establishes a connection with the AP, including: The AC process of the instance that obtains the management right notifies the AP of its own address and port number; The instance AC process that obtains the management right establishes a connection with the AP according to the information returned by the AP after receiving the address and the port number.
6. A load balancing device, characterized in that: Applied to a server, a management rights allocation process and multiple instance AC processes are deployed on the server; the device comprises: A broadcast module, configured to broadcast a registration notification of the AP to the multiple instance AC processes; A judgment module, configured to enable each of the multiple instance AC processes to judge whether its own load meets the receiving condition of the registration notification; A sending module, configured to enable an instance AC process whose load satisfies a receiving condition of the registration notification to send a management right acquisition request of the AP to the management right allocation process; an allocation module, configured to enable the management right allocation process to allocate the management right of the AP to an instance AC process that sends the management right acquisition request; A connection module, used to enable the AC process of the instance that obtains the management right to establish a connection with the AP; The allocation module comprises: The allocation unit is used to enable the management right allocation process to allocate the management right to the instance AC process that first sends the management right acquisition request. The higher the load of the instance AC process whose own load meets the receiving condition of the registration notification, the slower the speed of sending the management right acquisition request.
7. The device according to claim 6, characterized in that The sending module comprises: A first sending unit, configured to enable an instance AC process whose load satisfies a receiving condition of the registration notification and whose load is higher than a load threshold to send the management right acquisition request after delaying a fixed time after listening to the registration notification; The second sending unit is used to make the instance AC process whose load meets the receiving condition of the registration notification and whose load is not higher than the load threshold send the management right acquisition request immediately after monitoring the registration notification.
8. The device according to claim 6, characterized in that The judging module comprises: A judgment unit is used to enable the multiple instance AC processes to each judge whether their own load and at least one of the following factors meet the receiving conditions of the registration notification, and the factors include: the AP model supported by themselves, their own performance parameter values, and the maximum number of APs that can be received.
9. The device according to any one of claims 6 to 8, characterized in that: After the management right allocation process allocates the management right of the AP to an instance AC process that sends the management right acquisition request, the process further includes: A notification module, used to enable the management right allocation process to broadcast a notification that the management right has been allocated; The stopping module is used to make the instance AC process whose load satisfies the receiving condition of the registration notification stop sending the management right acquisition request of the AP after monitoring the notification.
10. The device according to any one of claims 6 to 8, characterized in that: The connection module comprises: a notification unit, configured to enable the AC process of the instance that obtains the management right to notify the AP of its own address and port number; The establishing unit is used to enable the instance AC process that obtains the management right to establish a connection with the AP according to the information returned by the AP after receiving the address and the port number.
11. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the load balancing method as described in any one of claims 1 to 5.
12. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the load balancing method as claimed in any one of claims 1 to 5.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the load balancing method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Method for enabling mobile terminal to have access to wireless access points and wireless access points
CN103384392A
Method, device and system for achieving cloud AC load balancing
CN105578527A