#server 列表 worker.list = controller,tomcat1,tomcat2 #========tomcat1======== worker.tomcat1.port=8009 #注意这是 ajp1.3 端标语,在tomcat下server.xml配置,默认8009。不是tomcat的web端口 worker.tomcat1.host=localhost #tomcat的主机地点,如不为本机,请填写ip地点 worker.tomcat1.type=ajp13 worker.tomcat1.lbfactor = 1 #server的加权比重,值越高,分得的请求越多 #========tomcat2======== worker.tomcat2.port=9009 worker.tomcat2.host=localhost worker.tomcat2.type=ajp13 worker.tomcat2.lbfactor = 1 #========controller,负载均衡控制器======== worker.controller.type=lb worker.controller.balanced_workers=tomcat1,tomcat2 #指定分担请求的tomcat #session复制模式 worker.controller.sticky_session=false worker.controller.sticky_session_force=1 #sticky模式,即黏性会话模式 #worker.controller.sticky_session=1
,