2

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.

David Maitland
  • 119
  • 1
  • 8
  • why would a wordpress instance need to be distributed, redundant, and/or high-availability? – warren Oct 04 '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 04 '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 05 '11 at 01: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 05 '11 at 03: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 05 '11 at 09:00
  • @Mark Henderson - my inquiry was to solicit more information. I am keenly aware that *some* software does have a need to be HA/distributed/etc. Perhaps "your" instead of "a" would have been a better choice of wording. – warren Oct 05 '11 at 14:12

1 Answers1

3

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.

Mark Henderson
  • 68,823
  • 31
  • 180
  • 259
  • 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 05 '11 at 09:33