Coral CDN

From Open Source Ecology
Jump to: navigation, search

CoralCDN site:

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.


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.


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.


OSE and Coral

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 )

Bypassing Coral

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

OSE Configuration

This is the .htaccess configuration we have:

RewriteEngine On
RewriteRule ^wiki/(.*)$ /w/index.php?title=$1 [PT,L,QSA]
#RewriteRule ^wiki/(.*:.*)$  wiki/index.php?title=$1 [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]
# RewriteRule ^/*$ /w/index.php [L,QSA]
# RewriteLog "/home/marcin_ose/" 
# RewriteLogLevel 3
# To disable CDN, load
RewriteRule . - []
Header append X-Coral-Control "redirect-home"
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]
# Comment rule above to enable FULL CDN access
RewriteCond %{QUERY_STRING} !^.*attachment_id=.*$
RewriteCond %{QUERY_STRING} !^.*title=Special:.*$
RewriteCond %{QUERY_STRING} !^.*\/Special:OpenID.*$
RewriteCond %{REQUEST_URI} !^.*\GoogleSearch.*$
# ----
RewriteRule ^(.*)$$1 [R,L]
RewriteCond %{HTTP_USER_AGENT} !^.*Googlebot.*$
RewriteCond %{HTTP_USER_AGENT} !^CoralWebPrx
RewriteCond %{QUERY_STRING} !(^|&)coral-no-serve$
# For things like
RewriteCond %{QUERY_STRING} MediaWiki:[a-z]+\.css [NC]
RewriteRule ^(.*)$$1 [R,L]