S3
From Docunext Technology Wiki
Contents |
S3 Summary
S3 is short or Simple Storage Service. Its offered by Amazon and is reasonably priced.
My Experience with Amazon S3
I've wanted to use Amazon's S3 time and time again, but for various reasons its never gained any traction for me. I get concerned about performance, control, and manageability.
I always like to cache aggressively, too. The default headers for a request look like this:
HTTP/1.1 200 OK x-amz-id-2: GxdP9Jjq0hm1CzRqsspD898voGu6tSZiMrF102nujWGarp0IM5v5/iXsDpsia4Zy x-amz-request-id: 7C29E28AEDA8B257 Date: Sat, 06 Mar 2010 15:50:40 GMT Last-Modified: Sat, 06 Jun 2009 01:10:17 GMT Etag: "6f83726eb883261b509158ac61eee361" Content-Type: image/jpeg Content-Length: 18939 Server: AmazonS3
The last-modified and etag headers help with performance, and the S3 servers seem to have pretty good latency. Here's a subsequent forced request:
Response Headers x-amz-id-2 ERZ5FRSgrxQRNR/qdWaItwxNadXHAyK9MM09IbdrHYQ1b1C0tWAGlKKatJat66xB x-amz-request-id 7CE0E88ED8D462E9 Date Sat, 06 Mar 2010 16:02:12 GMT Last-Modified Sat, 06 Jun 2009 01:10:17 GMT Etag "6f83726eb883261b509158ac61eee361" Content-Type image/jpeg Content-Length 18939 Server AmazonS3 Request Headers Host www-sa.evenserver.com User-Agent Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.6) Gecko/20091216 Iceweasel/3.5.8 (like Firefox/3.5.8) Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language en-us,en;q=0.5 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 300 Connection keep-alive If-Modified-Since Sat, 06 Jun 2009 01:10:17 GMT If-None-Match "6f83726eb883261b509158ac61eee361" Cache-Control max-age=0
That http request took 46ms of time. Not bad!
The headers can also be modified when changing access control:
s3cmd put progress-bar-indeterminate.gif --acl-public --add-header "Cache-Control: max-age=315360000" --add-header "Expires: Thu, 31 Dec 2037 23:55:55 GMT" s3://www-sa.evenserver.com/s/img/
Resulting in this:
HTTP/1.1 200 OK x-amz-id-2: cx6ga6s5YBQX/UetB7w2u0d/ymIsA6FrrtfzdoC8NZhwxSY+ZQwxEU3N0e2eoG5G x-amz-request-id: 8DA7CD8BF9AAF751 Date: Sat, 06 Mar 2010 16:15:46 GMT Cache-Control: public,max-age=315360000 Last-Modified: Sat, 06 Mar 2010 16:14:40 GMT Etag: "6f83726eb883261b509158ac61eee361" Content-Type: image/jpeg Content-Length: 18939 Server: AmazonS3
Much better!