SlideShare a Scribd company logo
1 of 38
Utilizing Am azo n S3 and EC2
in Rails




Jonathan Weiss, Peritor Wissensmanagement GmbH
RailsConf Europe Berlin, 2007
Starting Po int


                                     One machine:

                                     • Apache
            QuickTimeᆰ and a
                                     • Ruby / Rails
       TIFF (LZW) decompressor
   are needed to see this picture.

                                     • MySQL




                                                      2
Wo rst Case Po pulariy




                         3
A Difficult Path




       QuickTimeᆰ and a
   TIFF (LZW) decompressor
are needed to see this picture.




                                  4
Pro ble m : Backup



• High availability

• Redundancy

• Very big data sets




                       5
Pro ble m : File Syste m


• Important files have to be accessed by many servers

• NFS / Samba not practical




                                                        6
Pro ble m : Spo ntane o us Traffic




                                     7
Pro ble m : Lo ad Fluctuatio n




                                 8
Do n‘t re inve nt the w he e l!




                                  9
Am azo n We b Se rvice s




     Simple Storage Service - S3     Elastic Compute Cloud - EC2   E-Commerce S..

  Redundant Data Store             Virtual server per hour         …….
  $0,15 per GB data per month      $0,10 per CPU hour
  $0,10 - $0,20 per GB traffic     $0,10 - $0,20 per GB traffic




                                                                              10
S3 - Sim ple Sto rage Se rvice

• 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



                                            11
S3 - Bucke ts

                                                             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




                                                                            12
S3 w ith AWS::S3
Upload




Download




                   13
EC2 - Elastic Co m pute Clo ud

• Based on XEN virtualization

• On demand virtual servers - controlled with Web Service API
   • 1,7 GHz
   • 1,75 GB RAM
   • 160 GB local file system (not persistent!)

• Use your favorite Linux distro (Linux 2.6.16),
  Amazon Machine Images (AMI) are stored on S3

• ACLs for hosts/ports access control



                                                                14
EC2 To o ls
 List availabe images



Start a new instance




Login with SSH




Shutdown instance



                        15
am azo n-e c2 ge m
 Setup




Usage




                     16
And no w ?

Ho w do e s this so lve
m y pro ble m s?


                          17
S3 - Backup


• s3sync.rb     • S3Browser

• Brackup       • Firefox S3 Organizer extension

• Jungle Disk   •…

• S3 FUSE

• s3DAV

• Duplicity



                                                   18
s3sync.rb
Backup




Restore




            19
S3 Asse t Ho st




                  20
S3 Asse t Ho st

Setup DNS




Rails configuration




                      21
S3 Asse t Ho st

welcome.rhtml template




Output




                         22
S3 - Authe nticate d Use r Data




                                  23
attachm e nt_fu Rails plugin

Setup




                               24
attachm e nt_fu Rails plugin

Upload




Download




                               25
O n-De m and Co m puting w ith
EC2




Time based, e.g. with cron




                                 26
O n-De m and Co m puting w ith
EC2




Load based, e.g. with Monit




                                 27
O n-De m and Co m puting w ith
EC2




                                 28
EC2 fo r e xtra capacity




                           29
Lo ad Balance r / Pro xy

                      Example mod_proxy_blancer:

                      • Talks to multiple backend servers
                        (Mongrel)

                      • Central Proxy/Load-Balancer
                        configuration that has knowledge about
                        nodes

                      • Typically proxy restart on config change




                                                                   30
Sw iftiply
             Swiftiply Proxy:

             • Multiple backend clients have a
               persistent connection to the backend
               port

             • Proxy listens on cluster port for requests
               and forwards them




                      No re-configuration


                                                            31
Sw iftiply Pro xy

Installation        Configuration



Start




                                    32
Sw iftiplie d Mo ngre l

• Gem plugin that patches Mongrel

• Transforms Mongrel in Swiftiply client

• Experimental



Start



             or



                                           33
EC2 o n De m and be fo re
Sw iftiply




                            34
EC2 o n De m and w ith Sw iftiply




                                    35
EC2 o n De m and w ith Sw iftiply




                                    36
Re sso urce s

• Amazon Web Services
  http://aws.amazon.com

• Swiftiply
  http://swiftiply.swiftcore.org

