By AndrasAcs on
How to make Drupal run on a HA cluster? This is what we are working on.
Drupal is installed on an NFS share, and runs on several apache nodes, were all accesses Drupal files on the NFS. The database is an MySQL cluster. There is a load-balancer distributing in the front the load between the apache nodes. I have just installed the systems and more information to come as we progress.
I forsee lots of funny bugs :-)
Comments
Others working on this approach?
Please comment on this topic if you also work with a similar approach to Drupal high perormance HA cluster - and let's exchange our experiences.
Similar Setup
Hello,
Currently I maintain a similar setup without mysql cluster. Drupal should be installed on all servers. The *files* directory should be an NFS share from a backend server OR some type of global file sharing system. The sessions are stored in the database so that should work across a load balancer.
So the only difference between what you are talking about and what I have done is whether DRUPAL is installed on an NFS share. It my case, ONLY the *files* directory is.
Dave
www.ingraftedsoftware.com
Same setup, without the common file area
I have a similar setup, without the common file area (we don't allow users to upload files). Except for the 'gotchas' listed below, everything works fine:
1) All tables must reside in RAM. This isn't a problem for any of the drupal tables except accesslog, which is the event log for drupal. This will get large if you don't prune it. Future versions of cluster (5.1+) support cluster tables stored on disk, so this problem will go away.
2) Cluster will run out of operations records if you join a small cluster table (i.e. drupal's user table) with a large non-cluster table (i.e. a log table). This bug may go away if both tables can go into the cluster, which will be possible when large cluster tables can be stored on disk vs. RAM.
3) Many of the drupal admin reports use lots of queries that return small amounts of data vs. using a small number of queries that return large amounts of data. An example of this is the CSV user report. It runs 1 query to fetch user record ids. For each user record it runs another query to fetch basic user data and multiple queries to fetch custom user properties. This can turn into thousands of queries for a single report. MySQL cluster queries take longer to run than non-cluster queries - every time you start a query, you have to check if you're data is up-to-date. This practice makes many of the admin functions useless (i.e. they hang forever). If the various drupal module writers changed their query strategy (fewer queries that return more data), the problem would go away.