Wordpress site in a cluster

Discussion in 'General' started by InTimber, Feb 18, 2013.

  1. InTimber

    InTimber New Member

    Hi,

    I would like to run a Wordpress site in a cluster environment and would like to know what you think about that. Will it work like this? Anything special to consider?

    Here are the details:
    - 1 Wordpress blog
    - 2 Debian 6 servers, Apache, PHP, MySQL, ISPConfig 3
    - MySQL replication (master/slave)
    - File replication via unison every 5 minutes via cron
    - DNS entry (blog.domain.com) that refers to both server IP addresses

    So users get randomly redirected to the first or the second cluster node, but the replication (file and MySQL) keeps both servers in sync.

    This scenario works with simple websites but I have no experience with Wordpress sites. Please let me know what you think about that.

    Thanks,
    Denis
     
  2. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    Hi Denis,

    it should work. But make sure, that new Posts and Commencts are always written to the mysql-Master. I prefer master-master in such a scenario instead of using a remote mysql-on the slave.
     
  3. InTimber

    InTimber New Member

    That's exactly why I ask: Why should I write it to the MySQL master? Why do think it is not good to write to the slave? Shouldn't it be replicated instantly to the master?

    Thanks,
    Denis
     
  4. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    Changes made on the slave will NOT be sent to the master.
     
  5. InTimber

    InTimber New Member

    Alright, thanks for the explanation. I'm pretty new to MySQL replication and still have some problems with the terminology. It seems like I have already set up a master/master replication and thought it's a master/slave setup. I just tested it (made changes on both sides) and it worked out well.

    Thanks for the explanation.

    Any other thoughts about my scenario? It looks like with a master/master replication this should work great?!
     
  6. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    As long as you use auto-increment and the slave-lag is not too high....
     

Share This Page