Hi.
I'm currently working with Moodle and trying to improve the performance of a local installation. One of the things I've noticed is that under load, a good deal of time in apache gets spend sending out static files associated either with themes or modules.
Particular files in this are styles.php, javascripts, and image files. To help reduce the load of this, I would like to serve these files through a separate webserver for static content or (possibly) a CDN. Is there support in Moodle for this? If not, do people think it would be possible to write a module to make this work?
Thanks,
Corprew
I may be mistaken here (sure others will say if so), but in your config.php file in your www root folder you specify:
$CFG->wwwroot = 'http://www.mysite.com';
$CFG->dirroot = '/home/mysite/public_html';
$CFG->dataroot = '/home/mysite/moodledata';
would imagine (again educated guess here) that your CDN files could live in the:
$CFG->wwwroot = 'http://www.mysite.com';
$CFG->dirroot = '/home/mysite/public_html';
and your data files on your different server:
$CFG->dataroot = '/home/mysite/moodledata';
The issue is that a relatively large numbers of the file that i'm looking at are actually accessed through $CFG->wwwroot -- not just the data, but also the static images and javascript that are part of the theme.
I've gotten the general sense that this might be more possible in 2.0, but it would save time to be able to achieve it today.
I've gotten the general sense that this might be more possible in 2.0, but it would save time to be able to achieve it today.
again (could be off here) - but couldn't
$CFG->dirroot = '/home/mysite/public_html';
point to the CDN as well?
This might help you too: http://moodle.org/mod/forum/discuss.php?d=128468