`
sslaowan
  • 浏览: 379721 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

【译】Terracotta Deployment Guide

 
阅读更多

 

 

Sizing The Terracotta Client Hardware

Your existing application server hardware should be adequate to serve as Terracotta clustered JVM clients. Your workload partitioning strategy and the number of Terracotta client nodes you deploy will have an effect on the amount of heap allocated to each Terracotta client JVM.
 你的现有的应用服务器硬件应该能够足以作为Terracotta集群的JVM的客户端。你的负载分配策略和你部署的Terracotta客户端节点将影响对于每个Terracotta客户端JVM的堆分配的数量

 

As a general rule, each client JVM should do work on data that fits in its local heap. This good locality-of-reference characteristic will allow your application to operate at memory speed, faulting in object data from a Terracotta server instance only when first joining the cluster or when workload is rebalanced.
作为一般规则,每个客户端JVM应该工作在容纳在它本地堆中的数据之上。这种比较好的引用本地化的特征允许你的应用以内存速度运行,只有当第一次加入集群或者负载重现平衡时才会从Terracotta服务器实例上获得对象数据。

 

Another benefit of good locality-of-referene is that it minimizes the impact of having varying machine configurations across the application side of the cluster. In addition, load balancers can be used to send more work to machines with more resources.
另一个使用好的引用本地化的好处是最小化跨集群应用端不同机器配置带来的影响。此外,负载均衡器可以将更多的工作发送到具有更多资源的机器上。

 

You should also reduce the amount of clustered object data kept resident in the heap of more than one client JVM to a minimum to avoid redundant client JVM heap allocation for that data and to minimize the broadcasting that the Terracotta server must perform as that object data changes.
你也应该减少保存在不止一个JVM堆中的集群对象数据的数量,最小化的去避免多余的客户端JVM堆分配,和最小化的广播,Terracotta服务器必须在对象数据改变时工作

 

In exchange for its availability and scalability characteristics, Terracotta introduces some memory and CPU overhead to the application server process. This can be offset by adding more application servers to handle increased capacity requirements.

在交换可用性和可延展性特征时,Terracotta将一些内存和CPU用于应用服务器进程的开销。这可以通过增加更多的应用服务器来处理增涨的容量需求来抵消。

 

Load Balancing and Workload Partitioning

In order to achieve the good locality of reference mentioned earlier in the section on sizing the Terracotta client hardware such that each client JVM works on data that fits in its local heap and that data does not overlap with other client nodes, you must have some workload partitioning strategy. As a general purpose clustering solution, Terracotta does not ship with a particular workload partitioning strategy in the box. Workload partitioning can be implemented in a number of different ways.

为了实现前文提到的良好的引用本地化,即每个客户端JVM工作在放在本地堆中的数据对象,数据不会与其他客户端节点重叠,你必须具有一定的负载分配策略。作为通用的集群解决方案,Terracotta不提供开箱即用的特定的负载分配策略。负载分配可以由多种不同的方式实现

 

A simple form of such workload partitioning is a layer seven sticky load balancer that is able to route requests for a particular user session to the same Terracotta client application server and is likewise able to balance user sessions evenly across all available application servers. If you are using Terracotta in a user-session context, this sticky load balancing method of workload partitioning is highly recommended. In this scenario, WE STRONGLY DISCOURAGE THE USE OF ROUND-ROBIN OR OTHERWISE NON-STICKY LOAD BALANCING STRATEGIES.
一个简单的负载分配方式是一个七层粘性负载均衡器能够保证特定的用户session能够被路由到相同的Terracotta客户端应用服务器,同样能够在所有的可用的应用服务器之上平衡用户session。如果你在user-session上下文中使用Terracotta,强烈推荐使用粘性负载均衡方式。在这种场景下,我们强烈不建议使用ROUND-ROBIN火灾其他非粘性负载均衡策略。

Other forms of workload partitioning may be required for different use cases. Implementing workload partitioning algorithms in Java that can then be made cluster-aware via Terracotta is often a simple way to meet custom workload partitioning requirements.
其他的负载分配形式可能适用于不同的用例。用Java实现的负载均衡分配算法,通过Terracotta实现集群通常是一种能够满足个性化负载分配需求的简单途径。

 

Java Heap Sizing

To decide how much heap to allocate to a Terracotta server instance, you should know the size of the clustered object graph(s) that you expect to create. In the ideal case, each Terracotta client JVM will work on a set of object data that fits in its local heap. See the sections above on sizing the Terracotta client hardware and determining the number of Terracotta client nodes for a discussion of data partitioning and locality of reference considerations that will affect Terracotta client clustered data access patterns.
决定将多少堆分配给Terracotta服务器实例,你应该知道你期望创建的集群对象图的大小。在理想情况下,每个Terracotta客户端JVM都将工作在位于本地堆中的数据对象之上。查看关于设置Terracotta客户端硬件规模和决定Terracotta客户端节点的数量 那一段,然后讨论数据分区和引用本地化考虑将会影响Terracota客户端集群数据访问模式。

 

However, even in a well-partitioned cluster, there will necessarily be events that will cause a Terracotta client to request large amounts of object data from a Terracotta server instance. This will happen when a new Terracotta client node joins the cluster. As a new cluster member, a Terracotta client JVM will have no clustered object data yet in heap and must request any objects it needs from a Terracotta server instance. Also, when a Terracotta client JVM is taken out of service and its workload is rebalanced across the cluster, the other cluster nodes will necessarily request the relevant object data for their new workload from a Terracotta server instance.

然而,即使在很好的分区的集群中,也一定会有事件导致一个Terracotta客户端从Terracotta服务器实例请求大量的对象数据。这将发生在一个新的Terracotta客户端节点加入到集群中。作为一个新的集群成员,Terracotta客户端JVM将没有集群的对象数据在堆中,必须从Terracotta服务器请求所有的需要的对象。还有,当Terracotta客户端JVM挂了或者是集群重新负载,其他集群节点将为了新的负载从Terracotta服务器实例获得相关的数据。

 

As a final consideration for Terracotta server-instance heap sizing, be aware that very large heaps can lead to JVM garbage collection pauses that will cause the server instance to halt all work and have a negative impact on cluster throughput. We typically do not recommend a heap larger than 6-8 GB. If your requirements are such that you must have all clustered object data in heap, but it will not fit in the heap of the Terracotta server array you've allocated, and partitioning strategies have been exhausted, additional server instances must be provisioned. For more information, contact info@terracottatech.com.

作为Terracotta服务器实例堆大小的最终考虑,非常大的堆可能导致JVM垃圾回收暂停,从而导致服务器实例所有工作挂起,而对集群吞吐量产生负面影响。我们一般建议一个堆不要大于6-8GB.如果你的需求确实要求你必须将所有的集群对象都放在堆中,但是它又不能都放到Terracotta服务器已经分配的堆,分区策略已经用完了,额外的服务器实例必须被提供。

 

分享到:
评论

相关推荐

    The Definitive Guide to Terracotta.pdf

    The Definitive Guide to Terracotta

    The Definitive Guide to Terracotta 分布式JVM框架

    ### 《Terracotta 分布式JVM框架权威指南》核心知识点详解 #### 一、Terracotta概述 - **定义与背景**:Terracotta是一个高性能、易于使用的分布式内存解决方案,它允许开发者轻松地创建可扩展的Java应用程序。...

    Terracotta

    ### Terracotta:分布式内存管理解决方案 #### 一、Terracotta概述 Terracotta是一种分布式内存管理和数据共享平台,其核心产品BigMemory Max旨在帮助应用程序实现数据在内存中的高效管理,尤其适用于分布式服务器...

    terracotta

    在本文中,我们将深入探讨Terracotta的技术细节、其在集群负载中的优势,以及如何利用terracotta-3.6.0版本来优化应用性能。 **一、Terracotta简介** Terracotta是一款开源软件,它的核心功能在于提供了一个分布式...

    terracotta集群tomcat步骤

    Terracotta集群Tomcat的配置是一项复杂而关键的任务,它涉及到分布式系统中的高可用性和负载均衡。以下将详细解释这个过程中的各个步骤和相关知识点。 首先,安装Terracotta 3.2.1版本是非常基础的一步。需要注意的...

    使用terracotta进行web session 同步

    【标题】:“使用Terracotta进行Web Session同步” 在分布式Web应用环境中,用户会话(Session)的共享和同步是一个重要的挑战。Terracotta是一款开源软件,它提供了一种高效且可靠的解决方案,允许在集群环境中...

    通过_Terracotta实现基于Tomcat的Web应用集群

    ### 通过Terracotta实现基于Tomcat的Web应用集群 #### 概述 本文主要介绍了如何利用Terracotta与Tomcat构建高效的Web应用集群。在实际应用中,通过集群技术可以显著提升系统的可用性和伸缩性,特别是对于高流量、...

    Terracotta+tomcat集群配置详细说明(写了一晚上。。)

    【 Terracotta + Tomcat 集群配置详解】 在分布式计算环境中,集群技术是提升系统可用性和性能的重要手段。本文将深入探讨 Terracotta 与 Tomcat 集群的配置,以及如何利用 Terracotta 实现高效、可靠的 session ...

    terracotta-ee-4.1.2.jar,terracotta-license.key

    Terracotta是一款强大的分布式内存管理工具,主要用于Java应用程序的集群化和数据共享。在这个场景中,我们关注的是Terracotta企业版(terracotta-ee)的4.1.2版本,以及与其配套的许可证文件(terracotta-license....

    terracotta-3.7.7.tar.gz

    《Terracotta 3.7.7:分布式内存管理与集群解决方案》 Terracotta 3.7.7 是一款强大的分布式内存管理工具,它允许Java应用程序在多台服务器之间共享内存,从而实现数据的实时同步和高可用性。这款软件在2014年2月17...

    Terracotta 3.2.1 英文文档(CHM)

    Terracotta 3.2.1 英文文档

    ehcache-terracotta代码配置

    当与Terracotta结合使用时,Ehcache可以实现分布式缓存,使得多台服务器上的应用可以共享同一份缓存数据,从而构建高可用的集群环境。在本篇中,我们将深入探讨如何在Java项目中配置Ehcache与Terracotta来实现这一...

    terracotta-ee-3.5.2

    terracotta-ee-3.5.2破解版

    2008Amazon四星半新书_The+Definitive+Guide+to+Terracotta_+Cluster+the+JVM+for+Spring,+Hibernate+and+P.rar

    《The Definitive Guide to Terracotta: Cluster the JVM for Spring, Hibernate and More》是一本在2008年获得了亚马逊四星半高评的技术书籍,专注于介绍如何使用Terracotta来实现Java虚拟机(JVM)的集群,并且...

    terracotta license.key

    terracotta license.key ,

    使用terracotta实现session共享的证实实验

    ### 使用Terracotta实现Session共享的关键知识点 #### Terracotta简介 Terracotta是一种开源的分布式内存技术,它提供了一种简单有效的方式来管理和共享应用程序的数据。对于Java应用程序而言,Terracotta可以实现...

    terracotta 集群设置说明(中文)

    记载了terracotta如何与tomcat、jetty等服务器的集群,解释了tc-config.xml中各个配置的作用

    terracotta-eclipse-plugin-3.7.7(terracotta的Eclipse插件)

    terracotta-eclipse-plugin-3.7.7-2013-08-19_16-03-48.tar(terracotta的Eclipse插件) 发现官网挺卡的,有时候下不了,先传上来吧,供国内用户下载,这个算最新的吧。2014-02-17下载的。

Global site tag (gtag.js) - Google Analytics