Coral CDN

CoralCDN site: http://www.coralcdn.org/

Coral Content Distribution Network The Coral Content Distribution Network, sometimes called Coral Cache or Coral, is a free peer-to-peer content distribution network designed and operated by Michael Freedman. Coral uses the bandwidth of a world-wide network of web proxies and nameservers to mirror web content, often to avoid the Slashdot Effect or to reduce the general load on websites servers in general.

History
The project has been deployed since March 2004, during which it has been hosted on PlanetLab, a large-scale distributed research network of several hundred servers deployed at universities world wide. It has not, as originally intended, been deployed by third-party volunteer systems. About 300-400 PlanetLab servers are currently running CoralCDN. The source code is freely available under the terms of the GNU GPL. Coral Cache gained widespread recognition in the aftermath of the 2004 Indian Ocean earthquake, when it was used to allow access to otherwise inaccessible videos of the resulting tsunami.

Problems
Some web filtering software packages, such as Websense and OpenDNS, block access to the Coral Cache as it is seen as a form of proxy avoidance. Many anti-virus and Internet Security software packages, such as Trend Micro Internet Security, also block access to the Coral Cache as it is seen as a mask for dangerous URLs.

Full CDN Mode
When Full CDN mode is activated on our server, any non-logged-in user will be redirected to our coralized URL that points to the CoralCDN mirror of our site, thus offloading most of our server's work to Coral, leaving only the initial redirect command to be served by our own web server.

Thus, our server will be able to handle a lot more requests per second, since each request will be replied with an HTTP redirect command, which takes very little CPU time and network bandwidth.

Forcing Coral Use
To force access through Coral, go to this URL: ( which is just a redirect to the coralized URL http://openfarmtech.org.nyud.net/ )
 * http://mirror.openfarmtech.org/

Bypassing Coral
If your country or proxy blocks access to coralized URLs, you should bypass CoralCDN.


 * To bypass it for a given page, append coral-no-serve to the query string, like this:
 * http://openfarmtech.org/wiki/Wiki_instructions?coral-no-serve
 * To bypass it for all pages, simply log in
 * Our server is configured to bypass CoralCDN for all logged-in users.

OSE Configuration
This is the .htaccess configuration we have:

RewriteEngine On RewriteRule ^wiki/(.*)$ /w/index.php?title=$1 [PT,L,QSA] RewriteRule ^wiki/(.*:.*)$ /w/index.php?title=$1 [L,QSA] RewriteRule ^wiki/*$ /w/index.php [L,QSA,T=text/html] RewriteRule ^index.php/(.*)$ /wiki/$1?old-url=slash [R=permanent,L,QSA]
 * 1) RewriteRule ^wiki/(.*:.*)$ wiki/index.php?title=$1 [L,QSA]
 * 1) RewriteRule ^/*$ /w/index.php [L,QSA]


 * 1) RewriteLog "/home/marcin_ose/openfarmtech.org/rewrite.log"
 * 2) RewriteLogLevel 3

RewriteCond %{QUERY_STRING} (^|&)DISABLE-CDN$ RewriteRule. - [cookie=coral-no-serve:1:.openfarmtech.org:60]
 * 1) To disable CDN, load http://openfarmtech.org/anything/really.jpg?DISABLE-CDN

Header append X-Coral-Control "redirect-home"

RewriteCond %{REQUEST_METHOD} !=POST RewriteCond %{HTTP_USER_AGENT} !^.*Googlebot.*$ RewriteCond %{HTTP_USER_AGENT} !^CoralWebPrx RewriteCond %{QUERY_STRING} !(^|&)coral-no-serve$ RewriteCond %{HTTP_COOKIE} !^.*(coral-no-serve|wiki_UserID|comment_author_|wordpress_logged_in|wp-postpass_).*$ # RewriteCond %{REQUEST_URI} ^(/w/skins|/w/images|/weblog/wp-content/themes)|(.*\.(css|js|png|gif|jpg|jpeg|ico|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gz|gzip|ico|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$) [NC] RewriteCond %{QUERY_STRING} !^.*attachment_id=.*$ RewriteCond %{QUERY_STRING} !^.*title=Special:.*$ RewriteCond %{QUERY_STRING} !^.*\/Special:OpenID.*$ RewriteCond %{REQUEST_URI} !^.*\GoogleSearch.*$ # RewriteRule ^(.*)$ http://openfarmtech.org.nyud.net/$1 [R,L]
 * 1) Comment rule above to enable FULL CDN access

RewriteCond %{REQUEST_METHOD} !=POST RewriteCond %{HTTP_USER_AGENT} !^.*Googlebot.*$ RewriteCond %{HTTP_USER_AGENT} !^CoralWebPrx RewriteCond %{QUERY_STRING} !(^|&)coral-no-serve$ RewriteCond %{QUERY_STRING} MediaWiki:[a-z]+\.css [NC] RewriteRule ^(.*)$ http://openfarmtech.org.nyud.net/$1 [R,L]
 * 1) For things like http://openfarmtech.org/w/index.php?title=MediaWiki:Monobook.css&usemsgcache=yes&ctype=text%2Fcss&smaxage=18000&action=raw&maxage=18000