Support » Installing WordPress » WordPress on load balanced servers

  • Two servers, under a perlbal balancer.

    One database.

    rsync keeps “uploads” on ‘app1’ and “uploads” on ‘app2’ synced every 5 minutes.

    The issue is that if you’re session is on app2 and you upload a file, sometimes app1’s script kicks in and overwrites your uploaded files – breaking the image url.

    Is there a better way to keep the “uploads” folders in sync between the 2 servers?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Temporary solution:

    rsync the two servers’ uploads directory. Make sure not to use the –delete flag.

    May cause a little more cruft in your uploads directory since it can’t delete, but cmon.

    You could also use single point of storage, mounted on each of the servers for the uploads. Apache/your-webserver and WordPress would then just see that one location and handle the rest accordingly.

    Of course if you have two servers loadbalanced, you know that your “single” point of storage should be redundant in and of itself. This adds a bit of complexity but maybe a good solid solution.

    Look at Gluster:

    (You’d put the client/server on each web server node)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WordPress on load balanced servers’ is closed to new replies.