Beruflich Dokumente
Kultur Dokumente
Clustering
What is Cluster
Cluster : A group of servers that acts like a single
system
Why Clustering
Scalability(Load Balancing) : Scalability means that your
application is capable to handle more load /requests by
increasing servers.
Load balancing means that all servers are active, and new
requests are distributed among them.
For EOD, EOD can be initiated from the single Master Node only.
EOD execution load is distributed across all the nodes inclusding
Master and other slave nodes.
Focus Points in NEO Clustering
Locking: Application locks should be shared across different cluster nodes. If
DB locks are used then it is cluster-safe.
Caches: Persistent CACHE objects must be shared across cluster. Achieved via
INFINISPAN along with JGROUPS.
Logging: Logs are not shared. Individual LOGs for each Node.
User Sessions: User sessions are not replicated. But SESSION REGISTRY is
shared using Infinispan Cache. Authentication data are stored and shared at
DB level.
Caching in NEO Clustering
In FinnOne NEO we use following type of Caching.
Hibernate L2 Cache
Custom Cache (L3 Cache)
Lucene Indexes
XML Based Config: Hibernate L2 Cache
New profile in framework-persistence-context.xml app-server-cluster-provided.
The default Hibernate Infinispan Cache configurations have been overridden via the JPA
property hibernate.cache.infinispan.cfg.
hibernate.cache.infinispan.cfg File having configurations for L2 Cache neutrino-
cluster-infinispan.xml
XML Based Config: Hibernate L2 Cache
Configurations for L2 Caching neutrino-cluster-infinispan.xml
<namedCache name="entity">
<clustering mode="replication">
<stateTransfer fetchInMemoryState="false" timeout="20000000" />
<sync replTimeout="20000" />
</clustering>
<locking isolationLevel="READ_COMMITTED" concurrencyLevel="1000"
LockAcquisitionTimeout="15000" useLockStriping="false" />
<eviction maxEntries="1000000" strategy="LRU" />
<expiration maxIdle="-1" wakeUpInterval="5000" />
<transaction transactionMode="TRANSACTIONAL" autoCommit="false"
lockingMode="OPTIMISTIC" />
</namedCache>
<global>
<transport distributedSyncTimeout="50000" clusterName="neutrino-cluster">
<properties>
<property name="configurationFile" value="neutrino-jgroups.xml" />
</properties>
</transport>
<globalJmxStatistics enabled="false allowDuplicateDomains="true" />
</global>
XML Based Config: Hibernate L2 Cache
Configurations for L2 Caching neutrino-cluster-infinispan.xml
XML Based Config: Hibernate L2 Cache
JGROUPS CLUSTER TOPOLOGY configurations defined within neutrino-jgroups.xml.
Sample XML contains JGROUPS configuration based on TCP transport. (UDP Option is also
available)
Custom Cache : NeutrinoCache
CustomCache has been completely restructured for supporting Clustering.
For GA 2.0, below are the number of CacheManager instances within each module.
CAS: 1
LMS: 2
LMS Common: 1
FW: 1
Custom Cache : NeutrinoCache
Sample code snippet for FW_CACHE using CacheManager.
For Infinispan:
neutrino-hibernatesearch-infinispan.xml is introduced. This overrides the default config
provided by Hibernate/Infinispan.
TCP based JGROUPS configuration file is also introduced.
For FileSystem:
Within framework-persistence-context.xml, JPA Property
hibernate.search.default.exclusive_index_use is introduced and set as FALSE.
Deployment on AS (Weblogic/JBOSS)
Deployment is now controlled from a single Admin Console.
Single copy of WAR is maintained at Admin Server.
Weblogic/JBOSS Cluster is to be created first.