• Attachment_fu
  http://svn.techno-weenie.net/projects/plugins/attachment_fu/

• Elastic Rails
  http://www.elasticrails.com

• Capazon
  http://capazon.rubyforge.org

• RightScale
  http://www.rightscale.com


                                                                 37
Peritor Wissensmanagement GmbH
Lenbachstraße 2
12157 Berlin
                                 Telefon: +49 (0)30 69 40 11 94
Internet: www.peritor.com
                                 Telefax: +49 (0)30 69 40 11 95
Email: info@peritor.com


 Peritor Wissensmanagement GmbH - All Rights Reserved
                                                                  38

More Related Content

What's hot

Как построить видеоплатформу на 200 Гбитс / Ольховченков Вячеслав (Integros)
Как построить видеоплатформу на 200 Гбитс / Ольховченков Вячеслав (Integros)Как построить видеоплатформу на 200 Гбитс / Ольховченков Вячеслав (Integros)
Как построить видеоплатформу на 200 Гбитс / Ольховченков Вячеслав (Integros)Ontico
 
Webinar Slides : Migrating to MySQL, MariaDB Galera and/or Percona XtraDB Clu...
Webinar Slides : Migrating to MySQL, MariaDB Galera and/or Percona XtraDB Clu...Webinar Slides : Migrating to MySQL, MariaDB Galera and/or Percona XtraDB Clu...
Webinar Slides : Migrating to MySQL, MariaDB Galera and/or Percona XtraDB Clu...Severalnines
 
Soirée de lancement Visual Studio - .Net Core 3 et ASP.Net Core 3
Soirée de lancement Visual Studio - .Net Core 3 et ASP.Net Core 3Soirée de lancement Visual Studio - .Net Core 3 et ASP.Net Core 3
Soirée de lancement Visual Studio - .Net Core 3 et ASP.Net Core 3Cellenza
 
Full Stack Load Testing
Full Stack Load Testing Full Stack Load Testing
Full Stack Load Testing Terral R Jordan
 
Pound & Varnish - Cache e Balanceamento de Carga
Pound & Varnish - Cache e Balanceamento de CargaPound & Varnish - Cache e Balanceamento de Carga
Pound & Varnish - Cache e Balanceamento de Cargagsroma
 
Merb Presentation
Merb PresentationMerb Presentation
Merb Presentationgueste4d7fc
 
Redis trouble shooting_eng
Redis trouble shooting_engRedis trouble shooting_eng
Redis trouble shooting_engDaeMyung Kang
 
Не так страшен терабит / Вячеслав Ольховченков (Integros)
Не так страшен терабит / Вячеслав Ольховченков (Integros)Не так страшен терабит / Вячеслав Ольховченков (Integros)
Не так страшен терабит / Вячеслав Ольховченков (Integros)Ontico
 
Cpu高效编程技术
Cpu高效编程技术Cpu高效编程技术
Cpu高效编程技术Feng Yu
 
Deploying with JRuby
Deploying with JRubyDeploying with JRuby
Deploying with JRubyJoe Kutner
 
DevOpsDays Amsterdam Cosmic workshop
DevOpsDays Amsterdam Cosmic workshopDevOpsDays Amsterdam Cosmic workshop
DevOpsDays Amsterdam Cosmic workshopRemi Bergsma
 
A Performance Characterization of Postgres on Different Storage Systems
A Performance Characterization of Postgres on Different Storage SystemsA Performance Characterization of Postgres on Different Storage Systems
A Performance Characterization of Postgres on Different Storage SystemsDong Ye
 
Arnold Bechtoldt, Inovex GmbH Linux systems engineer - Configuration Manageme...
Arnold Bechtoldt, Inovex GmbH Linux systems engineer - Configuration Manageme...Arnold Bechtoldt, Inovex GmbH Linux systems engineer - Configuration Manageme...
Arnold Bechtoldt, Inovex GmbH Linux systems engineer - Configuration Manageme...SaltStack
 
Salt Stack - Subhankar Sengupta
Salt Stack - Subhankar SenguptaSalt Stack - Subhankar Sengupta
Salt Stack - Subhankar SenguptaDevOpsBangalore
 
