• I’m trying to load balance a WordPress site on 2 web servers, each with its own database instance. I’m thinking of setting up master-master replication on the MySQL databases to keep things in sync and to have redundancy just in case one server dies and the web files will just be rsyncd between the 2 web servers.

    The load balancer is set up to send all /wp-admin and /wp-login page requests to the master web server (I’m not sure if this is necessary though).

    Is this the best approach? Any suggestions/comments?

Viewing 2 replies - 1 through 2 (of 2 total)
  • We recently did something similar, however you still have a single point of failure in that you are operating just one database. Our issue was slightly different in that we were running 5 different websites.

    We opted to use a staging server where we make changes and test before copying content to our load balanced servers when changes are ready and tested. Each of our servers is self contained (running WordPress with it’s own database) and then we rsync the files and new database to each of our load balanced server over SSH using a simple script – all we need do is log on to the staging server and activate the script and all your new content goes live. You can also tailor the script to select which websites you want to update.

    I have written more about load balancing here.. If anyone is interested I could post details of the script.

    Interested to see the script, think the solution is most elegant ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘load balance 2 web servers, 2 dbs’ is closed to new replies.