Search code examples
phpdrupal-7varnishmultiserver

Drupal Multiserver setup image upload issue


I am working on a Project which is using two Servers with Secured connection with a single database connection and Two Separate Varnish Cache Servers too is integrated. I have a IP which is a load balancer IP that ether redirects to first server or second server

everything seems to work fine as the data is being pulled from single database. However there is a issue in the users profile image.

When a user uploads the image and the load balancer IP is redirecting to 1st server the image goes to the first server files directory.

however when user accessing site from second server sees the complete data(as everything is loading from common db) but UNABLE to see the Images saved in first Server.

How can I get this thing resolved ?

I am PHP Developer and I made a Simple PHP Script using phpseclib that saves the image file in the external server too.

I dont know how shall I integrate this in Drupal. (I am a PHP Developer but dint work much on module making in Drupal)

Or is there is any other alternative?


Solution

  • we are using a similar structure in our project. use eihter RSYNC or NFS between the file system in two servers where images are stored RSYNC -syns the two server NFS-loads the files system of one server onto another server