现在记下关闭linux防火墙的方法:
1.即时生效,重启后失效
开启:service iptables start
关闭:service iptables stop
2 重启后生效
开启:chkconfig iptables on
关闭:chkconfig iptables off
关闭selinux;
keepalived+lvs实现负载均衡:
keepalived安装:http://www.2cto.com/kf/201309/244109.html
centos下实现keepalived+lvs实现:http://kerry.blog.51cto.com/172631/401253/
相关配置的解释:http://blog.csdn.net/zmj_88888888/article/details/8819105
http://www.aixchina.net/home/space.php?uid=20260&do=blog&id=39457
这一篇比较本质的说明了主备服务器和realserver*之间的关系:http://www.2cto.com/os/201405/298609.html
测试比较全面:http://beyondhdf.blog.51cto.com/229452/1331874
Mysql Keepalived 主备:http://www.verydemo.com/cm.jsp?c=29&u=mysqlkeepalived-zhu-bei
apache+tomcat实现负载均衡和tomcat集群实现session复制:大部分内容:http://snowolf.iteye.com/blog/743611
官方文档:http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html
补充一:
2). 负载比例分配
打开 balancer-manager 的界面,可以看到请求是平均分配的。 如果不想平均分配怎么办?给 BalancerMember 加上 loadfactor 参数即可,取值范围为1-100。比如你有三台服务器,负载分配比例为 7:2:1,只需这样设置:- ProxyRequests Off
- <Proxy balancer://mycluster>
- BalancerMember http://node-a.myserver.com:8080 loadfactor= 7
- BalancerMember http://node-b.myserver.com:8080 loadfactor= 2
- BalancerMember http://node-c.myserver.com:8080 loadfactor= 1
- </Proxy>
- ProxyPass / balancer://mycluster
- ProxyRequests Off
- <Proxy balancer://mycluster>
- BalancerMember http://node-a.myserver.com:8080 loadfactor=7
- BalancerMember http://node-b.myserver.com:8080 loadfactor=2
- BalancerMember http://node-c.myserver.com:8080 loadfactor=1
- </Proxy>
- ProxyPass / balancer://mycluster
- ProxyRequests Off
- <Proxy balancer://mycluster>
- BalancerMember http://node-a.myserver.com:8080 loadfactor= 7
- BalancerMember http://node-b.myserver.com:8080 loadfactor= 2
- BalancerMember http://node-c.myserver.com:8080 loadfactor= 1
- </Proxy>
- ProxyPass / balancer://mycluster
- ProxySet lbmethod=bytraffic
- ProxyRequests Off
- <Proxy balancer://mycluster>
- BalancerMember http://node-a.myserver.com:8080 loadfactor=7
- BalancerMember http://node-b.myserver.com:8080 loadfactor=2
- BalancerMember http://node-c.myserver.com:8080 loadfactor=1
- </Proxy>
- ProxyPass / balancer://mycluster
- ProxySet lbmethod=bytraffic
- ProxyRequests Off
- <Proxy balancer://mycluster>
- BalancerMember http://node-a.myserver.com:8080
- BalancerMember http://node-b.myserver.com:8080 status=+H
- </Proxy>
- ProxyPass / balancer://mycluster
- ProxyRequests Off
- <Proxy balancer://mycluster>
- BalancerMember http://node-a.myserver.com:8080
- BalancerMember http://node-b.myserver.com:8080 status=+H
- </Proxy>
- ProxyPass / balancer://mycluster
引用http://yangzb.iteye.com/blog/593433