Using CDN's to cache source downloads?
Auke Kok
sofar at foo-projects.org
Sun Jun 26 23:56:44 CEST 2011
I've been messing around with some new plugin ideas, and I came up with
the idea to write one that makes lunar fallback to using a CDN for
failed downloads. This would provide a great extra mirror service at
almost no cost to implement to us (and, coral CDN already does this for
free for anyone).
Here's how it works:
1) we "seed" the CDN.
Basically, we run a script daily on a machine that finds all the
compatible URL's in moonbase, and goes and tries to "download" these
URL's through the CDN. After that, the CDN has a cache, and anyone can,
at a later stage get a copy through the CDN.
We don't need to actually download the entire thing to seed it. Just
doing a "HEAD $URL" is enough to make the CDN get the file for us, so
this is extremely efficient.
2) we add a plugin that downloads the source through the CDN instead of
directly.
I already wrote the plugin, and a basic seeder. I'm wondering if people
think this would be useful or not. Also, it's entirely dependent on the
reliability of the CDN itself.
Ideas? feedback welcome. See attached code for details.
Auke
-------------- next part --------------
A non-text attachment was scrubbed...
Name: seeder.sh
Type: application/x-sh
Size: 367 bytes
Desc: not available
URL: <http://foo-projects.org/pipermail/lunar/attachments/20110626/18c44164/attachment.sh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: download-zz-coral-cdn.plugin
URL: <http://foo-projects.org/pipermail/lunar/attachments/20110626/18c44164/attachment.ksh>
More information about the Lunar
mailing list