Logical Replication in PostgreSQL - FLOSSUK 2016
Logical Replication in PostgreSQL - FLOSSUK 2016Logical Replication in PostgreSQL - FLOSSUK 2016
Logical Replication in PostgreSQL - FLOSSUK 2016Petr Jelinek
 
Openv switchの使い方とか
Openv switchの使い方とかOpenv switchの使い方とか
Openv switchの使い方とかkotto_hihihi
 
OpenNebula Conf 2014 | Lightning talk: OpenNebula at Etnetera by Jan Horacek
OpenNebula Conf 2014 | Lightning talk: OpenNebula at Etnetera by Jan HoracekOpenNebula Conf 2014 | Lightning talk: OpenNebula at Etnetera by Jan Horacek
OpenNebula Conf 2014 | Lightning talk: OpenNebula at Etnetera by Jan HoracekNETWAYS
 
A memcached implementation in Java
A memcached implementation in JavaA memcached implementation in Java
A memcached implementation in Javaelliando dias
 

What's hot (20)

Как построить видеоплатформу на 200 Гбитс / Ольховченков Вячеслав (Integros)
Как построить видеоплатформу на 200 Гбитс / Ольховченков Вячеслав (Integros)Как построить видеоплатформу на 200 Гбитс / Ольховченков Вячеслав (Integros)
Как построить видеоплатформу на 200 Гбитс / Ольховченков Вячеслав (Integros)
 
Webinar Slides : Migrating to MySQL, MariaDB Galera and/or Percona XtraDB Clu...
Webinar Slides : Migrating to MySQL, MariaDB Galera and/or Percona XtraDB Clu...Webinar Slides : Migrating to MySQL, MariaDB Galera and/or Percona XtraDB Clu...
Webinar Slides : Migrating to MySQL, MariaDB Galera and/or Percona XtraDB Clu...
 
OpenStreetMap Belarus Tile Server
OpenStreetMap Belarus Tile ServerOpenStreetMap Belarus Tile Server
OpenStreetMap Belarus Tile Server
 
Soirée de lancement Visual Studio - .Net Core 3 et ASP.Net Core 3
Soirée de lancement Visual Studio - .Net Core 3 et ASP.Net Core 3Soirée de lancement Visual Studio - .Net Core 3 et ASP.Net Core 3
Soirée de lancement Visual Studio - .Net Core 3 et ASP.Net Core 3
 
Full Stack Load Testing
Full Stack Load Testing Full Stack Load Testing
Full Stack Load Testing
 
Pound & Varnish - Cache e Balanceamento de Carga
Pound & Varnish - Cache e Balanceamento de CargaPound & Varnish - Cache e Balanceamento de Carga
Pound & Varnish - Cache e Balanceamento de Carga
 
Merb Presentation
Merb PresentationMerb Presentation
Merb Presentation
 
Redis trouble shooting_eng
Redis trouble shooting_engRedis trouble shooting_eng
Redis trouble shooting_eng
 
Не так страшен терабит / Вячеслав Ольховченков (Integros)
Не так страшен терабит / Вячеслав Ольховченков (Integros)Не так страшен терабит / Вячеслав Ольховченков (Integros)
Не так страшен терабит / Вячеслав Ольховченков (Integros)
 
Cpu高效编程技术
Cpu高效编程技术Cpu高效编程技术
Cpu高效编程技术
 
Deploying with JRuby
Deploying with JRubyDeploying with JRuby
Deploying with JRuby
 
DevOpsDays Amsterdam Cosmic workshop
DevOpsDays Amsterdam Cosmic workshopDevOpsDays Amsterdam Cosmic workshop
DevOpsDays Amsterdam Cosmic workshop
 
A Performance Characterization of Postgres on Different Storage Systems
A Performance Characterization of Postgres on Different Storage SystemsA Performance Characterization of Postgres on Different Storage Systems
A Performance Characterization of Postgres on Different Storage Systems
 
Ceph issue 해결 사례
Ceph issue 해결 사례Ceph issue 해결 사례
Ceph issue 해결 사례
 
Arnold Bechtoldt, Inovex GmbH Linux systems engineer - Configuration Manageme...
Arnold Bechtoldt, Inovex GmbH Linux systems engineer - Configuration Manageme...Arnold Bechtoldt, Inovex GmbH Linux systems engineer - Configuration Manageme...
Arnold Bechtoldt, Inovex GmbH Linux systems engineer - Configuration Manageme...
 
