Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 UTC on 18 March 2024, to get $100 off your ticket.
By davidslee9 on
I want to publish the photos, audio, video uploaded by users to a CDN provider's servers (akamai) to reduce the traffic from the drupal servers from serving rich content. Has anyone done this and what it would take to change the modules to do this?
Is it simply changing the storage location from file system to a URL?
Thanks - a newbie who loves drupal
David
Comments
Akamai for audios and videos
For video, you will have to publish them on your site like a regular video file (or audio file). For example, a "akamai-ready.mov" will need to be saved locally on your Drupal web site. So any Drupal video module will do the work.
The Akamai-ready video (and audio) files are in essence a simple XML file embedding URL pointing to Akamai reflectors. The end user thinks he is downloading from your site.
So, yes, you can use Drupal with a CDN like Akamai.
I haven't done any photo through Akamai, though. However, I'm sure you can use Drupal safely for these types of files.
/*_*/
http://www.xmacinfo.com
By the way, CDN's are
By the way, CDN's are Yahoo!'s number 2 way or increasing performance on your website: http://developer.yahoo.com/performance/rules.html#cdn
Actually, here are Yahoo!'s suggestions:
1. Make Fewer HTTP Requests
2. Use a Content Delivery Network
3. Add an Expires Header
4. Gzip Components
5. Put CSS at the Top
6. Move Scripts to the Bottom
7. Avoid CSS Expressions
8. Make JavaScript and CSS External
9. Reduce DNS Lookups
10. Minify JavaScript
11. Avoid Redirects
12. Remove Duplicate Scripts
13. Configure ETags
---
the Hushed Casket | Eric Atkins
Akamai module
At France 24 we are creating an Akamai module to allow Drupal to be correctly
cached by Akamai caching services. We encountered problems caching the
result of some form posts.
Ex: an internet user post a comment. The page displayed does not
contain the confirmation message that indicates the comment has been
submitted...
We have created a module that hooks every submit function used by
Drupal. When a submit is done, Drupal makes a redirect to the orginial
page. On this redirect we add a querystring "?bypass=1" And we
configure Akamai for not caching pages that contains ?bypass=1
We will publish this module xhen it will be correctly tested.
Hi there, is there any
Hi there,
is there any progress developing this module? If there's a alpha/beta, could you publish a snapshot? I'm very interested in using it and maybe could provide help at development.
Bye,
Stefan
Did you find this CDN module?
Stefan,
Did you find this CDN module? http://drupal.org/project/cdn
The author's website says he has plans to improve/upgrade to D6 too. (I would like to use it with D6 as I understand that it already puts multiple css/js files from modules into single css/js files, which much improves perceived page loading speed.)
Not sure if this is important to you, but from memory it's not for Akamai, but another provider CacheFly?
I also read that another project that the author is involved with uses a provider called SimpleCDN.com, and rates them highly, so perhaps the D6 port will work with them out of the box?
Fingers crossed that he has some spare time or a sponsor :)
Yes, I saw the CDN-Module,
Yes, I saw the CDN-Module, but it didn't work for me/Akamai.
I wrote a dirty workaround that checks the referer and, depending on it, leads the user on to the source server or the CDN-mirror. I have to say, my scenario isn't that complicated: all files (sites, media files) are fetched either completely from a source server or completely from a mirror, depending on the server load, so it's easy to switch the complete traffic from one server to the other.
potential solution to use with boost
If you are able to use static page caching that the boost module (http://drupal.org/project/boost) provides, I have a possible solution for you. It's something I've been playing around with and doing some load testing on but it seems like it could work. Boost generates static html pages of your content and lets you hook a pre-process function in (under admin/settings/performance/boost advanced settings).
I wrote this pre-processing function that changes the relative urls to absolute urls that would be pointed at the CDN content. This function changes links to javascript, css, your shortcut icon, and image files to be served off the CDN. It should be fairly trivial to modify this function to change links to your files or anything else. You would also either need to hard code in the cdn url (e.g. "http://cdn.yoursite.com/") to the 'yoursite_cdn_url' variable or you will need to add a place to set this in your site settings.
If you don't want to use boost, you might be able to write a input format filter that would do a similar thing. I haven't evaluated what the performance hit would be for this. Is there any news about this akamai module that was mentioned above?
Quick and dirty way to use css cdn (eg., YUI)
This may be too obvious to merit mention, but...
drupal_add_css doesn't (seem to) work with absolute urls, so I'm simply coding the link in the section of my page.tpl.php file. There may be a more elegant/standard way to accomplish this -- if so, please do tell!
EG: (in mytheme/page.tpl.php)
The simpleCDN module is
The simpleCDN module is brilliant - the only problem is that simpleCDN (the service not the module) have changed the way they do things and no longer offer a mirror service from the end of April. So I will be seeing if something like CacheFly will work with the module instead.
I did a write up on the simpleCDN module here:
http://www.markparrott.com/blog/drupal-website-performance-improve-your-...
See the project page here:
http://drupal.org/project/simplecdn
Note: simpleCDN Module and the simpleCDN service are not directly related in anyway.
UPDATE - simpleCDN restarted
UPDATE - simpleCDN restarted a service called lightening which does work with the simpleCDN module again - I guess they realised how silly it was to change the previous service. It's dirt cheap and provides a mirror on the fly service which is brilliant and super cheap. You can just create a bucket - take the URL and put it in the simpleCDN module and your sorted. I also serve my CSS and some JS files through it also.
Actually, it's not brilliant
Actually, it's not brilliant at all and has no future. It requires custom code for every module that wants to integrate with a CDN.
The right way to go is to patch core to allow every file URL to be altered so the file can be served from a CDN. This is what I did for my http://drupal.org/project/cdn CDN integration module. The core patch has been committed to Drupal 7 so it will allow for a graceful upgrade to Drupal 7 as well.
CDN
CDN (http://drupal.org/project/cdn) module works fine on our D6 site using CDNetworks CDN provider. I configured videos only and Origin Pull.
@Wim: it's great to have your patch committed to D7, no need to re-apply/restore patch during updates.
Drupal CDN
Hey guys-
one quick and easy way to get on a Drupal CDN instructions from MaxCDN.
It works by setting up an origin pull Pull Zone.
--Kevin