Skip to content

24 ways to impress your friends

Using Google App Engine as Your Own Content Delivery Network


Comments are ordered by helpfulness, as indicated by you. Help us pick out the gems and discourage asshattery by voting on notable comments.

Got something to add? You can leave a comment below.


One thing I lose out on by using GAE for hosting my static files is the ability to fine tune the expires headers. I prefer to set far futures expires headers (set to 10 years). GAE seems to set the expires headers to 7 days, without the ability to tweak it.

Matt Riggott

Carson: your files will be served from a CDN if you host them on App Engine. In its description of App Engine, Google notes that “Google App Engine lets you run your web applications on Google’s infrastructure”. Google’s infrastructure includes servers all over the world, and a CDN.

Johns Beharry

This was a very interesting read, never knew Google provided a service like this. Gotta try this out sometime but for now I don’t have that many visitors and well… My own site isn’t even up yet lol

Thanks for the enlightenment


Great article. I’ve kept an eye on this service for a while now but never bothered to try. Love the CDN idea, especially if one serves a global audience. At this point in time Google is still lacking some features – but hey, there’s always room for improvements with such a new service…


You say you use it for your site, but I don’t quite get how you use your own domain name. Can you give us a quick howto on that please.


“Aral found the biggest problems while using App Engine as a web application platform;”

You can run Django on it, but maybe that doesn’t fit everyone.


Thanks for the tip. I was thinking using it to publish some python app but never thought about using it as a CDN. It’ may not be as good as a dedicated CDN solution, but it’ will do the trick for what I need.


I have personally tried GAE myself. It is really a nice to decent CDN for small to medium sized websites. GAE even shrinks your JS and CSS files down a whole lot which other CDN providers don’t do.

Anyway GAE is free, so you should not expect as good latency compared to Amazon cloudFront which is expensive. I can only say it is as good as Amazon S3 latency if you really have to compare it.

Great article!


Great article and intro to App Engine, I wasn’t aware of this service at all! I shall definitely be having a play with this one as it could come in really handy for small sites.

Thanks for sharing Matt!


There is also Google Sites and Google Pages, I have been using Google Sites service as a CDN several years ago. It allows to upload files and content, similar to geocities I suppose. But there is nothing stopping you from using it as a CDN, it’s on Google’s servers too.


The use you are describing for GAE doesn’t actually make it anything like a CDN as you correctly define it initially. What you describe from GAE is just free file hosting. I would suggest if people are looking for a real CDN solution they look at Amazon’s CloudFront: CloudFront isn’t free but it is pretty cheap.


I’m not sure that it is technically correct to call it a CDN is all. You don’t have any indication that they are going to try to serve your files from anywhere in particular or even the closest location to the requesting origin.

Andrew Spittle

Thanks for the great article. It was really great to be able to read it and completely understand what you were writing about. It made it accessible enough that I’m considering moving my own site over to it once I finish it’s design.

Jobst von Heintze

Interesting idea, but some questions come to my mind. Being a photographer by myself and now working on a re-design of my webpage a global CDN sounds like an ideal solution to deliver high rez imagery to a worldwide audience. Looking at your site I ask myself now:

1. Did you measured any performance increase at all? You don’t have quite a lot of content on your site, but heard anything about a significantly increase in performance from other site owners using this technique?

2. Your Google PageRank is quite high for such a small and young site. Any ideas if this is due to your direct link from this post or has anything to do with using Google as CDN?

3. Somebody mentioned, that .js and .css get compressed by Google. Although this would be beneficial for my AJAX/.js heavy page (work in progress example does the user has any control about the compression? For some reasons some compression methods I used before interfered with the functionality of the code. (Yes I know, it might be due to some bugs in the code, but this compression then would introduce a whole new debugging cycle of something that worked before…)

Anyway, thank you for this article – it made me thinking about things from another perspective!

Will Chow

Nice writeup, quicker to the point than others on the same topic.

BTW, GAE just increased their limits (e.g., 10MB file size):

Constantin TOVISI

Nice find!

However I’m not sure how is Google going to cope with this when people are going to start using this on a larger scale.

I’m afraid that they’ll find a way to restrict this, the same way they were restricting the use of Gmail to emulate an virtual drive, because this is not the purpose these applications were meant for in the first place.



Sounds interesting but I think I’d like to see some evidence that Google are serving up my files from the closest location. Potentially they could be making them further away than on my own server.

This, and a number of other free services, look like a good way of spreading the load of a popular site across a number of servers without the need for expensive hosting.

@Jared – I see your point but that sounds more like Google covering its back. They’re only providing a free service so they don’t want to be financially responsible for any loss of data. Also, if I’m serving up static files to the whole world via the internet I’m not that worried about Google having access to them as anyone on the internet can access them.

Nils T. Devine

Just set this up following the instructions. Not hard at all. The only tip I’d have would be regarding the app.yaml file, copy it from the .zip, not the web page or the .txt to avoid tab characters that will prevent compiling.


I’m trying to find a system that will allow me to use (and modify) a single shared file (ie: a stylesheet that is used on several different sites) without having to manually edit each copy of it.

Could I configure the GAE to do this in any way..? Was thinking a carefully crafted folder structure might be an option.

So could GAE roll out the modified file to multiple domains..?

Any ideas would be awesome. Or if someone knows of some type of SVN system they could point me to.


Let’s not be too naive: nothing’s free here. If you want to trade hosting costs to let Google keep in-depth stats on every visit and visitor to your website forever, as well as copies of everything you upload—then go for it.

But, before you do, here’s some highlights from the app engine terms of service:

Google can censor you
5.2. Google reserves the right (but shall have no obligation) to pre-screen, review, flag, filter, modify, refuse or remove any or all Content from the Service.

Google can lose your data
5.5. You agree that Google has no responsibility or liability for the deletion or failure to store any Content and other communications maintained or transmitted through use of the Service.

Google can use your brand for free advertising forever
8.2. You agree that Google, in its sole discretion, may use your trade names, trademarks, service marks, logos, domain names and other distinctive brand features in presentations, marketing materials, customer lists, financial reports and Web site listings (including links to your website) for the purpose of advertising or publicizing your use of the Service.

Google can drop your account whenever
10.2. … Google may terminate your use of the Service for any reason with ninety (90) days prior written notice.


Excellent article — Thanks Matt Riggott for making this arcane material downright accessible for a mere user such as I. As I read, I kept expecting to hit the part where the subject sailed away over my head, but that part never came — your text stayed grounded to my level of comprehension throughout.

Looks as if this is something I might-could even do! Wow.

Adam Loving

Matt, great post. I found it while looking to see if anyone had written a tutorial for using App Engine to host static Web sites (I’m thinking of writing one). I really like app engine for apps, but I think it is a great free resource for serving content, as you’ve identified.

Impress us

Be friendly / use Textile