24 Ways has an excellent article on using Google App Engine as your own Content Delivery Network, showing you how easy it is to set one up.
A CDN is a network of servers around the world to serve content from your site from the nearest physical location. All the large sites (Yahoo, Google, Amazon, etc) use them.
After reading the above post, I was also curious to find out how if Google App Engine helps in the following:
- Expires headers and versioning
A comment in the original post implies compression is on by default, which is what I’d expect.
At the same time, if you change such a file you want to be sure your repeat visitors will not see the old one because it was cached far into the future.
So, with a simple URL Rewrite Rule we can make things like
/css/version-1/site.css point to
If you update
site.css, you can change the version number. Browsers will not have a file from this new path in their cache so will download it and cache it into the future again.
Is it possible to do this with Google App Engine? It looks promising…
If I can find a spare moment, I may try this out on this site (which, admittedly doesn’t get that much traffic to make it worth bothering about!) — and then I’ll try it on a site that takes up most of my spare time, which gets a LOT of traffic, where it would actually be worth doing!