I am currently facing a challenge were I must load balance a series of domains for a client/friend, but there are some issues that I've been unable to fix just yet, allow me to explain:
* Solution must be a low-cost solution as money is a determining factor here.
* Client currently only has 2 VPS servers (and can't afford to get more)
* Server specs are: 2.3 GHz monocore CPU, 1 GB RAM, 20 GB SSD Storage (both of them).
* Both servers are running Debian 7.5 Wheezy.
* Client has already installed and running zPanel in one of the servers and has configured a series of Wordpress sites.
* Client uses some WP Plugins to generate content, this hangs the server every time as CPU consumption is a lot.
* I have transfered the DB Server to the second server to help leverage the load.
* Client can't afford downtime in the websites.
* Just managed to convince him that zPanel would not be necessary (I will write a couple of bash scripts to automate vhost creation and wordpress configuration).
My question/challenge here is: How can I help leverage CPU load in the server with little to no downtime?
I have read about HAPROXY and I know for sure that this would be relatively easy with nginx, but the main setup is done with Apache and one of the sites refused to work properly under nginx (still can't figure out why, probably .htaccess or the use of some other Apache Module, I haven't investigated enough).
Any ideas? Any help is much appreciated.
I have been analyzing its code and it's not optimized at all (not that I was surprised when I found out), it seems to not have any kind of limitant on how many posts it creates on the wordpress site (it creates posts to the DB) and it hogs up all resources. I have convinced my friend/client that the best way is to avoid using that plugin for now until it is optimized (by me, obviously... sigh), and it seems like we will start using some kind of caching system as well as CDNs to leverage the toll the sites take with traffic (I'm not really worried about that).
All in all, I guess it'll come up as a total rewrite of the plugin he is using and implementing a caching system along with a CDN system for static files as suggested in your comments.
Thanks a lot again for all your help!