0

i've read here:

Wordpress Installation on Two Servers - Loadbalancing

and here:

https://www.quora.com/How-do-I-load-balance-on-WordPress-with-2-LAP-web-servers-and-1-Mysql-DB

none of the links addresses the following issue:

You go to server1, press "install plugin foobar" now server1 downloads files for plugin foobar. It makes DB changes for plugin foobar. But on server2, foobar files are not available. I cannot even make sure to be accessing server2 from the web as I get randomly dropped on server1 or server2.

Another problem: Plugin updates.

I go to server1 and press "update" on plugin foobar v1.0. It gets updated on server1 to v9.0. The plugin update, performs db changes as well. On server2 we still have the files from v1.0. Not good. Even if I manage to access server2, won't it be in a faulty state? that is: db from v9.0 and files from v1.0. The Plugin update might eventually not even work with this state, so it could be that I cannot update well foobar v1.0 to v9.0 on server2 once i reached the server.

6
  • Can you please let us know 1. Servers? Windows or Linux, 2. How are they hosted, 3. how are you load balancing the site? 4. What file replication are you using? 5. What database product are you using? Dec 2, 2016 at 17:59
  • Options 1) Put Wordpress on a shared file system 2) Sync that wp-content directory between machines 3) Open two browser tabs, address the individual servers by IP, and update them at the same time.
    – Tim
    Dec 3, 2016 at 20:16
  • @AnthonyFornito they are hosted on AWS. As I understand, round robin. database is mysql and it is shared. File replication we aren't using any
    – Toskan
    Dec 5, 2016 at 18:44
  • @Tim option 3 would lead to both servers trying to perform the same actions on the DB, thus resulting at best with an error on one server.
    – Toskan
    Dec 5, 2016 at 18:46
  • Good point. With option 3 probably best to update one then the other, as I suspect if the DB version shows it's up to date it won't bother doing it again. This would need testing. Putting Wordpress on shared storage would probably be better. Wordpress isn't really made to scale.
    – Tim
    Dec 5, 2016 at 18:49

0

You must log in to answer this question.

Browse other questions tagged .