Home > OS >  The comparison of the LVS and nginx load balancing function
The comparison of the LVS and nginx load balancing function

Time:10-25

A, Ivs advantage:

1, strong ability to resist load, because the logic of Ivs works is very simple, and work in the network layer 4 only do request distribution, no traffic, and so on the efficiency of basic don't need too much to consider, in the my hand Ivs, had only one - time problem: in concurrent supreme equalizer within a short period of time appear lost package phenomenon, according to the analysis for the network problems, namely, the bearing capacity of the network adapter or linux2.4 kernel has to the limit, memory and CPU aspects basic consumption,

2, the configuration is low, this is usually a big disadvantage, but it is also a big advantage, because there is no too much configurable option, so in addition to increase or decrease in the server, don't need to touch it frequently, greatly reducing the chance of human error, 3, stable work, because of its ability to resist load itself is

Is strong, so high stability is also a natural, have all sorts of | vs other complete hot standby scheme of two, so - what's the problem, don't worry about equalizer itself can node failure, Ivs automatically, so the overall system is very stable,

4, no flow, has been mentioned above, Ivs only distribute the requests, and traffic is not itself out from it, so that it can be used to do some line shunt, no traffic at the same time also to preserve the equalizer I0 performance is not affected by the heavy traffic,

5, basic application can support all _, because Ivs. Work in the 4 layers, so it can do load balancing for almost all applications, including HTTP, database, chat rooms, etc., :

Another: Ivs is not completely tell node failure, such as under the allocation way of WLC, cluster has a node without VIP, can make the whole cluster cannot use, then use the WRR allocation will lose a machine, the present problems in further tests, so, with Ivs also have to be careful to burn a lot,

Second, nginx and Ivs compared the results

1, nginx work in the network layer 7, so it can be done for HTTP application itself distribution strategy, such as for the domain name, directory structure, etc., by contrast Ivs does not have such function, so the nginx this situation is far more than available Ivs alone; But nginx useful these features make it adjustable degrees higher than Ivs, so often want to touch to touch, by article 2 advantages of vs look, touch, will have more human problems risk,

2, nginx dependence on network is lesser, theory. As long as ping make sense, on the web access is normal, can even make sense nginx, nginx can also distinguish between inner and outer net at the same time, if is having both inside and outside network node, is equivalent to single machine has the backup line; Ivs is dependent on the network environment, and now the server within the same network segment and Ivs shunt with a direct, the effect is can be guaranteed, and note that Ivs need to apply to the host at least one more IP to do the Visual IP, seems to be not use own IP for the VIP, must complete the LVS administrator, do follow up learning a lot of knowledge about network communication, it is no longer an HTTP so simple,
  • Related