The load balance distribution method of Intrusion Detection based on host pressure
Technical field
The present invention relates to the load balancing distributors of a kind of load balance distribution method, especially larger scale data acquisition
Method.
Background technique
The reliability of system will lean on the Technical Architecture of system, any one node is single-point, can all become high availability
Bottleneck needs support Load Balance Design, supports linear expansion, and traditional load-balancing technique mostly uses greatly random distribution, power
The fixed policies such as reclassification, the distribution of Smallest connection number cause to be easy to happen a few overloads in the load distribution of server
Situation.
Summary of the invention
The technical problem to be solved in the present invention and the technical assignment of proposition are to be improved and improved to prior art,
The load balance distribution method of Intrusion Detection based on host pressure is provided, to achieve the purpose that load balancing.For this purpose, the present invention takes following skill
Art scheme.
The load balance distribution method of Intrusion Detection based on host pressure, it is characterised in that the following steps are included:
1) weight is set according to the hardware configuration situation of each gateway server, number of links pressure can be born by net by maximum
Close server stepping;
2) weight information of load balancer maintenance gateway server list and each gateway server;
3) after load balancer receives terminal connection request, according to gateway server weight and current each gateway server chain
Number amount determines distribution path, and updates the number of links of current each gateway server;Load balancer timing passes through each gateway
Monitoring port obtains the current number of links of gateway server, amendment local record;
4) load balancer is to gateway server one connection of every distribution, by the current ink quantitative measure of gateway server
Device adds 1;
5) when the service of a gateway server is abnormal, then it is deleted from load balancer server list,
Load balancer by the link of former abnormal gateway server according to the link stress equilibrium assignment of currently remaining gateway server extremely
On gateway server;After the gateway server restores to service, adds again, redistribute its chain again by load balancer
Road;
6) if the load of certain gateway server is more than preset threshold values, the weight of the gateway server is set as zero,
Indicate that new connection is no longer assigned on the gateway server by load balancer.The hardware configuration considered when setting weight is main
For machine memory, CPU etc..The health status and pressure of load balancer periodic monitor gateway, by configure corresponding weight come
Distribution connection, is monitored by the pressure to gateway server, takes distribution policy appropriate based on each gateway current pressure,
A few gateway servers overload can effectively be avoided and generation the case where generation system performance bottleneck.
As further improving and supplementing to above-mentioned technical proposal, the invention also includes following additional technical features.
Load balancer can bear the number of links that number of links setting has 10%-30% redundancy according to gateway server maximum
Measure threshold values;Load balancer has the gateway node quantity of 10%-30% redundancy according to the setting of on-site terminal quantity, and gateway node is dynamic
State increases or decreases.
Gateway server can bear number of links pressure point third gear: A class, B class, C class by maximum.By gateway server point
Shelves, are conducive to the management to gateway server.
The maximum link quantity that wherein A class can be born is 80,000;The maximum link quantity that B class can be born is that 160,000, C class can
The maximum link quantity of receiving is 200,000.
The utility model has the advantages that the technical program, which is based on each gateway current pressure, takes distribution policy appropriate, certain can be effectively avoided
Several gateway servers overload and the case where generation system performance bottleneck, occurs, then avoid accounting for because of NM server memory source
The case where terminal connection request caused by occupying high overload with excessively high, cpu resource and message transmission can not timely respond to hair
It is raw, to improve the reliability of gateway server work, stability.
Detailed description of the invention
Fig. 1 is the principle of the present invention structure chart.
Specific embodiment
Technical solution of the present invention is described in further detail below in conjunction with Figure of description.
As shown in Figure 1, gateway server realizes the load-balancing function to terminal links maintenance by load balancer,
Terminal links are distributed to gateway server by rule by load balancer, and gateway server can dynamically increase and decrease section
Point.The health status and pressure of load balancer periodic monitor gateway server distribute connection by configuring corresponding weight,
Itself the following steps are included:
1) weight is set according to the hardware configuration situation of each gateway server, number of links pressure can be born by net by maximum
It closes server and is divided into third gear: A class (80,000), B class (160,000), C class (200,000);
2) weight information of gateway server list and each gateway server is safeguarded in load balancer;
3) after load balancer receives terminal connection request, according to gateway server weight and current each gateway server chain
Number amount determines distribution path, and updates the number of links of current each gateway server;Load balancer can periodically pass through each net
It closes monitoring server port and obtains the current number of links of gateway server, amendment local record;
4) load balancer is to gateway server one connection of every distribution, by the current ink quantitative measure of gateway server
Device adds 1, and can bear number of links by gateway server maximum and keep certain proportion redundancy;Defaulting redundancy is 20%, can also basis
Gateway server total quantity and maximum can bear the adjusting of link total quantity situation;Since a terminal needs a link, gateway
The configuration of server is also required to keep certain redundancy according to on-site terminal quantity, and gateway server node can dynamically increase;
5) when the service of certain gateway server is abnormal, then it is deleted from load balancer server list,
Load balancer is by the link of former abnormal server according to the link stress equilibrium assignment of current each gateway server to each gateway
On server;After the gateway server restores service, adds again, link is redistributed by load balancer again;
6) if the load of certain gateway server is more than preset threshold values, the weight of the gateway server is set as zero,
Indicate that new connection is no longer assigned on the gateway server by load balancer.
The load balance distribution method of Intrusion Detection based on host pressure shown in figure 1 above is specific embodiments of the present invention,
Substantive distinguishing features of the present invention and progress are embodied, shape can be carried out to it under the inspiration of the present invention using needs according to actual
The equivalent modifications of shape, structure etc., the column in the protection scope of this programme.