WordPress on load balanced servers (4 posts)

  1. jeffclark
    Posted 6 years ago #

    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?

  2. jeffclark
    Posted 6 years ago #

    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.

  3. Oscar Gonzalez
    Posted 6 years ago #

    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.

  4. zonknz
    Posted 6 years ago #


    Look at Gluster: http://www.gluster.org/

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

Topic Closed

This topic has been closed to new replies.

About this Topic