0

ZK的负载均衡

asked 2010-11-19 00:55:31 +0800

Seekey gravatar image Seekey
51 1

请教一下,我在apache2.2.15上配置负载均衡,普通的JSP可以在两个Tomcat中共享Session,但ZK的程序会Timeout,这是为什么呢?
以下为Apache的配置:

ProxyRequests Off
<proxy balancer://cluster>
    BalancerMember ajp://127.0.0.1:8009 loadfactor=1 route=s1 smax=5 max=20 ttl=120 retry=300 timeout=15
    BalancerMember ajp://127.0.0.1:8109 loadfactor=1 route=s2 smax=5 max=20 ttl=120 retry=300 timeout=15
    ProxySet lbmethod=bytraffic
</proxy>

<VirtualHost *:80>
    ServerAdmin ***@*******.com
    ServerName localhost
    ServerAlias localhost
    ProxyPass / balancer://cluster stickysession=JSESSIONID|jsessionid nofailover=On
    ProxyPassReverse / balancer://cluster
    ErrorLog "logs/project-err.log"
    CustomLog "logs/project-access.log" common
</VirtualHost>

在zk.xml中增加了以下配置:

<system-config>
	<ui-factory-class>org.zkoss.zk.ui.http.SerializableUiFactory</ui-factory-class>
</system-config>

delete flag offensive retag edit

1 Reply

Sort by » oldest newest

answered 2011-05-01 22:25:46 +0800

RyanWu gravatar image RyanWu
533 2
about.me/flyworld

Check http://books.zkoss.org/wiki/ZK_Developer%27s_Reference/Clustering

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-11-19 00:55:31 +0800

Seen: 1,058 times

Last updated: May 01 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More