Setting up a Tomcat Web Cluster
在每一台机器上安装Terracotta
生成boot jar
可能需要生成Boot jar。脚本文件: make-boot-jar.sh [-o /usr/local/terracotta-2.4.0/lib/dso-boot] -f /tmp/tc-config.xml
启动Terracotta Server
准备配置文件/tmp/tc-config.xml:
<!---->
<tc:tc-config xsi:schemalocation="&lt;a goog_ds_charindex=" href="http://www.terracotta.org/schema/terracotta-4.xsd">http://www.terracotta.org/schema/terracotta-4.xsd" xmlns:tc="
http://www.terracotta.org/config" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<!---->
<servers></servers>
<server host="%i" name="sample"></server>
<data></data>data/server-data
<logs></logs>logs/server-logs
<!---->
<clients></clients>
<logs></logs>logs/client-logs/%(webserver.log.name)
<modules></modules>
<module name="clustered-apache-struts-1.1" version="1.1.0"></module>
<application></application>
<dso></dso>
<!---->
<instrumented-classes></instrumented-classes>
<!---->
<include></include>
<class-expression></class-expression>*..*
<!---->
<exclude></exclude>org.apache.coyote..*
<exclude></exclude>org.apache.catalina..*
<exclude></exclude>org.apache.jasper..*
<exclude></exclude>org.apache.tomcat..*
<!---->
<web-applications></web-applications>
<web-application></web-application>Cart
<!----></tc:tc-config>
<roots></roots>
<root></root>
<field-name></field-name>demo.townsend.service.ProductCatalog.catalog
<root-name></root-name>ProductCatalog
WebSphere6.1中的设置:
...
<clients></clients>
<logs></logs>logs/client-logs/%(webserver.log.name)
<modules></modules>
<module name="clustered-apache-struts-1.1" version="1.1.0"></module>
<module name="clustered-websphere-6.1.0.7" version="1.0.0"></module>
...
<exclude></exclude>com.ibm..*
<exclude></exclude>org.eclipse..*
<exclude></exclude>com.ddtek..*
<exclude></exclude>tcl.lang..*
<exclude></exclude>org.omg..*
<exclude></exclude>sunlabs.brazil..*
<exclude></exclude>com.sun.mail..*
...
WebLogic8.1 中的设置:
...
<exclude></exclude>weblogic..*
<exclude></exclude>com.rsa..*
...
启动Tomcat Servers
start-tomcat-dso.sh:(可能运行前要export一些环境变量)
TERRACOTTA_SERVER=10.22.23.31
TC_CONFIG_PATH="${TERRACOTTA_SERVER}:9510"
. $TC_HOME/bin/dso-env.sh -q
export JAVA_OPTS="${TC_JAVA_OPTS}"
$CATALINA_HOME/bin/startup.sh
或者如下设置JAVA_OPTS环境变量,启动
在catalina.out log文件中应该要看到类似的信息,如下,说明TOMCAT启动时,Terracotta起作用;在Terracotta Server端如果打开/usr/local/terracotta-2.4.0/bin/admin.sh(AdminConsole)也会显示有App Server连上的信息:
Configure and Start the Load Balancer (实际用IBM EDGE)
In a production environment, you should use a production quality hardware or software load balancer. For testing purposes, Terracotta comes with a simple TCP proxy that may be used like a load balancer. You should not use this TCP proxy in a production environment.
Here's a sample script to start the TCP proxy:
Here's a version of the script with the terracotta installation directory and the web hosts filled in:
To run the TCP proxy, execute the script on the load balancer machine:
分享到:
相关推荐
其实terracotta集群tomcat这方面的资料也算不少了··但还是会很容易出现错误·· 希望我这个文档能帮助大家!
把这种集群间数据共享的机制应用在session同步上,相当于对tomcat第二种集群实现机制进行了优化,既避免了对数据库的依赖,又能达到负载均衡和灾难恢复的效果。在对比测试中,采用Terracotta搭建Tomcat集群,节点...
本文介绍如何配置Tomcat和Terracotta服务器将普通的Web应用部署到集群中,实现跨Tomcat节点的session复制,以达到负载均衡、提高系统吞吐量和灾难恢复的效果。
Terracotta实现基于Tomcat的Web应用集群
记载了terracotta如何与tomcat、jetty等服务器的集群,解释了tc-config.xml中各个配置的作用
使用terracotta实现session共享的证实实验
NULL 博文链接:https://dutianzhao.iteye.com/blog/2154040
NULL 博文链接:https://lihongchao87.iteye.com/blog/1727802
linux安装包terracotta-3.7.7.tar.gz,用于tomcat的session集群
java ehcache terracotta 集群, 分布式缓存配置
terracotta集群负载,是个好东西
本学习文档主要介绍了Terracotta基本原理和如何配置Tomcat和Terracotta服务器将普通的Web应用部署到集群中,实现跨Tomcat节点的session复制,以达到负载均衡、提高系统吞吐量和灾难恢复的效果。
Terracotta
terracotta-toolkit-1.3-runtime-3.2.0.jar 集群实现JAR
《基于Terracotta和Continuent的可扩展集群架构》 1) 关键应用架构待解决的集群问题 2) 基于JVM的透明数据复制技术 3) Oracle RAC 的开源数据库替代技术 演讲人:程勇 灰狐开源社区共同创始人
ehcache3集群相关资源,包括ehcache-clustered-3.10.0-kit、ehcache-3.10.0.jar、ehcache-clustered-3.10.0.jar、terracotta-3.7.7.tar.gz、ehcache-transactions-3.10.0.jar
Terracotta 3.2.1 英文文档
terracotta-ee-3.5.2破解版