Scaling a Web Application is a very hard problem, especially for small project and teams who do not have sufficient manpower, money, and time to solve this problem. Luckily Amazon already had to solve this problem in their datacenters and offers their services to other developers. This talk will introduce the two most important Amazon Web Services, the Elastic Compute Cloud (EC2) and the Simple Storage Service (S3), and will present different ways to leverage them in your own web application. Ruby on Rails will be used for the examples but they will apply to any web framework. Several use-cases will be covered that show how S3 and EC2 can be used to move load from your servers to Amazon's or even to completely host your application at Amazon.
Boost PC performance: How more available memory can improve productivity
Use Somebody Else's Infrastructure - Utilizing Amazon S3 and EC2
1. Use Somebody Else's Infrastructure:
Utilizing Amazon S3 and EC2
Jonathan Weiss
Peritor Wissensmanagement GmbH, www.peritor.com
Web 2.0 Expo Berlin, 2007
2. Peritor
• Consultancy from Berlin, Germany
• Specialized on Architecture, Scaling and
Ruby on Rails
• A lot of our clients use Amazon Web
Services
2
13. Amazon Web Services
Simple Storage Service - S3 Elastic Compute Cloud - EC2 Simple Queue Service - SQS E-Commerce..
Redundant Data Store Virtual server per hour Reliable Message System …….
$0,15 per GB data per $0,10 per CPU hour $0,10 per 1,000 messages
month
$0,10 - $0,20 per GB $0,10 - $0,18 per GB
$0,10 - $0,20 per GB traffic traffic
traffic
13
14. S3 - Simple Storage Service
• Redundant storage - as much as you like
• max. 5 GB per object
• Organized in „Buckets“
• Web Service API for uploads
• Downloads via
• Web Service
• HTTP / HTTPS
• BitTorrent
14
15. S3 - Buckets
S3
• Unique over all S3
• Contains many
MyBucket_name www.peritor.com
key-value-metadata tupel
foto_5.jpg site/screen.css
• Cannot contain other buckets!
backups/januar.zip site/script.js
• Key can contain „/“ fotos/2007/001.png FreeBSD-6.2.iso
15
17. EC2 - Elastic Compute Cloud
• Based on XEN virtualization
• On demand virtual servers - controlled with Web Service API
• Use your favorite Linux distro (Linux 2.6.16),
Amazon Machine Images (AMI) are stored on S3
• ACLs for hosts/ports access control
17
18. EC2 Tools
List availabe images
Start a new instance
Login with SSH
Shutdown instance
18