标签类目:lvs

负载均衡软件比较(HA/LVS/Nginx)

分类:Performents分类:Lvs/HaNginx的优点:
性能好,可以负载超过1万的并发
功能多,除了负载均衡,还能作Web服务器,而且可以通过Geo模块来实现流量分配
社区活跃,第三方补丁和模块很多
支持gzip proxy

缺点:
不支持session保持
对后端realserver的健康检查功能效果不好。而且只支持通过端口来检测,不支持通过url来检测
nginx对big request header的支持不是很好,如果client_header_buffer_size设置的比较小,就会返回400bad request页面。

继续阅读 »

LVS DR模式修改超时时间

分类:Lvs/Ha缺省的FIN_WAIT超时是120秒。如果你的服务都是非常短的连接,可以考虑减少FIN_WAIT的超时时间,例如60秒或者30秒。

# ipvsadm -Lcn |awk '{print $3}'|sort  |uniq -c |sort -rn
    548 FIN_WAIT
    456 NONE
     80 ESTABLISHED
      9 SYN_RECV
      2 CLOSE
      1 state
      1 entries

TCP状态为NONE的是持久性模板,它是记录来自同一IP地址的访问调度到同一服务器。
TCP状态为CLOSE的是已关闭连接。

继续阅读 »

集群LVS的十种调度算法

分类:Lvs/Ha1. 大锅饭调度(Round-Robin Scheduling RR)
rr – 纯轮询方式,比较垃圾。把每项请求按顺序在真正服务器中分派。

2. 带权重的大锅饭调度(Weighted Round-Robin Scheduling WRR)
wrr -带权重轮询方式。把每项请求按顺序在真正服务器中循环分派,但是给能力较大的服务器分派较多的作业。

3. 谁不干活就给谁分配(Least-Connection LC)
lc – 根据最小连接数分派

继续阅读 »

Setting Up A High-Availability Load Balancer (With Failover and Session Support) With HAProxy/Heartbeat On Debian Etch

分类:Lvs/Ha分类:Debian分类:ApacheThis article explains how to set up a two-node load balancer in an active/passive configuration with HAProxy and heartbeat on Debian Etch. The load balancer sits between the user and two (or more) backend Apache web servers that hold the same content. Not only does the load balancer distribute the requests to the two backend Apache servers, it also checks the health of the backend servers. If one of them is down, all requests will automatically be redirected to the remaining backend server. In addition to that, the two load balancer nodes monitor each other using heartbeat, and if the master fails, the slave becomes the master, which means the users will not notice any disruption of the service. HAProxy is session-aware, which means you can use it with any web application that makes use of sessions (such as forums, shopping carts, etc.). 继续阅读 »

Linux集群的安装与并行计算

分类:Lvs/Ha1.linux安装
安装过程就不多说了。需要注意的是安装时,如果机群不与外界联网则可以不考虑安全
方面的因素而把rsh选为可信赖的服务,注意安装相应的软件包;如果还要与外界保持联
网,出于安全需要应把ssh选为可信赖的服务。安装以后,应该保证各节点之间能够用s
sh相互登录。每个节点的sshd都应该能正常提供服务。主机名:node1…noden (我所构
建的系统n=2)
2.创建NFS服务
在服务器节点public目录下建立mpi目录,并将其配置成NFS服务器,在/etc/exports文
件中加入一行:
/public/mpi  node1(rw)  node2(rw)
在客户端节点的/etc/fstab文件中增加一行:
sever :/pubilc/mpi  nfs  rw , bg , soft  0 0
将/public/mpi这个目录从服务器节点输出,并装载在各客户端,从而便于在各节点间分
发任务
继续阅读 »

2008-02-03Lvs/Ha

没有评论
639

返回顶部