Comments on: Magento and Amazon’s CloudFront CDN – The Easy Way http://www.aschroder.com/2011/05/magento-and-amazons-cloudfront-cdn-the-easy-way/ Notes on Web Development Wed, 23 Dec 2020 09:25:05 +0000 hourly 1 https://wordpress.org/?v=4.8.15 By: Kalen http://www.aschroder.com/2011/05/magento-and-amazons-cloudfront-cdn-the-easy-way/comment-page-1/#comment-10366 Thu, 20 Jun 2013 16:02:31 +0000 http://www.aschroder.com/?p=1472#comment-10366 Implemented a little MageRun command to refresh skin and JS url’s:
https://github.com/kalenjordan/magerun-addons/blob/master/README.md#bust-frontend-browser-caches

]]>
By: Kalen http://www.aschroder.com/2011/05/magento-and-amazons-cloudfront-cdn-the-easy-way/comment-page-1/#comment-10285 Fri, 31 May 2013 21:53:01 +0000 http://www.aschroder.com/?p=1472#comment-10285 Definitely re: the invalidation approach. I think I’ll go that route.

Have you done any analysis on the difference in page load speeds with cloudfront? Or maybe there are generic non-Magento-specific ones out there.

I just did some comparison against my current host and at one point both were being served up in about 100ms. Then a few minutes later my host was at around 400ms and cloudfront was still around 100ms.

]]>
By: Ashley http://www.aschroder.com/2011/05/magento-and-amazons-cloudfront-cdn-the-easy-way/comment-page-1/#comment-10248 Wed, 22 May 2013 02:10:51 +0000 http://www.aschroder.com/?p=1472#comment-10248 @Raul Who’s your host? Flickr just announced they’re giving away 1TB of image storage, seems like hosts need to lift their storage game!

]]>
By: Raul http://www.aschroder.com/2011/05/magento-and-amazons-cloudfront-cdn-the-easy-way/comment-page-1/#comment-10246 Tue, 21 May 2013 21:54:03 +0000 http://www.aschroder.com/?p=1472#comment-10246 This solution is compelling,
However, what happens if I have a hosting with limited space and only want to host original images and send all derivative ones (thumbnails, feature images, etc) to Amazon S3.

Do you think in this case, the extension would help us saving space by always uploading it to S3 and not caching the images in our hosting, right now we keep running out of space every week and we need to clean the cache to avoid this problem.

Thanks

]]>
By: ashley http://www.aschroder.com/2011/05/magento-and-amazons-cloudfront-cdn-the-easy-way/comment-page-1/#comment-10239 Mon, 20 May 2013 21:29:17 +0000 http://www.aschroder.com/?p=1472#comment-10239 Hi Kalen, thanks for the feedback.

I have seen that extension and agree that it seems like quite a lot of overhead.

I think a better way would be to change the .htaccess to treat a certain type of subdirectory in the path as not being there.

For example:

http://www.yourstore.com/content-2013-05-21/skin
http://www.yourstore.com/content-2013-05-21/js

So those just get mapped to the underlying skin and js directories.

This way the extension could simply change the base url to the new date (or whatever pattern you like, maybe unix timestamps) to cause a full invalidation of all static assets. Then Magento’s built in URL functionality should ‘just work’, right?

]]>
By: Kalen Jordan http://www.aschroder.com/2011/05/magento-and-amazons-cloudfront-cdn-the-easy-way/comment-page-1/#comment-10238 Mon, 20 May 2013 20:55:55 +0000 http://www.aschroder.com/?p=1472#comment-10238 Thanks Ashley! Great resource here. I know a few people in the comments asked about a module to help with the cache-busting. I recently stumbled onto this module by Guidance:
https://github.com/gknoppe-guidance/magento-cachebuster

I’m checking it out myself now. Haven’t deployed it yet. I think the only thing that I’m wondering is what the performance hit looks like. The way that it works is that it observes controller_action_postdispatch, parses and replaces the HTML using regular expressions.

]]>
By: Azzam http://www.aschroder.com/2011/05/magento-and-amazons-cloudfront-cdn-the-easy-way/comment-page-1/#comment-10140 Sat, 27 Apr 2013 20:12:51 +0000 http://www.aschroder.com/?p=1472#comment-10140 @Jan,

I agree with you, that is definitely a smarter way of doing it. But, what about the https?

]]>
By: Serge http://www.aschroder.com/2011/05/magento-and-amazons-cloudfront-cdn-the-easy-way/comment-page-1/#comment-9685 Mon, 11 Feb 2013 10:56:11 +0000 http://www.aschroder.com/?p=1472#comment-9685 I would also suggest to have a look at GoGrid cdn which is edgecast reseller and it is so much faster than Amazon cloud front!
http://blog.ryankearney.com/2009/12/comparing-cdn-performance-part-2/

]]>
By: Jan (naturkost.com) http://www.aschroder.com/2011/05/magento-and-amazons-cloudfront-cdn-the-easy-way/comment-page-1/#comment-9670 Mon, 04 Feb 2013 23:21:43 +0000 http://www.aschroder.com/?p=1472#comment-9670 Great post, thank you.

But instead of the original domain (as origin for the static files) like http://www.domain.tld I recommend setting up an own host for just that purpose, e.g. cdn-origin.domain.tld and to configure the host in a way that only the directories /media, /skin and /js can be accessed.

This will prevent your setup from producing duplicate content.

]]>
By: Raphael Suzuki http://www.aschroder.com/2011/05/magento-and-amazons-cloudfront-cdn-the-easy-way/comment-page-1/#comment-4975 Sat, 01 Sep 2012 23:02:51 +0000 http://www.aschroder.com/?p=1472#comment-4975 Well, this method won’t invalidate OnePica extension at all, since it is aimed primarly at S3 and other CDNs without custom origin pull support (CloudFront support is relatively new).

Otherwise great article, Ashley, as always!

]]>