理解Sticky sessions:
基于mod_proxy实现负载均衡
在httpd.conf的全局配置中配置如下内容:
ProxyRequests Off
BalancerMember ajp://172.16.100.1:8009 loadfactor=10 route=TomcatA
BalancerMember ajp://172.16.100.2:8009 loadfactor=10 route=TomcatB
ServerAdmin admin@magedu.com
ServerName www.magedu.com
ProxyPass / balancer://lbcluster1/ stickysession=jsessionid
ProxyPassReverse / balancer://lbcluster1/
BalancerMember http://www1.magedu.com:8080 loadfactor=1
BalancerMember http://www2.magedu.com:8080 loadfactor=2
ProxySet lbmethod=bytraffic
Tomcat基于内存复制的集群
以上内容定义在Engine容器中,则表示对所有主机均启动用集群功能。如果定义在某Host中,则表示仅对此主机启用集群功能。
Serves as the container element for all of the clustering configuration tags.
Specifies a clustered session manager implementation for a node to use.
Configures the group communication “channel” implementation usedby the cluster.
Configures how the cluster members (nodes) find each other and how they keep track of which nodes are up and running.
Specifies andconfigures the implementation of the code that receives cluster replication messages. The Receiver receives cluster messages that were sent by another node’s Sender.
Specifies and configures the implementation of the code that sends replication messages out to other cluster members (nodes).
Specifies the pluggable transport implementation that will be usedby a Sender (but not a Receiver).
Code modules that can act on or modify messages leaving the Sender, or entering the Receiver, or both.
Regular Tomcat Valve implementations that can modify requests and/or responses.
Configures the intended recipient code modules of cluster messages, such as session replication messages. ClusterListeners are similar to Interceptors, but they’re meant to be the final destination for certain types of cluster messages, whereas Interceptors are listening into the communication between the sender and the Receiver’s ClusterListener, and may intervene.
用于mod_proxy状态信息的输出
SetHandler balancer-manager
Order Deny,Allow
Allow from all
如果使用虚拟主机实现反向代理,如何在对应的虚拟主机上完成状态信息输出:
ProxyRequests Off
BalancerMember ajp://192.168.10.8:8009 loadfactor=1
BalancerMember ajp://192.168.10.9:8009 loadfactor=1
ProxySet lbmethod=bytraffic
ServerName localhost
ProxyVia On
ProxyPass / balancer://lbcluster1/ stickysession=JSESSIONID|jsessionid nofailover=On
ProxyPassReverse / balancer://lbcluster1/
SetHandler balancer-manager
Proxypass !
Require all granted
Require all granted
Require all granted
此外,所有启用集群功能的web应用程序,其web.xml中都须添加才能实现集群功能。如果某web应用程序没有自己的web.xml,也可以通过复制默认的web.xml至其WEB-INF目录中实现。
商业版:
◇ Sun GlassFish Enterprise Server
◇ Sun Java System Web Server
◇ JBoss Enterprise Application Platform
◇ WebLogic Application Server
◇ Caucho's Resin Server
◇ WebSphere Application Server
◇ NetWeaver
非商业版:
◇ Apache Tomcat
◇ Apache Geronimo
◇ GlassFish
◇ JBoss Application Server
◇ Jetty
◇ Tiny Java Web Server
◇ Eclipse Virgo
静态方法:
rr,wrr, sh, dh
动态方法:
lc, wlc, sed, nq, lblc, lblcr
sed: (Active+1)/weight
wlc: (Active*256+Inactive)/weight
HTTP: ab, httpload, siege
TSung
MySQL: sysbench
GNUPlot
简历:
运维工程师,系统工程师:
技术:
技术能力:
精通
理解
掌握
了解
项目经验:
项目介绍,自己担任角色,项目成果
职业素养:
语言运用能力
团队合作能力
学习能力
英语阅读能力
人际交往能力
www.51job.com
www.zhilian.com
www.cjol.com
个人信息:
姓名、年龄、性别、学历、专业、联系方式、电子邮件、个人博客
项目经验
专业技能
培训经历
自我评价:
40, 57
电视,投影仪
包子铺:
10W --> 5W --> 1W --> 8000 --> 5000 --> 500
1、包包子师傅
1、会包包子;
2、本科学历;条件优秀者,也可以放宽此限制;
3、3年及以上工作经验;
4、会和面,能调馅优先;
5、能快速辨别各种调料优先;
6、要求能写出面粉分子式,了解