由于terracotta肩负着保存session的重任,如果一旦down掉,所有的用户session将会丢失,所以terracotta要做ha。
terracotta集群配置也非常简单
1, 创建一个tc-config.xml文件,如下
<?xml version="1.0" encoding="UTF-8"?>
<!-- All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved. -->
<tc:tc-config xsi:schemaLocation="http://www.terracotta.org/schema/terracotta-5.xsd"
xmlns:tc="http://www.terracotta.org/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<servers>
<!-- Sets where the Terracotta server can be found. Replace the value of host with the server's IP address. -->
<server host="10.192.33.93" name="Server1">
<data>%(user.home)/terracotta/server-data</data>
<logs>%(user.home)/terracotta/server-logs</logs>
</server>
<!-- If using a standby Terracotta server, also referred to as an ACTIVE-PASSIVE configuration, add the second server here. -->
<server host="10.192.33.94" name="Server2">
<data>%(user.home)/terracotta/server-data</data>
<logs>%(user.home)/terracotta/server-logs</logs>
</server>
<server host="192.168.1.100" name="Server3">
<data>%(user.home)/terracotta/server-data</data>
<logs>%(user.home)/terracotta/server-logs</logs>
</server>
<server host="192.168.1.101" name="Server4">
<data>%(user.home)/terracotta/server-data</data>
<logs>%(user.home)/terracotta/server-logs</logs>
</server>
<!-- If using more than one server, add an <ha> section. -->
<ha>
<mode>networked-active-passive</mode>
<networked-active-passive>
<election-time>5</election-time>
</networked-active-passive>
</ha>
</servers>
<!-- Sets where the generated client logs are saved on clients. -->
<clients>
<logs>%(user.home)/terracotta/client-logs</logs>
</clients>
</tc:tc-config>
2,加载配置文件,运行命令tim-get.sh upgrade <tc-config.xml-path>/tc-config.xml
3,启动TCserver需要增加 -n 参数
./start-tc-server.sh -n Server2 &
分享到:
相关推荐
Terracotta的基本原理是对于集群间共享的数据,当在一个节点发生变化的时候,Terracotta只把变化的部分发送给Terracotta服务器,然后由服务器把它转发给真正需要这个数据的节点。这样对网络的压力就非常小,各个节点...
记载了terracotta如何与tomcat、jetty等服务器的集群,解释了tc-config.xml中各个配置的作用
通过_Terracotta实现基于Tomcat的Web应用集群
其实terracotta集群tomcat这方面的资料也算不少了··但还是会很容易出现错误·· 希望我这个文档能帮助大家!
java ehcache terracotta 集群, 分布式缓存配置
Terracotta实现基于Tomcat的Web应用集群
terracotta集群负载,是个好东西
Terracotta
NULL 博文链接:https://lihongchao87.iteye.com/blog/1727802
《基于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-toolkit-1.3-runtime-3.2.0.jar 集群实现JAR
terracotta-ee-3.5.2破解版
linux安装包terracotta-3.7.7.tar.gz,用于tomcat的session集群
terracotta license.key ,
ehcache的terracotta方案的比较.docx
terracotta-eclipse-plugin-3.7.7-2013-08-19_16-03-48.tar(terracotta的Eclipse插件) 发现官网挺卡的,有时候下不了,先传上来吧,供国内用户下载,这个算最新的吧。2014-02-17下载的。
2014年05月12日最新版本, Windows版本 terracotta-ee-4.1.2.jar,terracotta-license.key