CN117527700A - Method and system for load balancing of one-to-many network address by dialing instead - Google Patents

Method and system for load balancing of one-to-many network address by dialing instead Download PDF

Info

Publication number
CN117527700A
CN117527700A CN202311642156.5A CN202311642156A CN117527700A CN 117527700 A CN117527700 A CN 117527700A CN 202311642156 A CN202311642156 A CN 202311642156A CN 117527700 A CN117527700 A CN 117527700A
Authority
CN
China
Prior art keywords
uplink
user
load
session
group
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311642156.5A
Other languages
Chinese (zh)
Inventor
王广彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xi'an Nroad Network Technology Co ltd
Original Assignee
Xi'an Nroad Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xi'an Nroad Network Technology Co ltd filed Critical Xi'an Nroad Network Technology Co ltd
Priority to CN202311642156.5A priority Critical patent/CN117527700A/en
Publication of CN117527700A publication Critical patent/CN117527700A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/2514Translation of Internet protocol [IP] addresses between local and global IP addresses
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Abstract

The invention discloses a method and a system for balancing load of a one-to-many network address by dialing, which relate to the technical field of network communication and solve the problems of overhigh calculation load and influence on forwarding performance when balancing the load of a mass link in the prior art, wherein the method comprises the following steps: distributing a plurality of uplinks into a plurality of uplink groups according to a plan, and respectively calculating the user load of each uplink group and the network load of each uplink in each uplink group; acquiring a user online request, adding the user online request into an uplink group corresponding to the minimum user load, and distributing a group of ports for the user online request in the uplink group; acquiring a new session established by a user, and acquiring a session link pair by using a link cache and an uplink set with smaller network load according to a target address of the new session; and using the session link to convert the corresponding address and the port corresponding to the user to complete the address conversion and the original information recovery. The method realizes the effect of load balancing among large-scale links with lower load calculation amount, can ensure that user application does not have perceived access, and improves the efficiency of system address load balancing conversion.

Description

