HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   Wordpress site in a cluster (http://www.howtoforge.com/forums/showthread.php?t=60603)

InTimber 18th February 2013 01:38

Wordpress site in a cluster
 
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

florian030 18th February 2013 08:57

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.

InTimber 18th February 2013 16:10

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

florian030 18th February 2013 16:16

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

InTimber 18th February 2013 16:30

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?!

florian030 18th February 2013 17:42

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


All times are GMT +2. The time now is 20:20.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.