AnsweredAssumed Answered

Replication on 2 separate db's between clustered servers

Question asked by unknown-user on Aug 26, 2010
This is how I got Alfresco working with full replication between 2 cities, 100 km's apart from each other. I was told in earlier posts that it couldn't be done… maybe they meant just in Alfresco… Anyways, its working now.

We had to setup 2 vpn's between the servers. One is for the multicast address to broadcast on (make sure you have a cluster name set in, and the that the ehcache file is activated), and the other is for the mysql master-master db & nfs shares.

NFS shares explained: On each server we have setup a directory and mounted it in fstab on the other server, and set the remote servers share to be the network content store in replicating-content-context.xml to be the nfs share directory.  

                     Example: On the main server in replicating-content-context.xml under networkcontentstore, we point to the directory  /opt/remoteserver/contentstore.
                                   On the main server,  /opt/remoteserver is mounted in fstab as  remoteserverIPaddress:/opt/Alfresco/alf_data        /opt/remoteserver    nfs
                      So in effect, you are mounting the remote servers alfresco contentstore into a directory on your main server, that gets replicated into your /opt/Alfresco/alf_data/contentstore via the replicating-content-context.xml being in place.

This is our solution to replicate content between servers in 2 different cities. If you upload content at the remote location, it is replicated via nfs into the main locations contentstore, and vice versa.

Since both locations have a local mySQL database, there are no ridiculous load times associated with accessing a single remote database.

Setting up the Master-Master database wasn't too bad, I followed this link:
A few tweaks had to be made here and there, but most of the time spent setting it up was simply learning how the thing works in the first place.

This was a massive pain in the behind to get working. Looking back at it now, it appears relatively simple.