PDA

View Full Version : Google as CDN


cory_booth
02-08-2010, 11:32 PM
Well in an effort to provide the fastest experience for my users I started looking at CDN or Content Delivery Networks. For those who don't know, CDNs deliver various items for your website so your site platform isn't tied up doing it. In this case I moved my /images/ directory to this service and now my images come from Google rather than my "shared" webhost making my rendering much faster. Items like my smilies, avatars, and things render much quicker.

To do this I followed the instructions here:
http://www.digitalistic.com/2008/06/09/10-easy-steps-to-use-google-app-engine-as-your-own-cdn/

I used the Python version.

NOTE: Google will only allow 3000 images, so when you build your deployment, remove all thumbs.db, index.html, etc... and make sure you have 3000 or less.

Then I modified the path for my smilies to mysite.appspot.com/images/smilies/
I modified the path for my avatars and other items as well.

A key SQL statement you might want to try:

UPDATE `smilies`
SET 'smiliepath' = REPLACE ('smiliepath', 'images/', 'http://mysite.appspot.com/images/')

or similar.

You can also change the image base for sitewide graphics like gradients, buttons, and siteicons in the ADMINCP -> STYLES -> STYLEVAR -> IMGDIR

While I could answer some basic questions here, I can't offer much support for the directions posted in the link as I am too new to the app engine to fully understand how it works.

Now....

I know someone will say, "this isn't a REAL CDN because it doesn't change the delivery location based on the user's location"... Yes, you are right... But unless you are willing to pay $1000 a month for that type of service, this method does something very similar and works great for "free"...

ChopSuey
05-28-2010, 05:32 AM
Anyone else using this? I would like to see some results..

evildon
09-03-2010, 03:06 AM
Hi, it seems the tutorial is not available at the moment..

Can you please tell how to do that for vbulletin 4 ( something like steps )

Thanks

final kaoss
09-03-2010, 03:15 AM
So if it works so good, why remove the article?

A problem occured while loading the plugin: ort_maintenancemode -> Warning: fopen(/home/.jacobina/linea/monolinea.com/files/ort_maintenancemode-config.txt) [function.fopen]: failed to open stream: No such file or directory on line 145

A problem occured while loading the plugin: ort_maintenancemode -> Warning: fwrite(): supplied argument is not a valid stream resource on line 148

A problem occured while loading the plugin: ort_maintenancemode -> Warning: fclose(): supplied argument is not a valid stream resource on line 151

The page you tried to reach could not be found in the server. This might be because of an outdated link or a server error.

You can try going to the homepage, following the links from the navigation bar, or the search form above.

Videx
09-03-2010, 11:21 PM
Since most images are being served from the viewer's own local cache, I wonder how effective this solution could really be? And I wonder what chaos would ensue when you reached the 3000 image limit?