Moodle and Content Distribution Networks (CDNs)

Moodle and Content Distribution Networks (CDNs)

by corprew reed -
Number of replies: 3
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
Average of ratings: -
In reply to corprew reed

Re: Moodle and Content Distribution Networks (CDNs)

by Ken Gibson -

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'; 

In reply to Ken Gibson

Re: Moodle and Content Distribution Networks (CDNs)

by corprew reed -
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.