Salt Stack - Subhankar Sengupta
Salt Stack - Subhankar SenguptaSalt Stack - Subhankar Sengupta
Salt Stack - Subhankar Sengupta
 
Logical Replication in PostgreSQL - FLOSSUK 2016
Logical Replication in PostgreSQL - FLOSSUK 2016Logical Replication in PostgreSQL - FLOSSUK 2016
Logical Replication in PostgreSQL - FLOSSUK 2016
 
Openv switchの使い方とか
Openv switchの使い方とかOpenv switchの使い方とか
Openv switchの使い方とか
 
OpenNebula Conf 2014 | Lightning talk: OpenNebula at Etnetera by Jan Horacek
OpenNebula Conf 2014 | Lightning talk: OpenNebula at Etnetera by Jan HoracekOpenNebula Conf 2014 | Lightning talk: OpenNebula at Etnetera by Jan Horacek
OpenNebula Conf 2014 | Lightning talk: OpenNebula at Etnetera by Jan Horacek
 
A memcached implementation in Java
A memcached implementation in JavaA memcached implementation in Java
A memcached implementation in Java
 

Viewers also liked

Viewers also liked (6)

test
testtest
test
 
cars
carscars
cars
 
Speech Upward Slope
Speech   Upward SlopeSpeech   Upward Slope
Speech Upward Slope
 
Diosychavez
DiosychavezDiosychavez
Diosychavez
 
cars
carscars
cars
 
Tequila y sal
Tequila y salTequila y sal
Tequila y sal
 

Similar to Utilizing Amazon S3 and EC2 in Rails

Use Somebody Else's Infrastructure - Utilizing Amazon S3 and EC2
Use Somebody Else's Infrastructure - Utilizing Amazon S3 and EC2Use Somebody Else's Infrastructure - Utilizing Amazon S3 and EC2
Use Somebody Else's Infrastructure - Utilizing Amazon S3 and EC2Jonathan Weiss
 
Deploying And Monitoring Rails
Deploying And Monitoring RailsDeploying And Monitoring Rails
Deploying And Monitoring RailsJonathan Weiss
 
Deployment with Ruby on Rails
Deployment with Ruby on RailsDeployment with Ruby on Rails
Deployment with Ruby on RailsJonathan Weiss
 
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE PlatformsFIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE PlatformsFIWARE
 
Deep Dive on Amazon EC2 Instances - AWS Summit Cape Town 2017
Deep Dive on Amazon EC2 Instances - AWS Summit Cape Town 2017Deep Dive on Amazon EC2 Instances - AWS Summit Cape Town 2017
Deep Dive on Amazon EC2 Instances - AWS Summit Cape Town 2017Amazon Web Services
 
Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2aspyker
 
Cloud computing & lamp applications
Cloud computing & lamp applicationsCloud computing & lamp applications
Cloud computing & lamp applicationsCorley S.r.l.
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computingchrismik
 
Getting Started with PoolParty and EC2
Getting Started with PoolParty and EC2Getting Started with PoolParty and EC2
Getting Started with PoolParty and EC2Nate Murray
 
Machine learning at scale with aws sage maker
Machine learning at scale with aws sage makerMachine learning at scale with aws sage maker
Machine learning at scale with aws sage makerPhilipBasford
 
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - DeploymentFabio Akita
 
Rails Conf Europe 2007 Notes
Rails Conf  Europe 2007  NotesRails Conf  Europe 2007  Notes
Rails Conf Europe 2007 NotesRoss Lawley
 
Virtualization & Network Connectivity
Virtualization & Network Connectivity Virtualization & Network Connectivity
Virtualization & Network Connectivity itplant
 
Phil Basford - machine learning at scale with aws sage maker
Phil Basford - machine learning at scale with aws sage makerPhil Basford - machine learning at scale with aws sage maker
Phil Basford - machine learning at scale with aws sage makerAWSCOMSUM
 
Boyan Krosnov - Building a software-defined cloud - our experience
Boyan Krosnov - Building a software-defined cloud - our experienceBoyan Krosnov - Building a software-defined cloud - our experience
Boyan Krosnov - Building a software-defined cloud - our experienceShapeBlue
 
Docker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platformsDocker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platformsFederico Michele Facca
 
