CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • Scalability (Moderator: Donald Lobo) »
  • Civi on a cluster: file replication and moving templates_c
Pages: [1]

Author Topic: Civi on a cluster: file replication and moving templates_c  (Read 1774 times)

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Civi on a cluster: file replication and moving templates_c
May 10, 2011, 09:15:56 am
Hi,

We're setting up a cluster for hosting Drupal / Civi sites. The bit we're currently thrashing out is what to do for file replication, so that files uploaded
(a) through the Drupal or Civi UI and
(b) via SFTP etc
get replicated to all the web servers.

Thinking of using GlusterFS for this. However this is reported to be slow for operations involving a large number of file accesses, so we don't want to use it directly as the web root.

One possible solution: only use Gluster for the files/ directories, by symlinking. That solves replication for case (a), we'll need to do something else for (b) but that's tractable. The problem it leaves is that Civi's templates_c/ directory is standardly put under files/, so it would be on Gluster and therefore liable to be slow.
AFAICS Civi assumes a base directory which it expects to contain all of templates_c/, custom/, persist/ and upload/. What we'd like is to leave custom/, persist/ and upload/ under files/civicrm/ (so that uploaded files, exports etc get replicated) but put templates_c/ outside files/ (so that it lives on the local filesystem on each webserver, for performance).

Have tried to do this by changing CIVICRM_TEMPLATE_COMPILEDIR and adjusting the other directories through the UI but this hasn't been successful, it seems Civi assumes everything lives under a single base dir and it creates paths based on this assumption. So I'm getting the impression we'd be fighting against Civi with this approach.

Any thoughts? What approach have other taken to file replication with Civi?

Thanks,

Dave J

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • Scalability (Moderator: Donald Lobo) »
  • Civi on a cluster: file replication and moving templates_c

This forum was archived on 2017-11-26.