Hi Olaf,
I was able to set up a clustered load balanced environment in my local. It has one database, two tomcat and one apache.
Here are the properties that i added in portal-ext.properties
1jdbc.default.driverClassName=com.mysql.jdbc.Driver
2jdbc.default.url=jdbc:mysql://localhost/cluster_write?useUnicode=true&characterEncoding=UTF8&useFastDateParsing=false
3jdbc.default.username=root
4jdbc.default.password=root
5
6#Ehcache
7net.sf.ehcache.configurationResourceName=/ehcache/hibernate-clustered.xml
8ehcache.multi.vm.config.location=/ehcache/liferay-multi-vm-clustered.xml
9
10#documentlibrary
11dl.hook.impl=com.liferay.documentlibrary.util.AdvancedFileSystemHook
12image.hook.impl=com.liferay.portal.image.DLHook
13
14image.hook.file.system.root.dir=E:/Practice/Liferay/clusterTesting/data/images
15dl.hook.file.system.root.dir=E:/Practice/Liferay/clusterTesting/data/document_library
16
17lucene.dir=E:/Practice/Liferay/clusterTesting/data/lucene/
18#cluster.link.enabled=true
19#web.server.display.node=true
For apache I enabled following
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
And in httpd-vhosts.conf added the following
1<VirtualHost *:80>
2 ServerName node1.liferay.com
3 ErrorLog logs/ajperror.log
4 CustomLog logs/ajp.log combined
5
6 <Proxy *>
7 AddDefaultCharSet Off
8 Order deny,allow
9 Allow from all
10 </Proxy>
11 ProxyPass /balancer-manager !
12 ProxyPass / balancer://ajpCluster/ stickysession=JSESSIONID
13 ProxyPassReverse / balancer://ajpCluster/ stickysession=JSESSIONID
14 <Proxy balancer://ajpCluster>
15 BalancerMember ajp://localhost:8009 route=lr1
16 BalancerMember ajp://localhost:9009 route=lr2
17 ProxySet lbmethod=byrequests
18 </Proxy>
19
20 <Location /balancer-manager>
21 SetHandler balancer-manager
22 Order deny,allow
23 Allow from all
24 </Location>
25</VirtualHost>
It works fine but i have some questions to you
1) How to add another apache?
2) I tried to make database in read write mode by putting the following but it tried to put data in write database and for read it was trying to use hypersonic. Is it becoz that i havent enabled replication first that it happend that way?
1spring.configs=\
2 META-INF/base-spring.xml,\
3 \
4 META-INF/hibernate-spring.xml,\
5 META-INF/infrastructure-spring.xml,\
6 META-INF/management-spring.xml,\
7 \
8 META-INF/util-spring.xml,\
9 \
10 META-INF/jpa-spring.xml,\
11 \
12 META-INF/audit-spring.xml,\
13 META-INF/cluster-spring.xml,\
14 META-INF/editor-spring.xml,\
15 META-INF/jcr-spring.xml,\
16 META-INF/ldap-spring.xml,\
17 META-INF/messaging-core-spring.xml,\
18 META-INF/messaging-misc-spring.xml,\
19 META-INF/poller-spring.xml,\
20 META-INF/rules-spring.xml,\
21 META-INF/scheduler-spring.xml,\
22 META-INF/scripting-spring.xml,\
23 META-INF/search-spring.xml,\
24 META-INF/workflow-spring.xml,\
25 \
26 META-INF/counter-spring.xml,\
27 META-INF/document-library-spring.xml,\
28 META-INF/mail-spring.xml,\
29 META-INF/portal-spring.xml,\
30 META-INF/portlet-container-spring.xml,\
31 \
32 META-INF/dynamic-data-source-spring.xml,\
33 #META-INF/shard-data-source-spring.xml,\
34 #META-INF/memcached-spring.xml,\
35 #META-INF/monitoring-spring.xml,\
36 \
37 META-INF/ext-spring.xml
38
39jdbc.read.driverClassName=com.mysql.jdbc.Driver
40jdbc.read.url=jdbc:mysql://localhost/cluster_read?useUnicode=true&characterEncoding=UTF8&useFastDateParsing=false
41jdbc.read.username=root
42jdbc.read.password=root
43
44jdbc.write.driverClassName=com.mysql.jdbc.Driver
45jdbc.write.url=jdbc:mysql://localhost/cluster_write?useUnicode=true&characterEncoding=UTF8&useFastDateParsing=false
46jdbc.write.username=root
47jdbc.write.password=root
4) we will be using SAN for file storage. Is it advisable to use cluster link for lucene or can i use SAN for the same? If i go for cluster link, will just setting cluster.link.enabled to true, make it start working or do i need to do some more change.
5) While using SAN for example in my case above the following should work rright?
dl.hook.file.system.root.dir=//SAN_IP/cluster/data/document_library