Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

For static websites I'm using HAProxy (one master, several nodes with static HTML files on them). What services in addition would you recommend to allow WordPress sites to be hosted in the same way in terms of MySQL and files across the nodes changing.

Thanks for any advice/pointers.

Edit: I'm using Ubuntu currently with a standard LAMP stack, the reason why I need this is because as soon as one of my clients sites goes down because they are getting 1000's of hits is when they call me and I get shouted at.

@polynomial The data changes all the time (the main problem) the slaves need to be access really in a which one has the least load on it. MySQL is currently just a single server, serving the data to WP. We do know a little bit when sites will increase load, but there is not much we can do apart from add more ram and bandwidth.

share|improve this question
    
why would a wordpress instance need to be distributed, redundant, and/or high-availability? –  warren Oct 4 '11 at 22:13
    
What OS will this be deployed on? If using Windows, you can use DFS to replicate folders between servers. –  KJ-SRS Oct 4 '11 at 22:48
4  
@warren - for the same reason any software needs to be. Perhaps his primary income is from advertising on a wordpress blog and every hour the site is down he loses $1,000 in advertising revenue. Either way, it's not our place to question the specifics of why they want it done, because it's not unreasonable at all. –  Mark Henderson Oct 5 '11 at 1:25
    
If you want a really good answer you should probably provide some more data. How often does data change? How often do you need it to update on the slaves? What sort of availability are you looking for? 98% or 99.9999%? When you say MySQL are you already running master/master? Do you have monitoring setup to track when certain limits are about to be hit so you can respond before they impact the site? –  polynomial Oct 5 '11 at 3:04
    
@ warren So when it gets 1000's of hits it does not go down. @polynomial The data changes all the time (the main problem) the slaves need to be access really in a which one has the least load on it. MySQL is currently just a single server, serving the data to WP. We do know a little bit when sites will increase load, but there is not much we can do apart from add more ram and bandwidth. –  David Maitland Oct 5 '11 at 9:00

1 Answer 1

up vote 4 down vote accepted

A wordpress instance with a decent cache (Wordpress SuperCache comes to mind) should help a lot in serving a very heavy wordpress site.

But the first thing you need to do is identify where your bottleneck is. If your database engine is fairly light on, but there's a lot of server-side post-processing of data, then simply scaling out your web servers may help with this, and have them all connect to the same back-end database.

In this scenario, all you need to do is rsync your files to/from eachother every few minutes, or if that's not enough, then using some sort of distributed file system (I only know of DFS in Windows, I'm not much of a *nix guy).

That's the way Stack Overflow and the Stack Exchange websites work. According to their latest blog post, their infrastructure hasn't changed too much in the last 2 years or so. Just one massive database server for Stack Overflow1 serves a grand total of six Stack Overflow web servers (3 of them dedicated to just SO).

So, if an incredibly complex website like Stack Overflow that serves about a hundred requests per second, 24 hours a day, can get away with a single DB server, I'd suggest that Wordpress with a good caching plugin should be fine for all but the most insane workloads with a single DB server, which makes scaling out much, much simpler (once your infrastructure is set up correctly, just throw more front-end webservers on it).

1OK, so there are two database servers, but the way MSSQL clustering works is that only one database server is ever active at one point in time. So the clustering only provides high availability, not scaled-out performance.

share|improve this answer
    
Thanks, I think I'm going to put the DB server on an external server on the same network then have several apache servers which access a shared file server of the web files. –  David Maitland Oct 5 '11 at 9:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.