AnsweredAssumed Answered

Alfresco cluster configuration on RHEL.

Question asked by dynamolalit on Feb 28, 2012
Latest reply on Mar 23, 2012 by vchiluku
Hi All,

I am sharing my experience in clustering here which i have earned during one of my implementations. I have implemented cluster setup as depicted in https://wiki.alfresco.com/wiki/File:Alfresco_LB_Diagram.png. I have used alfresco+tomcat bundle here for this setup but hope this works for any application server.

Target environment/components:
1. Alfresco 3.4.6 Enterprise.
2. Red Hat Enterprise Linux ver. 5.5
3. JDK 1.6
5. MySQL 5.1
6. Apache 2.2 (Load Balancer)
7. Tomcat 6.0

Cluster components:
1. Common Database (too clustered)
2. Common Content Store (On SAN)
3. Individual indices & cache

I have followed below steps to achieve the same.

NOTE: Apache is used as load balancer.

1. Installed alfresco 3.4.6 on server1.
2. After installation updated /tomcat/shared/classes/alfresco-global.properties for setting up cluster for server1.
3. Now for server1, i have indexes created locally under alf_data for server1; content store for server1 is mounted on a SAN @ /mysan/alfresco/my_content_store.
4. DB for server1 is configured at other server @ jdbc:mysql://<DB IP>:3306/alfresco.
5. Updated index.recovery.mode=AUTO for cluster setup. Sample properties are
index.recovery.mode=AUTO

dir.root=/mysan/alfresco/my_content_store
dir.contentstore=${dir.root}/contentstore
dir.contentstore.deleted=${dir.root}/contentstore.deleted
dir.auditcontentstore=${dir.root}/audit.contentstore

dir.indexes=/usr/local/softwares/alfresco/alf_data/lucene-indexes
dir.indexes.backup=/usr/local/softwares/alfresco/alf_data/backup-lucene-indexes
dir.indexes.lock=/usr/local/softwares/alfresco/alf_data/locks

alfresco.cluster.name=my-cluster
alfresco.tcp.initial_hosts=<IP 1>[7800],<IP 2>[7800]
alfresco.jgroups.defaultProtocol=TCP

db.driver=org.gjt.mm.mysql.Driver
db.username=admin
db.password=admin
db.name=alfresco
db.url=jdbc:mysql://<DB IP>:3306/alfresco
hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
6. Started server1 & logged into explorer/share, its working fine.
7. Stopped server1.
8. Installed alfresco 3.4.6 on server2.
9. After installation updated /tomcat/shared/classes/alfresco-global.properties for setting up cluster for server2 as below.
10. Now for server2, i have indexes created locally under alf_data for server2;content store is mounted on a SAN @ /mysan/alfresco/my_content_store and db for server2 @ jdbc:mysql://<DB IP>:3306/alfresco.
11. Updated index.recovery.mode=AUTO. Below are sample properties for server2 in cluster.
index.recovery.mode=AUTO

dir.root=/mysan/alfresco/alf_dat_auth
dir.contentstore=${dir.root}/contentstore
dir.contentstore.deleted=${dir.root}/contentstore.deleted
dir.auditcontentstore=${dir.root}/audit.contentstore

dir.indexes=/usr/local/softwares/alfresco/alf_data/lucene-indexes
dir.indexes.backup=/usr/local/softwares/alfresco/alf_data/backup-lucene-indexes
dir.indexes.lock=/usr/local/softwares/alfresco/alf_data/locks

alfresco.cluster.name=my-cluster
alfresco.tcp.initial_hosts=<IP 1>[7800],<IP 2>[7800]
alfresco.jgroups.defaultProtocol=TCP

db.driver=org.gjt.mm.mysql.Driver
db.username=admin
db.password=admin
db.name=alfresco
db.url=jdbc:mysql://<DB IP>:3306/alfresco
hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
12. Started server2 & logged into explorer/share, its working fine. It may take some time due to index updates for cluster.
13. Restarted server1. I can access both servers simultaneously.
14. No error till now so assuming both server1 & server2 are fine and a cluster has been setup.
15. Tested setup as per http://wiki.alfresco.com/wiki/Cluster_Configuration_V2.1.3_and_Later#Testing_the_cluster.
16. Tested Cache clustering, Index clustering & Content replication/sharing. Working fine as i can see content updated on one server is reflected on other server.
17. High Availability is maintained by load balancer which takes care of incoming requests & forwards them to current active node at any time.

All set for this cluster. More servers can be added as per need. Its working perfectly.

Outcomes