We've been asked to setup a multi-site environment for around 40 schools on a single server in a virtual environment. As things stand we are unsure of the number of concurrent users. Is 40 sites on one server a good idea, or is it better to build more servers with less sites?
OSwise were either going for CentOS or Ubuntu server. Are there any resounding arguements for one over the other?
In terms of the Moodle install we'll be responsible for the system end only, including any site upgrades. The schools require individual sites accessed via sub-folders of the same URL so, http://somewhere.ac.uk/school1, http://somewhere.ac.uk/school2, etc. However, if it makes managing the setup easier we could possibly go for one site as long as the access could be seperated for each set of users, so courses only accessible to a group of users, seperate theme's for groups of users, etc (an administrator account with access to everything isn't an issue). Is this possible and more importantly, is it a good idea???
If the idea of one site for different schools is not a good idea and we would be better off going for seperate code-bases, I dont like the idea of having to maintain and more importantly upgrade 40 sites! I've read the following post - http://moodle.org/mod/forum/discuss.php?d=96607#p427118 which suggests this is possible, but with a few limitations. Has anyone implemented this or something similar, are there any recent updates and more detailed documentation available?
Thanks in advance!
- What performance stats are you going to measure on your servers, in order to ensure you find out before they get too slow?
- When the load appears to get too high, how quickly and easily can you move half the sites off onto a second server?
I would keep each site completely separate. A Moodle upgrade, at its most basic, is:
- Copy in the new Moodle code.
- Visit the admin page to allow Moodle to self-update.
- Make a clone of the site.
- Upgrade the clone (as above) while monitoring for errors.
- Quick sanity check of the ugpraded clone to check that there are no obvious problems.
- Take a backup copy of the real site.
- Upgrade the real site (as above).
- Monitor the site more carefully for a while.
Separate sites for each school is definitely the better way to go in my opinion.
Performance-wise we'll be using the monitoring tools built into VMware virtual centre, as well as alerts to notify for high memory, CPU, disk and network I/O.
We're in a bit of a quandry here as we've only had funding for two low spec servers (live and test - 1xCPU, 1GB RAM), so if performance is poor we'll have to look to request funding and increase the specifications. I suppose it wont be easy to move the sites to another server off the top of my head as they'll be accessible as sub folders from the same URL, unless we look at load balancing, etc - but this is way off.
Thanks for the advice, I definately see the benefits of having a code base for each environment. But there will be so many similularities, with one developer and administrator responsible for all sites. They also want a common look and feel with possibly slightly different themes (ok if modules and theme's are available to all), but no individual code hacks.
- A directory of code
- A directory of uploaded files
- A database
- A DNS entry/server config to make that appear at the right URL
My only issue is that the sites require a common base URL so - http://somemoodle.ac.uk/site1 with a DNS alias pointing at a server. Splitting this out over two servers would be messy as we don't have a load balancer in place to create a virtual IP over the top. That is unless we write re-directs but that would rely on the first environment being up.
I agree on the amount of RAM, it petrifies me to be honest!!!
You seem like the expert on this subject, so I thought I'd give it a shot...
Ive had no problems up to this point with installs.
I am trying to set up a sub folder with everything the parent moodle folder has, I've set up the database for it, set up the config.php file and when i go to the domain.com/subfolder/install.php, it redirects me back to my original domain.com/moodle/login.php - skipping past any sort of set up for my server.
I've hit a glass ceiling in my knowledge base and i'm going to the experts.
Thanks in advance for the reply.
set up the config.php file
If you go directly to /install.php and get redirected, check to make sure your config.php is not re-directing to the original site URL.
Also check that the sub directory is accessible via the web - put a file like domain.com/subfolder/touch.html in there and see if you can browse to the file.
> (I don't know enough about Moodle performance to know if 40 sites/server is anywhere near the right ball-park.)
Its really just not adequate to talk about the number of sites - it all depends on the usage of the sites (and also specs of the servers ).
Tim gives great advice about monitoring usage and reacting to it- unless you are transferring massively used moodles across its almost certain that you'll start off being able to handle load fine while usage builds up on practically any spec of server, dealing with growth is the key .
I think we host one one of the largest sets of moodles that are known about in the community, we are approaching 800 moodle installs and the growth is continuous - see graphs:
But I would guestimate that the majority of our load comes from the top 20 most active schools (though we do have schools ranging from thousands to less than 20 pupils).
The codebase question is just one of manageability, if we had more resources i'd love to be able to give each school the option of their own custom modules but this is just not practical in terms of technical limitation, support and training needs.
As far as usage goes I cant even give any guesses at this point, it's almost a suck it and see! As with your scenario our schools will range massively in numbers and I suspect that we'll have 2 or 3 which are extremely active.
When we take this project on we'll be contracted for upgrades and support for so many hours per year. I want to give our customer best value for money in this sense which is why I really like the single codebase idea to cut down drastically on upgrade times (and the fact that the sites will follow a similar look and feel). I realise we could script part of this for multiple sites, but it's new ground for us so the research alone would eat into our allotted time.
I'd really like to hear more on your setup. Do you have any setup documentation which you would be willing to share? Also, can you confirm what limitations there are with a single codebase as compared to multiple sites?
We do the sub folder type thing like you do. It is kind of a pita to do upgrades because we have to touch all of the sites to do it. We are getting more into bash scripting now and we can almost get it done completely now except for the clicking on the upgrade button for each site. So it is possible to manage just kind of tricky and time consuming.
I think 40 VMs using VMWare on a single machine is probably unlikely. Esp given the hardware specs you list further down the thread. I say this just from the perspective of the overhead of running the individual operating systems, esp the memory they will need. This is before you even r serve a single page of Moodle content. I believe VMWare VM count is normally optimal for around 10 virtual machines, at least without going to a pretty high end server and with a fast SAN behind it.
There are lighter virtualization methods that don't offer quite as much isolation and control per VM but do allow for a higher number of VMs. The lightest but least isoloation/control is probably apache virtualization.