Ruby, Amazon Web Services and You Krzysztof Szafranek, RuPy 2008
Oct 20, 2014
Ruby, Amazon Web Services
and You
Krzysztof Szafranek, RuPy 2008
The problem
EC2Elastic Compute Cloud
Processing Power on Demand
Amazon Machine Image (AMI)
Instance
Elastic IP
Zones and regions
Volatile storage
SOAP & REST
RightAws::Ec2
cap ec2onrails:server:deploy_files
Instance type Hourly price
Small
1.7 GB of RAM,1 Unit,160 GB,32-bit
$0.10
Large
7.5 GB of RAM,4 Units,850 GB,64-bit
$0.40
Extra Large
15 GB of RAM,8 Units,
1690 GB,64-bit
$0.80
1 EC2 Compute Unit ≈ 1.0-1.2 GHz 2007 Opteron or 2007 Xeon processor
S3Simple Storage Service
Unlimited storage
Files: 5 GB
Buckets: 100
Metadata
Keys
Keys
/images/highres/duck.jpg
ACL
USA and Europe
Torrents
AWS::S3
RightAws::S3
attachment_fu
class Photo < ActiveRecord::Base has_attachment :storage => :s3end
Pricing
$0.18 per GB-month
($0.15 in US)
Storage
In Out
$0.10
$0.18 0-10 TB
$0.16 10-50 TB
$0.13 over 50 TB
Bandwith (GB price)
Transfer within AWS is free
PUT, LIST GET and other*
$0.012 per 1,000 $0.012 per 10,000
Requests
*DELETE is free
SimpleDB
Fast storage...
...for UTF-8 strings
2 > 10
02 < 10
order by
10 GB, 100 domains
No schema
Automatic indexing
Real-time lookup
RightAws::ActiveSdb
AWS SDB Proxy
class Post < ActiveResource::Base self.site = "http://localhost:8888" self.prefix = "/domain/" end
GET /domain/posts?query QUERY
GET /domain/post/ID GET ATTRS
POST /domain/post/ID PUT ATTRS
PUT /domain/post/ID PUT ATTRS (replace)
DELETE /domain/post/ID DELETE ATTRS
SQSSimple Queue Service
Producers Consumers
Queue
Queues
Messages
RightAws::Sqs
Mechanical Turk
Human Intelligence Tasks
Requesters
Workers
Qualifications
SOAP & REST
Google App Engine
Google App Engine
Free* hosting
Google App Engine
Python, GQL, Google Accounts
Google App Engine
Quota Daily limit
Emails 2,000
Bandwith 10,000MB
CPU Megacycles 200,000,000
HTTP Requests 650,000
Google App Engine
AWSScalability commoditized?
Marcin WicharyDiego Sevilla RuizSean DreilingerMarcello Peronginidoommeer
Thank you!
CC-licensed photos by: