Live data from Hacker News

CDN vs S3

jdorfman.posthaven.com

41–50 of 87 posts

Re: CDN vs S3

#41
As the sysadmin to a company that does use both S3 and Cloudfront, I'm a little shocked anyone would think to use S3 for distribution. A little testing will reveal just how slow S3 can be.

Re: CDN vs S3

#42
post #12

Since this thread will likely turn into people asking about Cloudfront performance, does anyone have any real-world experience with CloudFront vs. Rackspace with Akamai CDN? On paper the Rackspace one looks like a great performance/price alternative.

I don't know about Cloudfront vs Rackspace+Akamai, however, based on some quick tests I did a year ago, I seem to recall that Rackspace+Akamai didn't deliver the same performance as professional Akamai services. In my experiments, Rackspace+Akamai used different servers, often located farther away, than big Akamai sites. (If anybody has background information about this, I would be very interested to hear.)

Re: CDN vs S3

#43

Earlier quoted context omitted.

Cloudfront serves an invalid HTTP response, thus Chrome/Firefox refuse to cache the data. The theory is, it is better to not risk caching bad data. Chrome will still play the video served from Cloudfront, but it wont write any of the data to the media cache. Thus when you pause and buffer, it will only buffer a few seconds of video in the current playback window. It never writes to the cache so buffering must stop. T…

Both buffer while paused on Chrome iOS.

Note that Chrome on iOS is basically unrelated to every other version of Chrome. Due to Apple's silly rules, it's essentially just a reskinned Safari.

Re: CDN vs S3

#44
post #12

Since this thread will likely turn into people asking about Cloudfront performance, does anyone have any real-world experience with CloudFront vs. Rackspace with Akamai CDN? On paper the Rackspace one looks like a great performance/price alternative.

I am in the process of abandoning Cloudfront, because they have a serious bug when serving video files. They serve HTTP 206 (Range-Get) as HTTP 1.0 but 206 didn't exist in HTTP 1.0. Chrome and Firefox treat this as "uncacheable", thus media assets bypass the local media cache. Depending on the nature of the content, Cloudfront is not usable for video, particularly the kind where people seek around a bunch, like instr…

If you haven't found a good alternative yet, we'll be happy to help.

/co-founder at Advection.NET

Re: CDN vs S3

#45

obvious: Amazon product isn't that great @ a service that's optimally provided by another Amazon product. http://aws.amazon.com/cloudfront/

@molecule obvious to you and I. I wrote this to inform those who think it is a good idea to use S3 as a CDN, that it isn't. If we can educate a few developers then we (this awesome community of hackers) are making the web faster.

> If we can educate a few developers then we (this awesome community of hackers) are making the web faster.

You're not making the web faster, you're shilling for your employer by comparing their apples to a competitor's oranges and proclaiming "our competitor's oranges make bad apple sauce!"

Failure to mention CloudFront is disingenuous.

Re: CDN vs S3

#46

> I think S3 is a great origin server for static assets Pro-tip: If you're using Rails, just create a distribution with your app as the origin server and in production.rb, set your asset host to your distributions host. You get the asset cache without having to do the precompile step. Tastes great with Heroku.

This is smart, I usually use the precompile with upload to S3 via asset_sync gem. Since Heroku will precompile by default, what do you do to disable it. Just turning on config.serve_static_assets = true is likely not enough.

Re: CDN vs S3

#47

Earlier quoted context omitted.

I am in the process of abandoning Cloudfront, because they have a serious bug when serving video files. They serve HTTP 206 (Range-Get) as HTTP 1.0 but 206 didn't exist in HTTP 1.0. Chrome and Firefox treat this as "uncacheable", thus media assets bypass the local media cache. Depending on the nature of the content, Cloudfront is not usable for video, particularly the kind where people seek around a bunch, like instr…

If you haven't found a good alternative yet, we'll be happy to help. /co-founder at Advection.NET

I'll have a look. Here is what I need:

CDN that support Range Requests correctly. I want to use S3 as the origin. I need an edge location in Australia. Also, there can be no 301/302 HTTP redirects, thus I have eliminated Google as a potential offering. My current spend is around $1000 a month, so it is a tiny account.

Re: CDN vs S3

#48

Earlier quoted context omitted.

Cloudfront serves an invalid HTTP response, thus Chrome/Firefox refuse to cache the data. The theory is, it is better to not risk caching bad data. Chrome will still play the video served from Cloudfront, but it wont write any of the data to the media cache. Thus when you pause and buffer, it will only buffer a few seconds of video in the current playback window. It never writes to the cache so buffering must stop. T…

Oh is that why my Coursera videos suddenly won't buffer for more than a few seconds? I figured it was an optimization, like with YouTube, so they don't waste bandwidth loading videos for people who have the tabs open but won't watch them. Do you know of any workarounds client-side?

> Do you know of any workarounds client-side?

I don't think there is one. You can't even compile a custom Chromium because it doesn't have h264 codecs. I even spend a day reading the Chrome source code, hoping there was some combination of headers that could trick Chrome into using the media cache, but I didn't find anything. I probably should have just spent the day finding a better CDN.

Re: CDN vs S3

#49

Earlier quoted context omitted.

Oh is that why my Coursera videos suddenly won't buffer for more than a few seconds? I figured it was an optimization, like with YouTube, so they don't waste bandwidth loading videos for people who have the tabs open but won't watch them. Do you know of any workarounds client-side?

> Do you know of any workarounds client-side? I don't think there is one. You can't even compile a custom Chromium because it doesn't have h264 codecs. I even spend a day reading the Chrome source code, hoping there was some combination of headers that could trick Chrome into using the media cache, but I didn't find anything. I probably should have just spent the day finding a better CDN.

Ugh, that's too bad. Thank you for the reply.

Re: CDN vs S3

#50
post #27

True, S3 is not a CDN, but for a lot of use cases, serving directly from S3 is fine. Taking Vine for example, I picked a random vine from twitter ( https://vine.co/v/bE3YI365gxd ) and a popular vine from twitter ( https://vine.co/v/bEFFxdwjK9x ). The popular video and thumbnails are served from a CDN, where the new one with no traffic is served directly from S3. YouTube did the same thing in it's early days. CDNs are…

When S3 first came out, people used it for this without considering its latency issues, and it was a disaster. S3 is not a CDN and shouldn't be used as one; this is the reason for CloudFront.

While I can't compare CloudFront to other CDN's, I do know it works well for my clients that have been using it (and certainly better than serving directly from S3).

Post reply on HN