Introduction to Container Management on AWS
Introduction to Container Management  on AWSIntroduction to Container Management  on AWS
Introduction to Container Management on AWSAmazon Web Services
 
A Tale of a Server Architecture (Frozen Rails 2012)
A Tale of a Server Architecture (Frozen Rails 2012)A Tale of a Server Architecture (Frozen Rails 2012)
A Tale of a Server Architecture (Frozen Rails 2012)Flowdock
 

Similar to Utilizing Amazon S3 and EC2 in Rails (20)

Use Somebody Else's Infrastructure - Utilizing Amazon S3 and EC2
Use Somebody Else's Infrastructure - Utilizing Amazon S3 and EC2Use Somebody Else's Infrastructure - Utilizing Amazon S3 and EC2
Use Somebody Else's Infrastructure - Utilizing Amazon S3 and EC2
 
Deploying And Monitoring Rails
Deploying And Monitoring RailsDeploying And Monitoring Rails
Deploying And Monitoring Rails
 
Deployment with Ruby on Rails
Deployment with Ruby on RailsDeployment with Ruby on Rails
Deployment with Ruby on Rails
 
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE PlatformsFIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
FIWARE Tech Summit - Docker Swarm Secrets for Creating Great FIWARE Platforms
 
Deep Dive on Amazon EC2 Instances - AWS Summit Cape Town 2017
Deep Dive on Amazon EC2 Instances - AWS Summit Cape Town 2017Deep Dive on Amazon EC2 Instances - AWS Summit Cape Town 2017
Deep Dive on Amazon EC2 Instances - AWS Summit Cape Town 2017
 
Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2
 
Cloud computing & lamp applications
Cloud computing & lamp applicationsCloud computing & lamp applications
Cloud computing & lamp applications
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
XS Boston 2008 Network Topology
XS Boston 2008 Network TopologyXS Boston 2008 Network Topology
XS Boston 2008 Network Topology
 
Getting Started with PoolParty and EC2
Getting Started with PoolParty and EC2Getting Started with PoolParty and EC2
Getting Started with PoolParty and EC2
 
Machine learning at scale with aws sage maker
Machine learning at scale with aws sage makerMachine learning at scale with aws sage maker
Machine learning at scale with aws sage maker
 
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - Deployment
 
Rails Conf Europe 2007 Notes
Rails Conf  Europe 2007  NotesRails Conf  Europe 2007  Notes
Rails Conf Europe 2007 Notes
 
Virtualization & Network Connectivity
Virtualization & Network Connectivity Virtualization & Network Connectivity
Virtualization & Network Connectivity
 
Phil Basford - machine learning at scale with aws sage maker
Phil Basford - machine learning at scale with aws sage makerPhil Basford - machine learning at scale with aws sage maker
Phil Basford - machine learning at scale with aws sage maker
 
Boyan Krosnov - Building a software-defined cloud - our experience
Boyan Krosnov - Building a software-defined cloud - our experienceBoyan Krosnov - Building a software-defined cloud - our experience
Boyan Krosnov - Building a software-defined cloud - our experience
 
Docker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platformsDocker Swarm secrets for creating great FIWARE platforms
Docker Swarm secrets for creating great FIWARE platforms
 
Introduction to Container Management on AWS
Introduction to Container Management  on AWSIntroduction to Container Management  on AWS
Introduction to Container Management on AWS
 
Where should I run my code? Serverless, Containers, Virtual Machines and more
Where should I run my code? Serverless, Containers, Virtual Machines and moreWhere should I run my code? Serverless, Containers, Virtual Machines and more
Where should I run my code? Serverless, Containers, Virtual Machines and more
 
A Tale of a Server Architecture (Frozen Rails 2012)
A Tale of a Server Architecture (Frozen Rails 2012)A Tale of a Server Architecture (Frozen Rails 2012)
A Tale of a Server Architecture (Frozen Rails 2012)
 

