2

Not quite sure if this is the correct thread to be posting this in, so please feel free to move it if its not.

Background:

Our developers have nearly finished developing our Drupal 7 based web application and as with any start up, I am assuming the role of the sys admin, financial controller and everything else under the sun! My experience with Linux is limited to what i've been able to learn through the internet i.e - install and configure apache, mysql, php, memcache, varnish etc.

Current set up:

After having spent the best part of 4 weeks stress / load testing various cloud service providers we ended up with Google Cloud.

2x web servers (8 cores + 7.5gb ram each) running: - Ubuntu 14.04 LTS - Apache 2.4 (mpm_event + PHP_FPM) - Memcache 3.0

1x database server (4 cores + 26GB ram) running: - MySQL 5.6

1x Load balancer for the two web servers

Problem:

I'm now at the part where I need to decide how / where to run the filesystem for our load balanced Drupal application. As you all know, Drupal stores assets by default on the local disk /sites/default/files. Now, obviously this isn't going to work with a load balanced solution since files that are written to server 1 will not be available to be served from server2.

Potential solutions?

These are the following potential solutions I have thought of:

1) Use the Amazon S3 module for Drupal which allows the application to both write and read from an S3 bucket. This seems to be the easiest solution, but i'm a bit reluctant after having spent a lot of time configuring my servers for speed and performance. That extra bit of time its going to take Drupal to write to S3 is what worries me and the fact that I have less control over the situation.

2) This is where my inexperience in terms of implementation lacks, but the second option would be to spin up another instance, mount it to the servers (is it possible to mount another server to both web servers??). Then change Drupal so that it writes to that mounted filesystem. (This seems more performant, but not sure whether possible and certainly a more complex task).

3) Use rsync between the two web servers. Again, my experience with rsync is very limited and i'm not sure whether it would be able to read / write fast enough.

So, that is my current dilemma. And any input whatsoever would be greatly appreciated.

Thank you!

closed as off-topic by kiamlaluno Aug 26 '15 at 22:39

  • This question does not appear to be about Drupal within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • had you checked out github.com/s3fs-fuse/s3fs-fuse ? I am currently trying to determine the best route to enable the same functionality in my AWS account and I can't decide between the s3fs-fuse and using a file server...i like the s3 route (for data backups etc) but I think I need some help :( – n34_panda Aug 14 '15 at 7:41
  • I'm voting to close this question as off-topic because it more about server settings than Drupal itself. – kiamlaluno Aug 26 '15 at 22:39
1

Upon further research, I decided to boot up another VM instance and mount my two web servers to it then installed NFS server and client respectively. This seems to work very well.

0

I Have done it for one of my clients, we used separate server as a storage, and we mounted it to 3 servers. Worked very well. Also speaking of performance, have you considered using a CDN. this will make your life much easier. if you have a high traffic site CDN is your way to go to serve static files. take a look at the Drupal CDN module

  • Thanks for your comment. Yes, I forgot to mention that we are using a CDN. Are you able to provide some more insight into how you achieved mounting the server? – Fredrik Christensen Aug 11 '15 at 17:03
  • We used NFS Mount, see more here. so the files directory is stored on "storage server 1) and we add a symlink in every server. – sam2de Aug 11 '15 at 18:13
0

Thank you sam2de. I've done some further research and actually found out that you can use GCS fuse which is developed by Google and it allows you to mount a Google Storage bucket as an extension to your filesystem on your server instances. I'm gonna give it a try and report on my findings. https://cloud.google.com/storage/docs/gcs-fuse?hl=en

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