Call us: +1-415-738-4000
A number of properties control the way the Terracotta Server Array and Ehcache clients perform in a Terracotta cluster. Some of these settings are found in the Terracotta configuration file (
tc-config.xml), while others are found in the Ehcache configuration file (
ehcache.xml). A few must be set programmatically.
The following sections detail the most important of these properties and shows their default values. To confirm the latest default values for your version of Terracotta software, see the XSD included with your Terracotta kit.
A Terracotta cluster is composed of clients and servers. Terracotta properties often use a shorthand notation where a client is referred to as "l1" and a server as "l2".
These properties are set at the top of
tc-config.xml using a configuration block similar to the following:
<tc-properties> <property name="l2.nha.tcgroupcomm.reconnect.enabled" value="true" /> <!-- More properties here. --> </tc-properties>
See the Terracotta Server Arrays documentation for more information on the Terracotta Server Array.
The following reconnection properties are shown with default values. These properties can be set to custom values using Terracotta configuration properties (
<property> elements in
|l2.nha.tcgroupcomm.reconnect.enabled||true||Enables server-to-server reconnections.|
|l2.nha.tcgroupcomm.reconnect.timeout||5000ms||l2-l2 reconnection timeout.|
|l2.l1reconnect.enabled||true||Enables an l1 to reconnect to servers.|
|l2.l1reconnect.timeout.millis||5000ms||The reconnection time out, after which an l1 disconnects.|
|l1.max.connect.retries||-1||The number of allowed reconnection tries from an l1 to an l2. Affects both initial and subsequent reconnection attempts. -1 allows infinite attempts.|
|tc.config.getFromSource.timeout||30000ms||Timeout for getting configuration from a source. For example, this controls how long a client can try to access configuration from a server. If the client fails to do so, it will fail to connect to the cluster.|
|logging.maxBackups||20||Upper limit for number of backups of Terracotta log files.|
|logging.maxLogFileSize||512MB||Maximum size of Terracotta log files before rolling logging starts.|
The following properties control disconnection tolerances between Terracotta servers (l2 <-> l2), Terracotta servers and Terracotta clients (l2 -> l1), and Terracotta clients and Terracotta servers (l1 -> l2).
l2.healthcheck.l2.ping.enabled = true l2.healthcheck.l2.ping.idletime = 5000 l2.healthcheck.l2.ping.interval = 1000 l2.healthcheck.l2.ping.probes = 3 l2.healthcheck.l2.socketConnect = true l2.healthcheck.l2.socketConnectTimeout = 5 l2.healthcheck.l2.socketConnectCount = 10
l2.healthcheck.l1.ping.enabled = true l2.healthcheck.l1.ping.idletime = 5000 l2.healthcheck.l1.ping.interval = 1000 l2.healthcheck.l1.ping.probes = 3 l2.healthcheck.l1.socketConnect = true l2.healthcheck.l1.socketConnectTimeout = 5 l2.healthcheck.l1.socketConnectCount = 10
l1.healthcheck.l2.ping.enabled = true l1.healthcheck.l2.ping.idletime = 5000 l1.healthcheck.l2.ping.interval = 1000 l1.healthcheck.l2.ping.probes = 3 l1.healthcheck.l2.socketConnect = true l1.healthcheck.l2.socketConnectTimeout = 5 l1.healthcheck.l2.socketConnectCount = 13
Ehcache configuration properties typically address the behavior, size, and functionality of caches. Others affect certain types of cache-related bulk operations.
Properties are set in
ehcache.xml except as noted.
The following default cache settings affect cached data. For more information on these settings, see the Ehcache documentation.
|local key cache||false|
|memory store eviction policy||LRU|
|ttl||0||0 means never expire.|
|tti||0||0 means never expire.|
|maxElementsOnDisk||0||0 means infinite; this is the cache size on the Terracotta Server Array.|
|maxEntriesLocalHeap||0||0 means infinite.|
The following default settings affect the behavior of the cache when while the client is disconnected from the cluster. For more information on these settings, see the nonstop-cache documentation.
This value is a timeout multiplication factor affecting bulk operations such as |
The following properties are shown with default values. These properties can be set to custom values using Terracotta configuration properties.
Increasing batch sizes may improve throughput, but could raise latency due to the load on resources from processing larger blocks of data.
|ehcache.bulkOps.maxKBSize||1MB||Batch size for bulk operations such as putAll and removeAll.|
|ehcache.getAll.batchSize||1000||The number of elements per batch in a getAll operation.|
|ehcache.incoherent.putsBatchByteSize||5MB||For bulk-loading mode. The minimum size of a batch in a bulk-load operation. Increasing batch sizes may improve throughput, but could raise latency due to the load on resources from processing larger blocks of data.|
|ehcache.incoherent.putsBatchTimeInMillis||600 ms||For bulk-loading mode. The maximum time the bulk-load operation takes to batch puts before flushing to the Terracotta Server Array.|