LVS/HAproxy/Nginx对比

LVS features: 
     1, Anti load ability, is 4 in the network layer only for distribution purposes, no flow, the characteristics of the load balancing software in the strongest performance;
     2, Configuration is relatively low, this is a drawback is an advantage, because not too many configuration of things, so do not need too much contact, greatly reducing the chance of human error;
     3, Stable work, has its own hot complete preparation protocols, such as LVS+Keepalived and LVS+Heartbeat, but we in the implementation of the project the most used or LVS/DR+Keepalived;
     4, No flow, the performance is not equalizer IO affected large flow;
     5, The application range is wide, can be load balanced for all applications;
     6, The software itself does not support the regular treatment, can not be forthcoming separation, this is a pity; in fact, many sites now in this area have strong demand, this is the advantages of Nginx/HAProxy+Keepalived. 
     7, If the web application is large enough, the implementation of LVS/DR+Keepalived will be more complex, a Windows Server application machine especially behind the words, if the implementation and configuration and maintenance process is more complex, relatively speaking, Nginx/HAProxy+Keepalived is much easier. 

LVS特性:

 1.抗负荷能力强,LVS是工作在4层(网络层)进用于做分布式的软件,是一款处理负载均衡的强大软件.

   2.可修改的配置文件较少,这既是缺点也是优点,因为不需要修改较多的配置文件,所以减少与配置文件打交道,避免造成人为错误.

 3.高可用性,拥有自己的热备软件组合,例如LVS+Keepalievd,LVS+Heartbreat,但是我们用的较多的是LVS/DR+keepalievd组合

 4.不产生流量,不受IO均衡大流量的影响.LVS/DR和LVS/TUN响应客户端时都不走代理服务器

    5.应用软件兼容性强,几乎可以为所有的应用软件做负载均衡

  6.LVS自身不带健康检查,不能用来监测服务器宕机,这是一个不足.事实上,现在许多网站非常需要这个功能,这就是为什么 Nginx/HAproxy+Keepalievd吃香的原因

     7.如果web应用软件非常多,LVS/DR+Keepalived组合将会使配置文件变得非常复杂,Windows应用软件的匹配将会变的容易很多,如果应用接口,配置文件和运行进程变得复杂了,使用Nginx/HAProxy+Keepalived将更容易使用.
 
Nginx features: 
   1, Work in a network of 7 layer, can do some diversion strategies for HTTP applications, such as domain name, directory structure, regular rules it more powerful than HAProxy and flexible, this is also the many friends like it's one reason;
     2, Nginx rely on the network is very small, the theory is able to Ping can load function, this is the advantage of it;
     3, Nginx installation and configuration is relatively simple, the test is more convenient;
     4, You can also bear the load pressure and high stability, the general can support concurrent over tens of thousands of times;     
     5, Nginx can be detected by fault internal port server according to the server, such as processing Webpage status code returned, timeout, and will put the return error request to re submit to another node, but the drawback is that does not support the URL to detect;
     6, The Nginx can only support HTTP and Email, so that in the range above a lot of small, it's vulnerable;
     7, Nginx is not only a good load balancer / reverse proxy software, it is also a powerful function of Web application server. LNMP is now very popular web framework, is the most popular LAMP framework and previous chamber resistance force, in high traffic environment also have very good effect. 
     8, Nginx now as a Web reverse speed cache becomes more mature, many of my friends are in the production environment is put into production, but also reflect the good results, faster than the traditional Squid server, interested friends can consider to use it as a reverse proxy accelerator. 

Nginx特性:

    1.工作在7层,可以为基于HTTP协议的软件做一些转移策略,例如域名,文件目录,正则功能比HAProxy要灵活很多,这也是很多人喜欢它的原因.

    2.Nginx不怎么依赖与网络,理论上允许Ping工具,这是它的优势之一

 3.Nginx安装和配置非常简单,测试也非常方便

 4.使用Nginx也可以承受较大压力和提供稳定的服务,理论上可以承受同一时间1w的访问量

 5.Nginx可以通过内部端口服务来检测状态,例如Web网页运行时的状态,超时时间,Nginx将错误提交到另一个节点并且重新提交来检测来验证错误可靠性,不足的是不支持URL检测.

 6.Nginx仅支持HTTP和Email,支持范围比较小

 7.Nginx并不是一个擅于做负载均衡或反向代理的软件,而是一个立足于Web应用的软件.LNMP是当前较为流行的框架,是LAMP框架的一个加强版,在较高的网路拥堵的情况下也能工作的非常好

 8.Nginx现在作为Web代理而言在缓存速度上已经变得愈发成熟,有越来越多的人原意将自己的项目跑在Nginx上,它比传统的Squid服务器要快的多,有些人还将其用作反向代理服务器来做加速使用
 
HAProxy features: 
     1, HAProxy is to support the virtual host, before a friend said this does not support the virtual host, I hereby correction. 
     2, Some drawbacks to complement the Nginx such as Session, Cookie boot etc.
     3, Support URL back-end server detection problem detection will have a very good help.     
     4, It is the same as with LVS, itself only a load balancing software; only from the efficiency of speaking HAProxy more than Nginx with load balancing speed is more outstanding, in the concurrent processing is better than Nginx. 
     5, HAProxy can read the Mysql load balancing, MySQL node to the back-end testing and load balance, but in the number of back-end MySQL slaves more than 10 Taiwan performance than LVS, so I recommend to you HAProxy+Keepalived. 
     6, The HAProxy algorithm is also more and more specific, there are 8: 
          ①roundrobin, Says simple polling, this not much said, this is the basic have load balancing;
          ②static-rr, According to the weight, the recommendations concern;
          ③leastconn, Said the least connection to processing, the recommendations concern;
          ④ource, According to the request of the source IP, with the IP_hash mechanism is similar to that of Nginx, we use it as a method to solve the session problem, the recommendations concern;
          ⑤ri, According to the request of URI;
          ⑥rl_param, According to the URl parameters of the request'balance url_param' requires an URL parameter name;
          ⑦hdr(name), According to HTTP request header to lock each HTTP request;
          ⑧rdp-cookie(name), According to the cookie (name) to lock and hash each TCP request. 

HAProxy 特性:

  1.HAProxy支持虚拟服务器,如果有朋友说它不支持虚拟服务器,我只能表示担心

  2.与Nginx相比,HAProxy在处理Session和Cookie方面有些乏力

  3.支持URL后端服务器检测

  4.与LVS一样,HAProxy仅仅是一个做负载均衡的软件,负载均衡的速度和处理高并发的问题要比Nginx杰出.

  5.HAProxy可以阅读Mysql(数据库集群)的负载均衡信息,支持在后端测试Mysql节点之间的负载均衡问题,在Mysql服务器大于10台时性能要优于LVS,所以我推荐使用HAProxy+Keepalived框架

  6.HAProxy的算法是非常强大的,有8点特性:

          ①roundrobin轮叫, 最基本的负载均衡算法
          ②static-rr加权轮叫, 根据权重, 推荐连接;
          ③leastconn最小连接数,根据服务器当前最小连接数选择 
          ④ource, 根据ip的请求选择,与Nginx相似,采用Hash匹配来处理Session问题
          ⑤ri, 根据URI选择请求;
          ⑥rl_param, According to the URl parameters of the request'balance url_param' requires an URL parameter name;
          ⑦hdr(name),根据HTTP的头部锁定每个HTTP请求
          ⑧rdp-cookie(name), 根据Cookie值锁定每个FTP请求   

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值