0

I have 2 parallel Drupal Web Servers running (serving for one Drupal Instance together) and now i need to install NFS. My experience in multi Drupal Servers is, each Drupal Instance (Server) uses their own Aggregated JS + CSS files (storing in: sites/default/files/js and sites/default/files/css folders) which can NOT be used as common. (Files can not be the same for both Servers. They use their own ones.)

Based on these issues, my questions are:

  • How NFS actually works between Multi Drupal Servers?
  • Which directories will be/need to be shared between?
  • What will happen to Aggregated Files?
  • What will happen to Web User Uploads paths and files? (Need any configuration in Drupal?)

Can anyone share these knowledge/experience please?

1

1 Answer 1

2

You can definitively work with NFS and Drupal.

I do not understand why you do not want to share the files directory between both.

In fact you have two solutions:

  • 1) Share all the source tree, starting at the web directory root, or even earlier if you have external directories for private files
  • 2) Share only the moving directories and have all code based synchronised before and aftter any upgrade via some rsync commands. In this case you need to share between servers:
  • the files directories (project/www/site/default/files, project/www/site//files)
  • the private files directories (project/private) <-- it's an example
  • the php temporary upload path (project/tmp for example), check that both servers use the right folder (it's a php setting) and that this folder is shared.

before Drupal7 I would use solution 1, now the number of internal filesystem tree traversal launched by Drupal on a lot of occasion make it very bad on slow filesystem (and NFS is usually quite slow). Using APC with all filesystem check disabled (apc.stat, stat.ctime, etc) does not prevent Drupal from trying to access every file on your filesystem on a lot of occasions. So solution 2 is to be prefered.

I did not experience any problems with file aggregation with such installations.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.