Aapche + Tomcat实现集群的注意事项

阅读更多

  • All your session attributes must implement java.io.Serializable // 所有的session属性必须实现Serializable 接口,意思是说通过session.setAttribute()方法保存到session中的对象必须实现Serializable接口否则在调用session.setAttribute()方法时会出现异常。
  • Make sure your web.xml has the element // 在weib.xml文件中必须添加 标签,告诉Tomcat我的应用要部署到集群环境中
  • If you are using mod_jk, make sure that jvmRoute attribute is set at your Engine and that the jvmRoute attribute value matches your worker name in workers.properties,注意:如果tomcat的ajp端口为8009那么该tomcat的engine的jvmRoute的值要与workers.properties中相对应的ajp端口的worker一致
  • Make sure that all nodes have the same time and sync with NTP service
  • Make sure that your loadbalancer is configured for sticky session mode.
  •            filter=""/> 

                    

你可能感兴趣的:(apache)