Recently uploaded

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Recently uploaded (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Utilizing Amazon S3 and EC2 in Rails

  • 1. Utilizing Am azo n S3 and EC2 in Rails Jonathan Weiss, Peritor Wissensmanagement GmbH RailsConf Europe Berlin, 2007
  • 2. Starting Po int One machine: • Apache QuickTimeᆰ and a • Ruby / Rails TIFF (LZW) decompressor are needed to see this picture. • MySQL 2
  • 3. Wo rst Case Po pulariy 3
  • 4. A Difficult Path QuickTimeᆰ and a TIFF (LZW) decompressor are needed to see this picture. 4
  • 5. Pro ble m : Backup • High availability • Redundancy • Very big data sets 5
  • 6. Pro ble m : File Syste m • Important files have to be accessed by many servers • NFS / Samba not practical 6
  • 7. Pro ble m : Spo ntane o us Traffic 7
  • 8. Pro ble m : Lo ad Fluctuatio n 8
  • 9. Do n‘t re inve nt the w he e l! 9
  • 10. Am azo n We b Se rvice s Simple Storage Service - S3 Elastic Compute Cloud - EC2 E-Commerce S.. Redundant Data Store Virtual server per hour ……. $0,15 per GB data per month $0,10 per CPU hour $0,10 - $0,20 per GB traffic $0,10 - $0,20 per GB traffic 10
  • 11. S3 - Sim ple Sto rage Se rvice • 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 11
  • 12. S3 - Bucke ts 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 12
  • 13. S3 w ith AWS::S3 Upload Download 13
  • 14. EC2 - Elastic Co m pute Clo ud • Based on XEN virtualization • On demand virtual servers - controlled with Web Service API • 1,7 GHz • 1,75 GB RAM • 160 GB local file system (not persistent!) • Use your favorite Linux distro (Linux 2.6.16), Amazon Machine Images (AMI) are stored on S3 • ACLs for hosts/ports access control 14
  • 15. EC2 To o ls List availabe images Start a new instance Login with SSH Shutdown instance 15
  • 16. am azo n-e c2 ge m Setup Usage 16
  • 17. And no w ? Ho w do e s this so lve m y pro ble m s? 17
  • 18. S3 - Backup • s3sync.rb • S3Browser • Brackup • Firefox S3 Organizer extension • Jungle Disk •… • S3 FUSE • s3DAV • Duplicity 18
  • 20. S3 Asse t Ho st 20
  • 21. S3 Asse t Ho st Setup DNS Rails configuration 21
  • 22. S3 Asse t Ho st welcome.rhtml template Output 22
  • 23. S3 - Authe nticate d Use r Data 23
  • 24. attachm e nt_fu Rails plugin Setup 24
  • 25. attachm e nt_fu Rails plugin Upload Download 25
  • 26. O n-De m and Co m puting w ith EC2 Time based, e.g. with cron 26
  • 27. O n-De m and Co m puting w ith EC2 Load based, e.g. with Monit 27
  • 28. O n-De m and Co m puting w ith EC2 28
  • 29. EC2 fo r e xtra capacity 29
  • 30. Lo ad Balance r / Pro xy Example mod_proxy_blancer: • Talks to multiple backend servers (Mongrel) • Central Proxy/Load-Balancer configuration that has knowledge about nodes • Typically proxy restart on config change 30
  • 31. Sw iftiply Swiftiply Proxy: • Multiple backend clients have a persistent connection to the backend port • Proxy listens on cluster port for requests and forwards them No re-configuration 31
  • 32. Sw iftiply Pro xy Installation Configuration Start 32
  • 33. Sw iftiplie d Mo ngre l • Gem plugin that patches Mongrel • Transforms Mongrel in Swiftiply client • Experimental Start or 33
  • 34. EC2 o n De m and be fo re Sw iftiply 34
  • 35. EC2 o n De m and w ith Sw iftiply 35
  • 36. EC2 o n De m and w ith Sw iftiply 36
  • 37. Re sso urce s • Amazon Web Services http://aws.amazon.com • Swiftiply http://swiftiply.swiftcore.org • Attachment_fu http://svn.techno-weenie.net/projects/plugins/attachment_fu/ • Elastic Rails http://www.elasticrails.com • Capazon http://capazon.rubyforge.org • RightScale http://www.rightscale.com 37
  • 38. Peritor Wissensmanagement GmbH Lenbachstraße 2 12157 Berlin Telefon: +49 (0)30 69 40 11 94 Internet: www.peritor.com Telefax: +49 (0)30 69 40 11 95 Email: info@peritor.com  Peritor Wissensmanagement GmbH - All Rights Reserved 38