`
realfire2007
  • 浏览: 3793 次
  • 性别: Icon_minigender_1
  • 来自: 北京
最近访客 更多访客>>
社区版块
存档分类
最新评论

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 <distributable/> element // 在weib.xml文件中必须添加 <distributable/>标签,告诉Tomcat我的应用要部署到集群环境中
  • If you are using mod_jk, make sure that jvmRoute attribute is set at your Engine <Engine name="Catalina" jvmRoute="node01" > 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=".*\.gif|.*\.js|.*\.jpeg|.*\.jpg|.*\.png|.*\.htm|.*\.html|.*\.css|.*\.txt",过滤掉静态内容Valve用于在节点向客户端响应前进行检测或进行某些操作,ReplicationValve就是用于检测当前的响应是否涉及Session数据的更新,如果是则启动Session拷贝操作,filter用于过滤请求,如客户端对图片,cssjs的请求就不会涉及Session -->

              <Valve className="org.apache.catalina.ha.tcp.ReplicationValve"  filter=""/> 

                    
分享到:
评论

相关推荐

    Aapche+Tomcat实现服务数据集群

    Aapche+Tomcat实现服务数据集群 Aapche+Tomcat实现服务数据集群是指通过Apache和Tomcat服务器来实现服务数据集群的方法。这种方法可以解决Tomcat在线访问量超过20-30人的问题,使得服务器可以承载更多的访问请求。 ...

    aapche2.2.4 tomcat6 mod_proxy 集群和负载平衡

    NULL 博文链接:https://changhaifeng.iteye.com/blog/800621

    PHP、Aapche、MySQL配置教程

    PHP则需下载与Apache相匹配的版本,这里是php-5.3.3-Win32-VC6-x86,注意避免下载错误的VC9版本或非线程安全(NTS)版本,因为这些可能不适用于Apache。 接下来是安装步骤。在你选择的安装位置(如D:\php)创建...

    Apache Commons 包的使用

    Apache Commons 模块,包括 Apache Commons Email、Apache Commons IO、Apache Commons Pool、Apache Commons DBCP、Apache Commons Dbutils 和 Apache Commons Collections,以及 Aapche HttpClient。 1. **Apache...

    Jason Dai:RTAP Using the Spark Stack

    we will present our efforts and experience on building real-time analytical processing framework with several large websites in China (e.g., Alibaba, Baidu iQiyi, Youku), leveraging the Aapche Spark ...

    python 解决Windows平台上路径有空格的问题

    例如:Aapche的安装路径为D:\Program Files\Apache Software Foundation\Apache2.2。 采集apache要读取配置文件D:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf 执行一些D:\Program Files\...

    apache stratos 4.1.0的samples

    开发者可以通过这些工具来交互式地管理他们的服务和租户,实现自动化部署和更新。 总之,Apache Stratos 4.1.0的samples提供了丰富的实践资源,涵盖了多租户管理、云基础设施集成、容器化应用、服务治理和自动化...

Global site tag (gtag.js) - Google Analytics