medium_bitcoin-660x493.jpg - CDN vs S3

As I said in my last post: S3 is NOT a CDN.  It is an amazing Simple Storage Service, not a Simple Delivery Service.  

Via AWS:

Amazon S3 is storage for the Internet. It is designed to make web-scale computing easier for developers.

In this post I am going to show you why PostHaven (and Vine for that matter) should switch to a CDN.  I am going to use a service called Catchpoint that will measure the performance of this 61kb image: medium_bitcoin-660x493.jpg (view on S3  | view on CDN) from a post Garry wrote about Bitcoins.  Lets take a look after an hour of testing with a check frequency of 5 minutes hitting 7 different points of presence:


Note: Throughput (higher is better): The numerical representation of how efficiently the system was able to retrieve the element in KBps. Throughput is calculated as (File Size + Header Size) / (1st Byte + Load Time).

Chart Summary

PostHaven MaxCDN
# Runs Avg DNS (ms) Avg Connect (ms) Avg Time To First Byte (ms) Avg Response (ms) Avg Throughput Avg Webpage Response (ms) % Availability
82.00 38.32 6.49 51.07 70.88 6,103.92 70.88 100.00
 
PostHaven S3
# Runs Avg DNS (ms) Avg Connect (ms) Avg Time To First Byte (ms) Avg Response (ms) Avg Throughput Avg Webpage Response (ms) % Availability
82.00 122.30 70.16 396.29 592.55 361.18 592.55 100.00

* The following metric name prefix SD, Avg, GM and Mdn stand for Standard Deviation, Average, Geometric Mean and Median respectively.

Take Away

Whether PostHaven goes with our CDN or with another provider, I just hope anyone reading this takes this away: Do not use S3 as a CDN, it is not designed for that.  You are wasting money and your users time.

Oh and have a great weekend everyone. =)

Hey Garry, I created a pull zone for you.

I think S3 is a great origin server for static assets, but it is NOT a CDN.  When you click "Upload Media" in PostHaven it stores the media in an S3 bucket: phaven-prod.s3.amazonaws.com which is great, but it isn't good for delivery.  Not only is it slower but it is way more expen$ive.  

So here it is Garry, your very own pull zone for phhaven-prod: http://phaven-prod.posthaven.netdna-cdn.com all you need to do is switch it with phaven-prod.s3.amazonaws.com.  If you need SSL, I will get it for you Monday.

BTW: The first 10TB's are on us.

See it works!

curl -I http://phaven-prod.posthaven.netdna-cdn.com/uploads%2F2013-05-17%2F20%2F3128%2FErQE0vKlNMIeNvaxbneY75nWyy4%2Fs3ul27%2Fposthaven-loves-maxcdn.png

HTTP/1.1 200 OK
Date: Sat, 18 May 2013 00:50:41 GMT
Content-Type: binary/octet-stream
Content-Length: 52958
Connection: keep-alive
x-amz-id-2: NO6o51/19JsQJN9YHc+T/sraZSGNT+f3R+1GWl2QL3aD4SubqazjbMURb4VYaZyS
x-amz-request-id: E640348D2D6EDA7B
Last-Modified: Sat, 18 May 2013 00:47:10 GMT
ETag: "f95534e9752b560f4acdda20228f90ba"
Server: NetDNA-cache/2.2
X-Cache: HIT
Accept-Ranges: bytes