Load balancing distribution method based on main frame pressure
Technical field
The present invention relates to a kind of load balancing distribution method, the load balancing distribution method that especially large-scale data gathers.
Background technology
The reliability of system will be leaned on the Technical Architecture of system, any one node is single-point, capital becomes the bottleneck of high availability, need holding load Equalization Design, support linear expansion, traditional load-balancing technique adopts the fixed policy such as random distribution, weight classification, minimum linking number distribution mostly, causes dividing the situation of mixing a few overloads of easy generation in the load of server.
Summary of the invention
The technical assignment of the technical problem to be solved in the present invention and proposition is that prior art scheme is improved and improved, and provides the distribution method of the load balancing based on main frame pressure, to reach the object of load balancing.For this reason, the present invention takes following technical scheme.
Load balancing distribution method based on main frame pressure, is characterized in that comprising the following steps:
1) according to the hardware configuration situation of each gateway server, set weight, by maximum, can bear number of links pressure by gateway server stepping;
2) load equalizer is safeguarded the weight information of gateway server list and each gateway server;
3) load equalizer is received after terminal connection request, determines distribution path, and upgrade the number of links of current each gateway server according to gateway server weight and current each gateway server number of links; Load equalizer regularly obtains the current number of links of gateway server by each gateway monitoring port, revises local record;
4) load equalizer, to connection of the every distribution of gateway server, adds 1 by the current number of links meter of gateway server;
5) when the service of a gateway server occurs when abnormal, it to be deleted from load equalizer server list, load equalizer is dispensed to the link of former abnormal gateway server on gateway server according to the link stress equilibrium of current all the other gateway servers; After this gateway server Resume service, again add, by load equalizer, again redistribute its link;
6) if the load of certain gateway server surpasses default threshold values, the weight of this gateway server is made as to zero, represent that load equalizer is no longer assigned to new connection on this gateway server.The hardware configuration of considering while setting weight is mainly machine internal memory, CPU etc.Health status and the pressure of load equalizer periodic monitor gateway, by configuring corresponding weight, distribute connection, by the pressure to gateway server, monitor, based on each gateway current pressure, take suitable distribution policy, can effectively avoid a few gateway server overloads and the situation generation of generation systematic function bottleneck.
As the further of technique scheme improved and supplemented, the present invention also comprises following additional technical feature.
Load equalizer can bear number of links according to gateway server maximum and set the number of links threshold values with 10%-30% redundancy; Load equalizer is set the gateway node quantity with 10%-30% redundancy according to on-site terminal quantity, gateway node dynamically increases or reduces.
Gateway server can bear number of links pressure minute third gear by maximum: category-A, category-B, C class.By gateway server stepping, be conducive to the management to gateway server.
The maximum link quantity that wherein category-A can bear is 80,000; The maximum link quantity that the maximum link quantity that category-B can bear is 160,000, C class can be born is 200,000.
Beneficial effect: the technical program is taked suitable distribution policy based on each gateway current pressure, the situation generation that can effectively avoid a few gateway server overloads and produce systematic function bottleneck, then avoid taking terminal connection request that high overload causes and message and sending the situation that cannot respond in time and occur because NM server memory source takies too high, cpu resource, thereby improve reliability, the stability of gateway server work.
Accompanying drawing explanation
Fig. 1 is principle assumption diagram of the present invention.
Embodiment
Below in conjunction with Figure of description, technical scheme of the present invention is described in further detail.
As shown in Figure 1, gateway server is realized the load-balancing function that terminal links is safeguarded by load equalizer, and terminal links is distributed to gateway server by load equalizer by rule, and gateway server can dynamically increase and reduce node.Health status and the pressure of load equalizer periodic monitor gateway server, distribute connection by configuring corresponding weight, and it comprises the following steps:
1) according to the hardware configuration situation of each gateway server, set weight, by maximum, can bear number of links pressure gateway server is divided into third gear: category-A (80,000), category-B (160,000), C class (200,000);
2) in load equalizer, safeguard the weight information of gateway server list and each gateway server;
3) load equalizer is received after terminal connection request, determines distribution path, and upgrade the number of links of current each gateway server according to gateway server weight and current each gateway server number of links; Load equalizer can regularly obtain the current number of links of gateway server by each gateway server monitoring port, revises local record;
4) load equalizer, to connection of the every distribution of gateway server, adds 1 by the current number of links meter of gateway server, and can bear number of links maintenance certain proportion redundancy by gateway server maximum; Acquiescence redundancy is 20%, also can bear the adjusting of link total quantity situation according to gateway server total quantity and maximum; Because a station terminal needs a link, the configuration of gateway server also needs 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 occurs when abnormal, it to be deleted from load equalizer server list, load equalizer is dispensed to the link of former abnormal server on each gateway server according to the link stress equilibrium of current each gateway server; After this gateway server Resume service, again add, by load equalizer, again redistribute link;
6) if the load of certain gateway server surpasses default threshold values, the weight of this gateway server is made as to zero, represent that load equalizer is no longer assigned to new connection on this gateway server.
The load balancing distribution method based on main frame pressure shown in above Fig. 1 is specific embodiments of the invention; substantive distinguishing features of the present invention and progress have been embodied; can be according to actual use needs; under enlightenment of the present invention; it is carried out to the equivalent modifications of the aspects such as shape, structure, all at the row of the protection range of this programme.