Page 1 of 1
Optimal cluster setup for scaling plesk web hosting
Posted: Sat Feb 27, 2010 11:32 pm
by strebel
Seems this is the best place to ask this question as parallels support is pretty poor.
We will be moving to a new datacenter provider soon and I want to do a a little forward thinking as we start to scale. What is the best config/setup to manage many thousands of vhosts with plesk? Seems plesk expand is defunct now so need to find a decent infrastructure setup.
What does the ideal setup look like?
We'll have access to a SAN so diskspace is not a problem.
Just want to consider how best to scale from 1 plesk server to many, considering failover protection, backup solutions, 500-1000 vhosts per server, etc.
Would love to hear some feedback on how to approach this from a server infrastructure POV
Re: Optimal cluster setup for scaling plesk web hosting
Posted: Sun Feb 28, 2010 11:11 am
by scott
There are a lot of ways to do it, probably one of the more transparent models (meaning easy) is to use vmotion with vmware. I'd also say adding a load balancing layer with acceleration (squid, nginx, haproxy, etc) in front of cluster of any kind would yield considerable benefits in flexibility and performance. This can usually make up for the latency you get from virtualization.
Re: Optimal cluster setup for scaling plesk web hosting
Posted: Sun Feb 28, 2010 1:31 pm
by breun
If you'll be doing 500-1000 vhosts on a single server, don't forget to enable piped logs for Apache:
http://kb.parallels.com/en/2066
Re: Optimal cluster setup for scaling plesk web hosting
Posted: Sun Feb 28, 2010 2:41 pm
by strebel
scott wrote:There are a lot of ways to do it, probably one of the more transparent models (meaning easy) is to use vmotion with vmware. I'd also say adding a load balancing layer with acceleration (squid, nginx, haproxy, etc) in front of cluster of any kind would yield considerable benefits in flexibility and performance. This can usually make up for the latency you get from virtualization.
could you elaborate a bit? I am kind of a newb on server setups.
How many servers, doing what tasks, is ideal.
1 server for mysql, 2 for plesk?.. where does the failover protection come in? does that require another server?
Thanks
Re: Optimal cluster setup for scaling plesk web hosting
Posted: Sun Feb 28, 2010 4:46 pm
by strebel
read the lighthttp will drop in replace apache on plesk.. how will lighty handle a clustered environment?
Re: Optimal cluster setup for scaling plesk web hosting
Posted: Sun Feb 28, 2010 8:59 pm
by scott
Vmware for example has an abstraction layer for clustering. The virtual machine(s) will move dynamically between the hardware nodes, thats a nice design for HA but it wont perform like a dedicated box will. Hence the acceleration layer, which is a good idea no matter what you're doing. I heard a joke once describing clustering... Better, Faster, Cheaper (pick any two).
Anyway, thats one way. Another would be a more elaborate distributed plesk install where you have web server nodes, mail server nodes, etc. Generally a good place to start with that is mail, the Maildir format is NFS aware so you can safely distribute mailboxes across N nodes using that (or GFS) without a whole lot of extra configuration work. You just mount /var/qmail/mailnames across N servers and you're done.
Apache is a bit different, Bruen already mentioned piped logging. Thats pretty critical for performance, but apache itself can be a bit touchy if you've got multiple daemons talking to the same files you can run into conditions where the first one that gets there wins (and potentially lose data).
Re: Optimal cluster setup for scaling plesk web hosting
Posted: Mon Apr 12, 2010 3:28 pm
by zwankie
Hi,
This relates to the Piped Logs setup mentioned above.
I noticed that webstats were suddenly not showing recent data.
A closer look showed that the domain access_log were not being updated, therefore the webstats will not have any data to update from. Further investigation showed that the logs stopped working on a specific day so I checked the yum logs to see what was done on that day as an update could have caused this.
It turned out that the following was done on that day:
Yum installed:
mod_dav_svn
php-jpgraph
php-pecl-apc
php-pecl-memcache
And Apache was set to use Piped Logs as per this Parallels KB Article:
http://kb.parallels.com/en/2066
It seems that the Piped Logs caused Apache not to log the access_log for each domain with the access_log files being 0kb, even though access_ssl_log was logging just fine.
I changed the
http://kb.parallels.com/en/2066 article to "false" and reconfigured Apache and the access_log files immediately started getting data again.
How should Apache be configured to Pipe Logs for over 300 domains while still retaining a proper working Webstat system?
Re: Optimal cluster setup for scaling plesk web hosting
Posted: Sun Apr 18, 2010 3:56 am
by breun
Re: Optimal cluster setup for scaling plesk web hosting
Posted: Sun Apr 18, 2010 4:56 am
by zwankie
Thank you Breun,