Method and system for load balancing of one-to-many network address by dialing instead
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a method and system for load balancing of a one-to-many network address.
Background
NAPT technology is a technology for translating an intranet private IP address into a public IP address, and is used for slowly releasing the problems of exhaustion of the IP address and address conversion interconnection among a plurality of network domains. Existing NAPT technology is often applied in routers, firewalls, or separate NAPT devices, mainly including the following three types: a static NAPT, a dynamic address NAPT, and a NAPT for network address port translation.
With the development of network technology and the increase of the requirement for flexibility of devices, it has become more and more difficult for the special-purpose network devices to meet the requirements of park network customization and flexible authentication, so that soft routing products based on general-purpose computer hardware are generated. Taking the park exit management device as an example, the traditional network device can provide dial-up link management of a small number of accounts, but the number of exit links of the dialing environment can be increased to hundreds or thousands of scales, and the traditional special network device is difficult to break through the complexity of configuration and application, so that a soft gateway of general computer hardware appears. The soft gateway does not have a special service board of the traditional network equipment, and has obvious bottlenecks on the overall performance and bandwidth of the system. In order to solve similar problems, high-performance processing frameworks such as DPDK and VPP are introduced, technologies such as multi-CPU cores, system cache, DMA, network card acceleration and the like are fully utilized, high-memory and multi-CPU environments of the system can be fully utilized, and an efficient packet processing mechanism is provided based on general-purpose computer hardware.
It can be seen that under the condition that port virtual link aggregation needs to be made, due to factors such as a multi-queue mechanism of the network card, network port aggregation, multiple equipment terminals used by the same user and the like, the messages of the same user need to be subjected to NAPT processing on different CPU cores by using port resources of multiple IP addresses. The conventional load balancing algorithm needs to consider various loads, so that the weighting calculation and sequencing of various loads are involved, dynamic balancing scheduling is needed to be carried out globally, various conflict scenes inevitably exist, and the conflict scenes need to be solved by means of a locking mechanism, so that the processing efficiency of the multi-core many-core system is severely restricted. Meanwhile, under a plurality of uplinks, if the session links of the application change, authentication problems may occur at the high-security server, and session failure, frequent authentication and other phenomena may be caused. How to efficiently perform load balancing on a large number of outlets and balance a plurality of virtual outlets, and hiding implementation details for users at the same time ensures normal application of the users is a problem to be solved.
Disclosure of Invention
The embodiment of the invention solves the problems of overhigh calculation load and influence on forwarding performance when balancing the load of a mass link in the prior art by providing the method and the system for balancing the load of the one-to-many network address instead of dialing, avoids the problems of resource competition preemption and high processing delay, realizes the effect of balancing the load among large-scale links with lower load calculation amount, can ensure that a user can apply no perceived access, and improves the efficiency of balancing and converting the load of the system address.
In a first aspect, an embodiment of the present invention provides a method for load balancing of a dial-up one-to-many network address, where the method includes:
distributing a plurality of uplinks into a plurality of uplink groups according to a plan, and respectively calculating the user load of each uplink group and the network load of each uplink in each uplink group;
acquiring a user online request, adding the user online request to an uplink group corresponding to the minimum user load, and distributing a group of ports for the user online request in the uplink group;
acquiring a new session established by the user, and acquiring a session link pair by using a link cache and an uplink set with smaller network load according to a target address of the new session;
and using the session link pair corresponding to the address and the port corresponding to the user to complete address conversion and original information recovery.
With reference to the first aspect, in one possible implementation manner, the adding the user online request to an uplink group corresponding to the minimum user load specifically includes:
maintaining the user load condition of each uplink group, dynamically increasing and decreasing the number of users of the uplink group when the users go on/off line, recording the uplink number when the uplinks are added and deleted in the group, and calculating the user load according to the number of users and the uplink number of the group;
and adding the user online request to an uplink group corresponding to the minimum user load.
With reference to the first aspect, in one possible implementation manner, the allocating a set of ports in the uplink group for the user online request specifically includes:
when the user exists, a group of ports are statically allocated for the user;
and when the user does not exist, a group of ports corresponding to the user is allocated.
With reference to the first aspect, in one possible implementation manner, the acquiring a new session established by the user and acquiring a session link pair according to a target address of the new session specifically includes:
judging whether the target address of the new session exists in a cache session or not;
if yes, inquiring a buffer session link pair stored in the buffer session to obtain the session link pair;
and if not, circularly selecting one uplink in the uplink set of the smaller network load in the uplink group to obtain the session link pair.
With reference to the first aspect, in one possible implementation, the selecting one uplink in the uplink set of the smaller network load in the uplink group to obtain the session link pair specifically includes:
respectively counting the number of uplink packets and downlink packets of each link and the number of newly-built sessions;
in each network load calculation period of the uplink group, weighting and calculating the network loads of all the uplinks in the group, and according to the link characteristics, incorporating the number of uplink packets, the number of downlink packets and the number of newly-built sessions into a calculation process;
performing partial screening and sorting on the uplinks according to network loads by taking the uplink groups as units, and selecting the uplink set with smaller network loads;
and before the next load calculation period comes, circularly selecting and distributing the new session request of the user in the uplink set of the smaller network load, and establishing a session link pair.
In a second aspect, an embodiment of the present invention provides a system for load balancing of a one-to-many network address, where the system is applied to a server, and includes: the system comprises a system configuration component, an uplink management component, a user online and offline management component, a network load management component, a user session management component and a link buffer component;
the system configuration component is used for providing a user management interface, acquiring the number of the uplinks and the user scale information, and creating and distributing a key task structure of the system;
the uplink management component is configured to add the uplink to an uplink group and delete the uplink when the uplink fails;
the user online and offline component is used for adding a user to an uplink group with the lowest user load when the user is online and adding a port group for the user; simultaneously maintaining the uplink group, recording the total number of users in the uplink group and the uplink number, and calculating the user load according to the total number of users and the uplink number of the group;
the network load management component is configured to maintain a plurality of uplinks in the uplink group, record the number of uplink data packets, the number of downlink data packets and the number of newly-built sessions of each uplink in a current time period, periodically calculate a network load of each uplink, and execute network load sorting screening in the uplink group to generate the uplink set of smaller network loads;
the user session management component is used for tracking the newly-built session and the duration of each user;
the link buffer component is used for recording the corresponding relation between the target address and the uplink.
In a third aspect, an embodiment of the present invention provides a server for load balancing of a one-to-many network address, including a memory, a processor, and a network card;
the memory is used for storing computer executable instructions;
the processor is configured to execute the computer-executable instructions to implement a method of one-to-many network address load balancing and any of the methods described herein;
the network card is used for executing the network receiving and transmitting instruction so as to realize a network packet receiving and transmitting method in a network address load balancing method and provide a basic queue function.
One or more technical solutions provided in the embodiments of the present invention at least have the following technical effects or advantages:
the embodiment of the invention adopts a method and a system for carrying out load balancing conversion on a one-to-many network address by dialing, and the method comprises the following steps: statically planning uplink and user packets; the packet maintains an uplink; after the user is online, the user is associated with an uplink group, and a PortGroup is statically allocated for subsequent session allocation; recording and maintaining the load of each MLink, including session allocation, up-down use conditions, and calculating the load according to the collected data weight; and selecting the MLink according to the load by combining the load and the address cache, selecting the MLink according to the load for the new address, and executing cache inquiry for the target address of the established session so as to consider the targets of session continuation and load balancing and ensure the access effect of the user. By using the mechanism, effective node load balancing is realized in a static structure, the system has no lock, the processing capacity of the multi-core and many-core system can be fully exerted through reasonable planning configuration, the network packet processing capacity can be conveniently expanded, and higher number of links and user management are supported. The invention solves the problems of limited processing capacity, easy resource competition and high delay caused by sharing one processing queue by massive and various resources in the prior art, realizes the balance of node selection according to dynamic load, ensures the continuation of user session and improves the efficiency of system address conversion and forwarding.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the embodiments of the present invention or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for load balancing conversion of a dial-up one-to-many network address according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a system for load balancing conversion of a dial-up one-to-many network address according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It will be apparent that the described embodiments are some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The dial-up gateway generally uses general computer hardware, namely a general computer hardware platform of an X86 architecture or an Arm architecture; the method and system itself is not limited to a dial-up gateway implemented in general purpose computer hardware. In order to improve the processing efficiency of the network packet, a DPDK is generally used as a basic processing framework. After the network card receives the data packet, the key data field of the packet is hashed by using a built-in algorithm, the packet is distributed to a CPU queue according to the Hahs value, link selection, session management and NAPT are completed in the CPU core, or the packet is transferred to other CPU queues for processing according to rules, and finally the packet is sent to the corresponding operator side through the network card.
The embodiment of the invention provides a method for balancing load of one-to-many network addresses by dialing, which comprises the following steps S101 to S104 as shown in the figure.
S101, distributing a plurality of uplinks to a plurality of uplink groups according to a plan, and respectively calculating the user load of each uplink group and the network load of each uplink in each uplink group.
Illustratively, the number of uplinks (MLink) of the system is pre-programmed, and all uplink MLink is generally maintained in groups of 64-128 MLink per group; MLink is allocated to each group by the designed number and further evenly allocated to each thread queue. The massive uplinks are distributed into a plurality of groups, specifically, the grouping number is planned according to the expected user quantity and the uplink number of the system, and the thread number is determined by combining hardware limitation, so that the division scheme of the system is basically determined. The method specifically comprises the following steps: and collecting uplink quantity scale, user quantity scale, hardware CPU core number and network card queue quantity limit, planning packet (LinkGroup) quantity, and determining MLink quantity and user capacity of each LinkGroup.
When the MLink link has an on-line condition and is added to the system, the MLink link is added to the next group after filling one group, preferably starting from the LinkGroup with a smaller sequence number.
When the user load and the network load are calculated, the calculation load is not subjected to global forced refreshing according to the distributed calculation of the uplink group.
S102, obtaining a user online request, adding the user into an uplink group corresponding to the minimum user load, and distributing a group of ports for the user online request in the uplink group.
Specifically, in step S102, the adding the user online request to the uplink group corresponding to the minimum user load specifically includes:
(1) The user load condition of each uplink group is maintained, and the number of users of the uplink group is dynamically increased or decreased when the users go online or offline.
(2) The number of uplinks per uplink group is maintained, and the number of uplinks per uplink group is dynamically increased or decreased when an add operation occurs on the uplinks.
(3) And adding the user online request to an uplink group corresponding to the minimum user load.
Illustratively, the LinkGroup with the smallest user load is selected to join when the user comes online. The calculation of the user load for each LinkGroup is typically done using the "uplink number" times the "load parameter" and subtracting the number of users for that LinkGroup. The load parameter is selected according to the user scale and the uplink scale, and is generally 2-8; the larger the calculated value, the lower the user load. And (3) circularly calculating the user loads of all the overall LinkGroups, screening out the LinkGroup with the lowest user load, and adding the user into the LinkGroup.
Specifically, in step S102, a group of ports is allocated to the user online request in the uplink group, which specifically includes the following steps:
(1) When a user exists, a set of ports is statically assigned to the user.
(2) When the user does not exist, the user is added and a group of ports corresponding to the user are allocated.
Illustratively, the allocation method in step S102 is static allocation, a group of ports (portgroups) is statically allocated to each user, and a proper PortGroup size is selected according to the system plan, so as to balance the balance between the balance and the user management, which is generally selected as 32; the NAT port allocation of each user session is selected from the PortGroup of the user, and allocation and expiration maintenance are performed according to the session newly-built and timeout activity states. Before the user goes offline, the user uses the ports of each link in the LinkGroup all the time, and thread-level locking operation is avoided through static allocation, so that concurrency capability is improved.
S103, the packet maintains the network load of the uplink; acquiring a new session established by a user, and acquiring a session link pair according to a target address of the new session, wherein the method specifically comprises the following steps:
(1) Maintaining the load condition of each uplink MLink, counting the number of uplink packets and downlink packets of each uplink, and counting the number of newly-built sessions;
(2) The network load calculation of the uplink is maintained by the packet, and the network loads of all uplink MLink in the group are calculated in a weighting way in each LinkGroup load calculation period; then sorting the uplinks of the group according to network load, selecting an uplink set (MLinkSet) of smaller network load in the LinkGroup;
(3) Judging whether a target address of the new session exists in the cache session;
(4) If yes, inquiring a buffer session link pair stored in a buffer session to obtain the session link pair;
(5) If not, circularly selecting an uplink MLink from the uplink set MLinkSet of smaller network load in the uplink group LinkGroup to obtain a session link pair;
(6) And (5) saving the newly-built session link pair in the step (5) into a cache session.
Illustratively, the calculation of uplink network load uses weighting coefficients of 4, 2, 1 to weight the load for the current period, the previous one, and the previous two periods; in the network environment limiting the number of sessions, if the number of sessions has a larger influence on the load of the user, the weighting coefficient of the newly-built number of sessions in the current period is increased.
In step S103, the session is allocated with the buffer address preferentially, and in the case of failure of allocation due to port or other resource limitation, the session is allocated with the MLink with less network load again, so as to avoid failure of user access due to burst of a large number of connections in a short time.
Preferably, in step S103, MLink is ordered according to load in a link group, and the MLink in the "lower load" interval is only selected without full ordering.
Preferably, in step S103, the MLink with less load may be used to allocate the session at random, and the session is not necessarily created by using the MLink with the least load, and generally, the MLink with the smaller load interval may be selected at random by adding the number of accesses to the user serial number as a dynamic key, so as to avoid burst access and causing small MLink load surge and causing imbalance due to using the same MLink with the same group by multiple users in a short time.
For example, buffer allocation, when a user newly establishes a session, checking a destination address dstadr of the session, (1) if the user does not access the address or the buffered session information has expired, selecting an uplink MLink newly established session from MLinkSet, and buffering a session link pair (dstadr, MLink); (2) If the user has recently accessed the target address, the query cache retrieves the last link MLink used.
The specific step S103 further includes, when the session of the user accessing a certain target address exceeds the port limit, discarding the newly-built session and reporting an error according to the service system requirement; (2) new sessions using other uplinks; (3) One implementation is selected from three strategies of newly allocating a PortGroup.
The session link pair is cached, after a session link pair is newly established, the information is stored according to the destination address DstAddr of the session, and the current time is recorded; the storage area used by the recording session is implemented as a linear table, which is in turn queried for unused or expired record keeping.
S104, address conversion and original information recovery are completed by using the corresponding address of the session link pair and the corresponding port of the user.
Illustratively, after the MLink is obtained in step (1) or (2), NAT information is allocated by using the link corresponding address and the port group (PortGroup) of the user, so as to complete address translation. The allocation of the user uplink gives consideration to application affinity and load balancing, and application affinity prioritizes.
When the subsequent message of the same session of the user arrives, the information is obtained according to the used NAT algorithm, and the original information is restored.
In the method provided by the invention, static planning uplink and user grouping is used, the uplink and the user are maintained in a grouping way, the scale of each calculation unit is reduced, the calculation amount of each load calculation and balancing process is reduced through smaller calculation units, the system delay is reduced, and the processing capacity can be conveniently and horizontally expanded in a multi-core multi-thread mode; after the user is online, the user is associated with an uplink group, and a PortGroup is statically allocated for subsequent session allocation, so that the maintenance workload of the port is reduced, and the competition among the users is avoided; the selection of the uplink MLink combines the load and the address cache, selects the MLink for the new address according to the load, and executes cache inquiry for the target address of the established session so as to consider the targets of session continuation and load balancing and ensure the access effect of the user. By comprehensively using the mechanism, effective node load balancing is realized in a static structure, the system has no lock, and the processing capacity can be conveniently expanded through reasonable planning configuration, so that higher number of links and user management are supported. The invention solves the problems of limited processing capacity, easy resource competition and high delay of the prior art that a plurality of devices share one processing queue, realizes the balance of node selection according to dynamic load, ensures the continuation of user session and improves the efficiency of system address conversion.
When the method provided by the invention is implemented, the Hash function of the customized network card is designed, and the associated network equipment is configured, so that network flows of a plurality of equipment of the same user can enter the same processing queue and be processed by the same processing core.
The embodiment of the invention provides a system for balancing load of one-to-many network addresses by dialing, which is applied to a server and comprises the following components: a system configuration component, an uplink management component, a user online and offline management component, a network load management component, a user session management component and a link buffer component.
The system configuration component is used for providing a user management interface, acquiring the number of the uplinks and the user scale information, and creating and distributing a key task structure of the system; specifically, the system configuration component determines LinkGroup, portGroup the number at a time at start-up; wherein the LinkGroup can be dynamically amplified at run-time to support system expansion.
The uplink management component is configured to add an uplink to the uplink group and delete the uplink when the uplink fails; specifically, the uplink needs to be added to the LinkGroup and maintained by groups to reduce the time consuming ordering, querying, updating operations, system delay and performance jitter.
The user online and offline management component is used for associating user binding into an uplink group and deleting the user information when the user is no longer active so as to release the system capacity; and assigning a port group PortGroup to the user. Specifically, the user needs to bind to a LinkGroup in which all traffic and sessions that follow by the user are performed. The user network load management component records the total number of users in each uplink group, and in conjunction with the uplink total number of the group, calculates the user load, and decides to which LinkGroup the user is added.
Illustratively, the port range of each PortGroup is divided according to the user scale, and serial numbers are allocated to each PortGroup in turn; after the user is bound, according to the bit sequence number of the user, the PortGroup corresponding to the bit is allocated.
The network load management component is configured to maintain the uplink group and to manage the network load of the uplink in packets. Specifically, each MLink records the number of own uplink data packets, the number of downlink data packets and the number of newly-built sessions; each LinkGroup manages own network load update, and when an update period (5 ms-125 ms is selected according to the system load condition) is reached, the network load of each MLink in the group is updated according to the number of uplink and downlink data packets and the newly-built session number; in order to reasonably reflect the current state and give consideration to the historical session load, each link MLink records the data of the current period and the previous two periods, and different weighting coefficients are used for calculating to obtain the weighting load; and then sorting the loads in the current LinkGroup according to the weighted loads to obtain the uplink set MLinkSet with lower loads for the user session management component.
The link buffer component is used for recording the corresponding relation between the target address and the uplink. Specifically, when the user newly establishes a session, if a session link pair exists, the record time is updated, otherwise, a link buffer record (DstAddr, MLink) is newly established. Records can be obtained by DstAddr fast Hash.
Illustratively, the link caching component updates the active time when the user newly establishes a session and does not actively detect whether the session is out of date.
The user session management component is used to track new sessions and persistence for each user. Specifically, the network traffic of each user is divided into a session according to the difference of the target address and the target port; when a new session occurs, a session structure is newly established and the current time is recorded. In order to improve the system efficiency, the expiration condition of the session is not actively scanned and checked, and when the session is newly established and inquired, whether the session is expired or not is judged, and the expired session is cleaned. Each new session needs to be allocated uplink information: the session management component inquires link buffer information according to the target address DstAddr, if effective information is inquired, MLink information is obtained, and a port is applied for a user in a pre-allocated port group PortGroup, session information is allocated, and information is recorded; if the query does not reach the cache or the cache is expired, the network load component queries the MLinkSet of the LinkGroup to obtain a new MLink, and the session creation operation is completed.
To apply to the server side, the present invention provides a specific embodiment, and as shown in fig. 2, the system 200 includes: a system configuration component 201, an uplink management component 202, a user online-offline management component 203, a link caching component 204, a network load management component 205, and a user session management component 206.
A system configuration component 201, providing a user management interface, obtaining uplink and user scale information, creating and assigning a mission critical structure for the system, comprising: linkGroup, portGroup, etc.;
an uplink management component 202 that allows adding an uplink to a certain LinkGroup and deleting from the corresponding group when the uplink fails;
the user online and offline management component 203 automatically selects a link group added to a lower load according to the user load condition of each link group when the user is online, and allocates a PortGroup according to the bit sequence number of the user;
the network load management component 204, each LinkGroup maintains one, records the load condition of each MLink in the group, counts the number of uplink and downlink data packets according to the period (5 ms-125 ms is selected according to the system load condition), and establishes the session number; in order to reasonably reflect the current state and give consideration to the historical session load, each link records the data of the current period and the previous two periods, and uses different weighting coefficients to calculate the weighted load and order the weighted load for the session management component to use.
A link buffer component 205, each online user maintains one, records the corresponding relation between the target address dstadr and the uplink, and updates the recording time when the user newly establishes a session; when the session of the target address does not exist in the set time, the recording time is not updated, and the next time the record is queried, the record is processed according to invalidation;
the user session management component 206 tracks the new sessions and persistence of each user. When a user establishes a session, firstly inquiring a link buffer component according to a target address, and if the buffered link information is acquired, using the link to allocate a session port; otherwise, selecting a Link with smaller load to create a session according to the load of each MLink in the Link group to which the user belongs.
The embodiment of the invention provides a server for balancing the load of a one-to-many network address by dialing, which comprises a memory, a processor and a network card; the memory is used for storing computer executable instructions; the processor is configured to execute computer-executable instructions to implement a method of load balancing for a dial-up one-to-many network address and a method of any of the same; the network card is used for actually receiving and processing network traffic.
The apparatus or module set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. For convenience of description, the above devices are described as being functionally divided into various modules, respectively. The functions of the various modules may be implemented in the same piece or pieces of software and/or hardware when implementing the present invention. Of course, a module that implements a certain function may be implemented by a plurality of sub-modules or a combination of sub-units.
The methods, apparatus or modules described in this invention may be implemented in computer readable program code means and the controller may be implemented in any suitable way, for example, the controller may take the form of a microprocessor or processor and a computer readable medium storing computer readable program code (e.g. software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (english: application Specific Integrated Circuit; abbreviated: ASIC), programmable logic controller and embedded microcontroller, examples of the controller including but not limited to the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller can be regarded as a hardware component, and means for implementing various functions included therein can also be regarded as a structure within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
From the above description of embodiments, it will be apparent to those skilled in the art that the present invention may be implemented in software plus necessary hardware. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product or may be embodied in the implementation of data migration. The computer software product may be stored on a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., comprising instructions for causing a computer device (which may be a personal computer, mobile terminal, server, or network device, etc.) to perform the methods described in the various embodiments or portions of the embodiments of the invention.
In this specification, each embodiment is described in a progressive manner, and the same or similar parts of each embodiment are referred to each other, and each embodiment is mainly described as a difference from other embodiments. All or portions of the present invention are operational with numerous general purpose or special purpose computer system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet devices, mobile communication terminals, multiprocessor systems, microprocessor-based systems, programmable electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the present invention; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced with equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (7)

1. A method for load balancing of a dial-up one-to-many network address, comprising:
distributing a plurality of uplinks into a plurality of uplink groups according to a plan, and respectively calculating the user load of each uplink group and the network load of each uplink in each uplink group;
acquiring a user online request, adding the user online request to an uplink group corresponding to the minimum user load, and distributing a group of ports for the user online request in the uplink group;
acquiring a new session established by the user, and acquiring a session link pair by using a link cache and an uplink set with smaller network load according to a target address of the new session;
and using the session link pair corresponding to the address and the port corresponding to the user to complete address conversion and original information recovery.
2. The method for balancing load of one-to-many network addresses by dialing according to claim 1, wherein said adding the user online request to the uplink group corresponding to the minimum user load specifically comprises:
maintaining the user load condition of each uplink group, dynamically increasing and decreasing the number of users of the uplink group when the users go on/off line, increasing and decreasing the number of uplink links when the uplinks are added and deleted to the uplink group, and calculating the user load according to the number of users and the number of the uplinks;
and adding the user online request to an uplink group corresponding to the minimum user load.
3. The method for load balancing of a dial-up one-to-many network address according to claim 1, wherein said allocating a set of ports for said user online request in said uplink group comprises:
when the user exists, a group of ports are statically allocated for the user;
and when the user does not exist, distributing a group of ports corresponding to the user according to the sequence number of the added user.
4. The method for load balancing of one-to-many network addresses by dialing instead of according to claim 1, wherein said obtaining a new session established by said user and obtaining a session link pair according to a destination address of said new session specifically comprises:
judging whether the target address of the new session exists in a cache session or not;
if yes, inquiring a buffer session link pair stored in the buffer session to obtain the session link pair;
and if not, circularly selecting one uplink in the uplink set of the smaller network load in the uplink group to obtain the session link pair.
5. The method for balancing load of one-to-many network addresses by dialing according to claim 4, wherein said cyclically selecting one of said uplinks from a set of uplinks for smaller network loads in said uplink group to obtain said session link pair comprises:
respectively counting the number of uplink packets and downlink packets of each uplink link, and counting the number of newly-built sessions;
weighting and calculating the network load of all the uplinks in the uplink group in each network load calculation period of the uplink group;
performing screening and sorting on the uplinks according to network loads by taking the uplink groups as units, and selecting the uplink set with smaller network loads;
and distributing the new session request of the user in the uplink set with smaller network load, and establishing a session link pair.
6. A system for load balancing of a one-to-many network address, applied to a server, comprising: the system comprises a system configuration component, an uplink management component, a user online and offline management component, a network load management component, a user session management component and a link buffer component;
the system configuration component is used for providing a user management interface, acquiring the number of the uplinks and the user scale information, and creating and distributing a key task structure of the system;
the uplink management component is configured to add the uplink to an uplink group and delete the uplink when the uplink fails;
the user online and offline management component is used for adding a user to an uplink group when the user is online and adding a port group for the user; simultaneously maintaining the uplink group and recording the total number of users in the uplink group and the total number of the uplink;
the network load management component is configured to maintain a plurality of uplinks in the uplink group, record the number of uplink data packets, the number of downlink data packets and the number of newly-built sessions of each uplink in a current time period, periodically refresh the network load of each uplink, and execute network load sorting screening in the uplink group to generate the uplink set of smaller network loads;
the user session management component is used for tracking the newly-built session and the duration of each user;
the link buffer component is used for recording the corresponding relation between the target address and the uplink.
7. The server for carrying out one-to-many network address load balancing is characterized by comprising a memory, a processor and a network card;
the memory is used for storing computer executable instructions;
the processor being configured to execute the computer-executable instructions to implement the method of any one of claims 1-6;
the network card is used for executing the receiving and transmitting instructions of the network packet so as to realize the receiving and transmitting operation of the network packet in the claims 1-6.
CN202311642156.5A 2023-12-04 2023-12-04 Method and system for load balancing of one-to-many network address by dialing instead Pending CN117527700A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311642156.5A CN117527700A (en) 2023-12-04 2023-12-04 Method and system for load balancing of one-to-many network address by dialing instead

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311642156.5A CN117527700A (en) 2023-12-04 2023-12-04 Method and system for load balancing of one-to-many network address by dialing instead

Publications (1)

Publication Number Publication Date
CN117527700A true CN117527700A (en) 2024-02-06

Family

ID=89747698

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311642156.5A Pending CN117527700A (en) 2023-12-04 2023-12-04 Method and system for load balancing of one-to-many network address by dialing instead

Country Status (1)

Country Link
CN (1) CN117527700A (en)

Similar Documents

Publication Publication Date Title
CN109218355B (en) Load balancing engine, client, distributed computing system and load balancing method
Lee et al. Load-balancing tactics in cloud
US10296392B2 (en) Implementing a multi-component service using plural hardware acceleration components
US20020107962A1 (en) Single chassis network endpoint system with network processor for load balancing
CN108881348B (en) Service quality control method and device and storage server
US20020133593A1 (en) Systems and methods for the deterministic management of information
JP6881575B2 (en) Resource allocation systems, management equipment, methods and programs
CN105264865A (en) Multipath routing in a distributed load balancer
CN103607424B (en) Server connection method and server system
CN108900626B (en) Data storage method, device and system in cloud environment
US20220318071A1 (en) Load balancing method and related device
JP2016051446A (en) Calculator system, calculator, and load dispersing method and program
CN115396377B (en) Method, device, equipment and storage medium for optimizing service quality of object storage
CN109144972A (en) A kind of method and back end of Data Migration
CN113821340A (en) Dynamic balancing method, system, terminal and storage medium of distributed system
CN114500462A (en) Virtual private cloud network address allocation method and device, electronic equipment and medium
CN116888579A (en) Distributed cache management
Hines et al. Distributed anemone: Transparent low-latency access to remote memory
CN112822062A (en) Management method for desktop cloud service platform
JP2013543169A (en) System including middleware machine environment
WO2023207189A1 (en) Load balancing method and system, computer storage medium, and electronic device
CN117527700A (en) Method and system for load balancing of one-to-many network address by dialing instead
CN214202379U (en) Distributed shared file system
Thaha et al. Data location aware scheduling for virtual Hadoop cluster deployment on private cloud computing environment
US20040064580A1 (en) Thread efficiency for a multi-threaded network processor

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination