Saturday, September 11. 2004Gallery and the Coral Distribution NetworkTrackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
Wow, coolness. Had never heard of Coral.
PS - Rasmus - update your toys page more often - it rocks!
Wow, this is really cool. I have never heard of Coral at all before, this rocks.
The only thing that sucks a bit is that Google ads don't automatically load when the link is accessed via their system. I think I will certainly begin using this system to reduce some of my bandwidth costs
The link through coral does not appear to be working at the time this comment was posted. Tried it twice just to be sure.
You don't need any code...all you have to do is use the MirrorURL feature already present in Gallery.
Point the mirror URL to the coral url of your albums directory...Gallery will try to check the lock/dat file there, find that it is identical to it's local copy, decide that it is a valid mirror and point the IMG tags to the Coral Web Cache URL. Done ! No problems with any links/cookies/etc not working. And anyway, you will keep serving the HTML pages from your server, and the bandwidth-hogging photos from the Coral Cache (I've observed that the CDN cache is getting thrashed so much that things fall out of the LRU cache pretty quickly nowadays). Try it out, you'll eliminate all your cookie/link problems...moreover, your click counters will be accurate.
Right, but I only want stuff to come from CDN if the user chose to use CDN by accessing my data via CDN. I don't see how to do that via the MirrorURL feature.
Right on rasmus! Welcome back. I was beginning to think that maybe you died.
I went a level lower:
ServerName www.nirvani.net RewriteEngine On RewriteCond %{REQUEST_URI} ^/misc/.+ [NC] RewriteCond %{HTTP_USER_AGENT} !CoralWebPrx [NC] RewriteCond %{HTTP_USER_AGENT} !GoogleBot [NC] RewriteRule . http:\/\/www\.nirvani\.net\.nyud\.net:8090%{REQUEST_URI} [R] Jeremy
Let's try that with some formatting:
ServerName www.nirvani.net RewriteEngine On RewriteCond %{REQUEST_URI} ^/misc/.+ [NC] RewriteCond %{HTTP_USER_AGENT} !CoralWebPrx [NC] RewriteCond %{HTTP_USER_AGENT} !GoogleBot [NC] RewriteRule . http:\/\/www\.nirvani\.net\.nyud\.net:8090%{REQUEST_URI} [R] Jeremy
Very neat!
Content Distribution Networks are way interesting, aren't they? It's a little annoying, however, that Coral runs off a non-standard port and makes use behind restrictive firewalls and/or proxies somewhat limited. Oh well. |
Why a toys page?I love geeky toys and people are always asking me about them. So this page is where I keep track of the gadgets that interest me.
QuicksearchMy LinksPopular EntriesTemplate dropdownBlog AdministrationCreative Commons |