关于使用tomcat/jboss开源软件进行cluster的方案讨论

03-02-20 banq

作者发现tomcat对Http session的cluster并不能令他满意,他在征询其它人的意见,请看这个讨论。

http://www.javalobby.org/thread.jsp?forum=61&thread=6874

banq
2003-02-20 17:41

这段cluster方法很有启发:

You have 3 clusters, with 3 nodes each:

Group 1: 1, 2, 3 -> DNS Name: cluster1.yourdomain.com

Group 2: 4, 5, 6 -> DNS Name: cluster2.yourdomain.com

Group 3: 7, 8 9 -> DNS Name: cluster3.yourdomain.com

1. Brownser points to www.yourdomain.com

2. Load balancer picks a machine 1-9 to load balance on. Let's say the LB picks Node 1

3. Node 1 receives the HTTP request

4. Node 1 knows it belongs to Group 1. It finds that the HttpRequest is routed to www.yourdomain.com by looking into the HTTP request. It re-routes the HTTP request by using a simple HTTP redirect to http://cluster1.yourdomain.com

5. Browser is redirected to http://cluster1.yourdomain.com and reposts

6. LB notices that the DNS name is cluster1.yourdomain.com and LB's to a node only in cluster1.

7. The browser continues browsing website via the cluster1.yourdomain.com base url.

IMHO, although I'm biased, the Tomcat clustering done by Thomas Peuss that comes with JBoss is the best solution and has a lot of different configuration settings and optimizations you can do. Check out the JBoss Clustering Doco for more information.

banq
2003-02-20 18:20

看完这段讨论,各路高手都出来了:Javagroups的开发元老;Jboss的web整合开发者;tangosol公司的(这家伙只要网上有谈集群或性能的都有他自己产品的自吹自雷,可惜不是开源的,jive 3.0也用了他的产品);等,好像没有对sticky 的http session提出很好的解决办法。好像建议将session放到EJB中做是最好的。