SlideShare une entreprise Scribd logo
1  sur  61
Elastic Grid and EC2
How Can Amazon EC2 Benefit from the Elastic Grid
Solution?
Dennis Reedy
Jerome Bernard
Agenda

 EC2 and Amazon Web Services
  • Capabilities, benefits and challenges
 Elastic Grid introduction
  • Technology, approach and benefits
 Elastic Grid and EC2
  • Deploying and scaling applications using Elastic Grid
 Demonstration




                                                      2008 JavaOneSM Conference | java.com.sun/javaone | 2
Cloud Computing

 A way to increase capacity or add capabilities on the fly
 without investing in new infrastructure, training new
 personnel, or licensing new software
 Virtualized hardware available for computation
  • Resources “in the cloud”
 Low cost of entry, utility based model
  • Pay for what you use
 Embraced by startups, and medium to large corporations as
 a way to bypass IT
 Cloud Computing Providers (Utility)
  • Amazon, Sun, IBM, 3Tera
                                         2008 JavaOneSM Conference | java.com.sun/javaone | 3
Amazon EC2 Overview

 In a nutshell
  • Provides resizable compute capacity in the cloud

 EC2 Amazon Machine Image (AMI)
  • Operating System & application “stack”
  • Deployed using Amazon Web Services to the “cloud”

 EC2 Instances
  • Virtual machines that run AMIs



                                                       2008 JavaOneSM Conference | java.com.sun/javaone | 4
Typical Architecture Taxonomy


                    Applications


                  Virtual Platform


                 Upper Platform


                  Lower Platform


                 Hardware Platform




                                     2008 JavaOneSM Conference | java.com.sun/javaone | 5
Typical Architecture Taxonomy (more detail)


                              Applications


                 Middleware Support, JDBC, JMS, …


           Enterprise Containers, JEE, Spring, ESBs, OSGi, ...


          Provisioning, Management, Monitoring & Metering


                          Hardware Platform




                                                            2008 JavaOneSM Conference | java.com.sun/javaone | 6
EC2 AMI Stack


                             Applications


                Middleware Support, JDBC, JMS, …


          Enterprise Containers, JEE, Spring, ESBs, OSGi, ...


         Provisioning, Management, Monitoring & Metering


                         Hardware Platform




                                                           2008 JavaOneSM Conference | java.com.sun/javaone | 7
EC2 AMI Stack


                             Applications


                Middleware Support, JDBC, JMS, …

                                                                                   AMI
          Enterprise Containers, JEE, Spring, ESBs, OSGi, ...


         Provisioning, Management, Monitoring & Metering


                         Hardware Platform                                         Virtualized



                                                           2008 JavaOneSM Conference | java.com.sun/javaone | 7
EC2 AMIs: Deployment Challenges

 The EC2 AMI is a boot image, requires substantial system
 administrator knowledge
 As application code changes, AMIs typically need to change
 Not focused on developer productivity
                            Boot base AMI

                                       Copy private key and
  Upload to S3                         certificate (for bundling
                                       image)

                   Install and configure
                   requisite software
                                           2008 JavaOneSM Conference | java.com.sun/javaone | 8
Elastic Grid

 Dynamic infrastructure for the dynamic deployment,
 activation, management of Java applications on virtualized
 hardware

 Technology building blocks
  • Rio
  • Typica
  • Jets3t
  • Jini (River)



                                           2008 JavaOneSM Conference | java.com.sun/javaone | 9
Elastic Grid Architecture



Administrative                Application
                 S3
  Console                      Monitor


                                                  SLA Policy
                                                 Enforcement



                                                   Monitor &
                                                    Meter

                              Application
                                Agents



                                            2008 JavaOneSM Conference | java.com.sun/javaone | 10
Elastic Grid Architecture



 Administrative                                  Application
                           S3
   Console                                        Monitor


                                                                        SLA Policy
Application Monitor                                                    Enforcement
Deploys and manages applications (composed of services),
provides failover (if service(s) fail they are re-created), and
methods to scale and relocate services
                                                                         Monitor &
                                                                          Meter

                                                 Application
                                                   Agents



                                                                  2008 JavaOneSM Conference | java.com.sun/javaone | 10
Elastic Grid Architecture



 Administrative                                Application
                         S3
   Console                                      Monitor


                                                                   SLA Policy
                                                                  Enforcement
Application Agent                                                                                      EG AMI
Represents the capabilities of a virtualized compute resource,
acts as a dynamic agent instantiating application services     Monitor &
                                                                Meter

                                               Application
                                                 Agents



                                                             2008 JavaOneSM Conference | java.com.sun/javaone | 10
Elastic Grid EC2 AMI Stack


                              Applications


                 Middleware Support, JDBC, JMS, …


           Enterprise Containers, JEE, Spring, ESBs, OSGi, ...


          Provisioning, Management, Monitoring & Metering


                          Hardware Platform




                                                            2008 JavaOneSM Conference | java.com.sun/javaone | 11
Elastic Grid EC2 AMI Stack


                              Applications


                 Middleware Support, JDBC, JMS, …                                    Dynamic
                                                                                     Application
           Enterprise Containers, JEE, Spring, ESBs, OSGi, ...


          Provisioning, Management, Monitoring & Metering                           EG AMI
                          Hardware Platform                                         Virtualized



                                                            2008 JavaOneSM Conference | java.com.sun/javaone | 11
EC2 AMIs: Deployment with EG AMIs

 EG AMIs are pre-set, no need to (re-)bundle
 As application code changes, upload to S3 and deploy
 Focuses on developer productivity



                                   Boot EG AMIs
          Deploy                         ...



                    Upload (modified)
                        app to S3         2008 JavaOneSM Conference | java.com.sun/javaone | 12
Elastic Grid Deployment

 Deploy application code S3
                                       1   Upload                        S3
 Command to deploy the
 application is made
                                                      3    As needed download
 All code is dynamically served                            application resources

 and instantiated
 Application is monitored         2   Deploy
                                                                        activate
 and managed across EC2
 instances                                          Application
                                                     Monitors



                                                                              Application Agents



                                                          2008 JavaOneSM Conference | java.com.sun/javaone | 13
Elastic Grid Scalability on EC2

 Across existing AMIs
       App Agent AMI                                 App Monitor AMI

                               SLA
          App Service    Policy Handler

    80%                                   allocate

              Memory
              Observer     register
                                           • Allocate an Application Service
                                           • Create SLA Policy Handler
                                             that registers for Memory
                                             utilization notifications
                                           • SLA has upper limit set to 80%


                                                       2008 JavaOneSM Conference | java.com.sun/javaone | 14
Elastic Grid Scalability on EC2

 Across existing AMIs
       App Agent AMI                                  App Monitor AMI

                               SLA
          App Service    Policy Handler   increment

    80%


              Memory
              Observer     notify
                                             • Memory utilization exceeds 80%
                                             • SLA Policy Handler is notified
                                             • App Monitor allocates another
                                             Application Service instance to
                                             appropriate App Agent AMI



                                                        2008 JavaOneSM Conference | java.com.sun/javaone | 15
Elastic Grid Scalability on EC2

 Across existing AMIs
       App Agent AMI                                  App Monitor AMI

                               SLA
          App Service    Policy Handler   increment

    80%


              Memory
              Observer     notify
                                             • Memory utilization exceeds 80%
                                             • SLA Policy Handler is notified
                                             • App Monitor allocates another
                                             Application Service instance to
                                             appropriate App Agent AMI



                                                        2008 JavaOneSM Conference | java.com.sun/javaone | 15
Elastic Grid Scalability on EC2

 New EC2 Instance
      App Agent AMI                                  App Monitor AMI

                               EC2
          App Service    Policy Handler

    80%                                   allocate
              Memory
              Observer


                                          • Allocate an Application Service
                                          • Create EC2 Policy Handler
                                            which registers for Memory
                                            utilization notifications
                                          • SLA has upper limit set to 80%



                                                       2008 JavaOneSM Conference | java.com.sun/javaone | 16
Elastic Grid Scalability on EC2

 New EC2 Instance
      App Agent AMI                                   App Monitor AMI

                               SLA
          App Service    Policy Handler   increment

    80%

              Memory
              Observer
                           notify




                                                        2008 JavaOneSM Conference | java.com.sun/javaone | 17
Elastic Grid Scalability on EC2

 New EC2 Instance
      App Agent AMI                                       App Monitor AMI

                               SLA
          App Service    Policy Handler   increment

    80%

              Memory
              Observer                     App Agent AMI
                           notify
                                              App Service              SLA
                                                                 Policy Handler




                                                      Memory
                                                      Observer




                                                             2008 JavaOneSM Conference | java.com.sun/javaone | 17
Elastic Grid Benefits

 So what EG does for the app?
  • Ease development and deployment of Java applications
    using Amazon services
  • Provides automated management, fault detection and
    scalability for the application

 Why EG should be used
 • Ease deployment and management of your Java
   applications




                                           2008 JavaOneSM Conference | java.com.sun/javaone | 18
Elastic Grid Tools
Tools Used in the Demonstration
  IntelliJ plugin                 Rio UI




  Web Console




                                     2008 JavaOneSM Conference | java.com.sun/javaone | 19
Demonstration – A real world use case
The Problem
 French TV channel in need of video conversion for streaming
 of short videos on the Web
  • for now on..
  • VOD will come really soon
  • ...and CatchUp TV is close too, I suppose!
 Video conversion and streaming
  • done by a 3rd party,
  • but there are streaming issues and some conversion glitches
 As of the beginning of April 08,
  • more than 1.1K videos...
  • ... for about 40GB of MPEG-4 data!

                                             2008 JavaOneSM Conference | java.com.sun/javaone | 20
Demonstration – A real world use case
The Problem
 Pricing:
  • 7€/GB for streaming,
  • 300€/month for video conversion, that is   $438 $456 per month!
                                                    per month! month!
                                                         $474 per


 This solution won’t scale:
  • about 30 videos per day...
  • ... for 1.5GB of MPEG-4
  • being converted on 1 machine!




                                                   2008 JavaOneSM Conference | java.com.sun/javaone | 21
Demonstration – A real world use case
The Problem
 Pricing:
  • 7€/GB for streaming,
  • 300€/month for video conversion, that is   $438 $456 per month!
                                                    per month! month!
                                                         $474 per


 This solution won’t scale:
  • about 30 videos per day...
  • ... for 1.5GB of MPEG-4
  • being converted on 1 machine!




                                                   2008 JavaOneSM Conference | java.com.sun/javaone | 21
Demonstration – A real world use case
The Problem
 Pricing:
  • 7€/GB for streaming,
  • 300€/month for video conversion, that is   $438 $456 per month!
                                                    per month! month!
                                                         $474 per


 This solution won’t scale:
  • about 30 videos per day...
  • ... for 1.5GB of MPEG-4
  • being converted on 1 machine!




                                                   2008 JavaOneSM Conference | java.com.sun/javaone | 21
Demonstration – A real world use case
The Objectives
 Storage should be cheap
  • MPEG-4 videos and FLV videos should be stored on Amazon S3
 Streaming should be fast and reliable
  • cheap CDN in order to increase both the bps and the QoS
  • being served from our FLV videos on Amazon S3
 Flexibility of deployments for video conversion
  • should be able to both on a LAN
  • ... and EC2 infrastructure!
 Flexibility of deployments for video conversion
  • don’t want to wait for hours...


                                                  2008 JavaOneSM Conference | java.com.sun/javaone | 22
Demonstration Architecture


            IntelliJ            SQS


            EG CLI                 polls


                               Video
   Tomcat   Web App          Converter
                        reads                writes


                           S3                S3
                        (source)           (dest)
                                      2008 JavaOneSM Conference | java.com.sun/javaone | 23
Demonstration Iterations

 Approach 1
  • LAN based approach using single computer
  • Using automated SLA management
  • System scales based on observed thresholds
 Approach 2
  • EC2 based deployment, using EG AMIs
  • Dynamic deployment of application to EC2 from S3
  • Using automated SLA management
  • System scales application instances (as opposed EC2 instances) based
   on observed thresholds



                                                    2008 JavaOneSM Conference | java.com.sun/javaone | 24
Demonstration – 1st approach

 Local/network file system for both the MPEG-4 videos and
 the converted videos (FLV).
 Distribution of video conversion requests:
  • done by our “smart proxy” sending Amazon SQS messages
  • .. with the name of the video to convert
 Video conversion done on machines on the LAN
  • those machines needs access to the MPEG-4 videos!
 Use of a dynamic service (with the help of the EG
 framework)
  • driving the mencoder OpenSource tool
  • each Video Converter polls the SQS queue for requests
                                          2008 JavaOneSM Conference | java.com.sun/javaone | 25
Demonstration – 1st approach - Results




  Number of Services
               1       2   4   6
                                   2008 JavaOneSM Conference | java.com.sun/javaone | 26
Demonstration – 1st approach - Results




  Number of Services
               1       2   4   6
                                   2008 JavaOneSM Conference | java.com.sun/javaone | 26
Demonstration – 2nd approach

 Same as before, but this time, the cluster is hosted on
 Amazon EC2!
 The videos were previously uploaded on S3!
 Each service running on Amazon EC2:
  • downloads the S3 video from a “bucket”,
  • convert it to the many FLV flavors,
  • and uploads the encoded videos to another “bucket”




                                            2008 JavaOneSM Conference | java.com.sun/javaone | 27
Demonstration – 2nd approach - Results




  Number of Amazon EC2 instances
               1       2       4   6
                                       2008 JavaOneSM Conference | java.com.sun/javaone | 28
Demonstration – 2nd approach - Results




  Number of Amazon EC2 instances
               1       2       4   6
                                       2008 JavaOneSM Conference | java.com.sun/javaone | 28
Video Conversion for Streaming of Short
Videos




                                2008 JavaOneSM Conference | java.com.sun/javaone | 29
Summary
Elastic Grid extends EC2, enabling users to manage &
dynamically scale application service instances and AMIs
based on declarable SLAs
Cloud decides allocation of services
 • QoS approach provides feedback mechanisms based on SLAs
 • Today: Human decides/admins each machine
Provisioning/changing services is simple
 • Dynamic reconfigurable systems
 • Make it live through the network
Availability
  • EG EC2 AMI is available (easy to find with the IntelliJ plugin :))
   ami-c140a5a8
Check the Elastic Grid blog for updates and status
                                                             2008 JavaOneSM Conference | java.com.sun/javaone | 30
Elastic Grid and EC2
How Can Amazon EC2 Benefit from the Elastic Grid
Solution?

Dennis Reedy               dennis.reedy@elastic-grid.com
Jerome Bernard            jerome.bernard@elastic-grid.com

BOF-5105
Backups




          2008 JavaOneSM Conference | java.com.sun/javaone | 32
Demonstration – 2nd approach

 Same as before, but this time, EG drives scalability with
 watches on both CPU usage and SQS queue size
 [Insert here the opstring addition]

 Still running outside of Amazon EC2 world!




                                            2008 JavaOneSM Conference | java.com.sun/javaone | 33
Demonstration – 2nd approach - Results

 No performance hit
 • Running on QuadCore – Win. increases total time by 47s,
 • Running on 2xQuadCore – Mac. increases total time by 47s,
 • Due to the lowerDampener and upperDampener set to 60s
 No more instances running than what’s needed!

 EG scales the number of SQS “workers” according to the SQS
 queue length and how much CPU is used.
 EG can quickly provision/unprovision “workers” based on
 those metrics!

                                                  2008 JavaOneSM Conference | java.com.sun/javaone | 34
Demonstration – 3rd approach

 Same as before, but this time, both the MPEG-4 and FLV
 videos are put on Amazon S3.
 This means uploading the local MPEG-4 videos to S3: this
 work is done by our JSB smart proxy!
  • No change on the client!
 Each SQS “worker”:
  • downloads the MPEG-4 video from an Amazon S3 “bucket”,
  • convert it to many FLV formats,
  • and uploads the results to another “bucket”

 Still running out of Amazon EC2 world!
                                           2008 JavaOneSM Conference | java.com.sun/javaone | 35
Demonstration – 3rd approach - Results

 This solution trades CPU for bandwidth
  • Something not optimal for a LAN cluster!
 Upload bandwidth is the limiting factor:
  • On ADSL-2+, max at 60KBps, total processing time becomes an issue!
  • This means a bit more than 9 days for 45GB!
 Solution: copy the MPEG-4 videos on a disk, go to your
 datacenter facility, connect the drive, copy the content and
 upload from there!
 Billing is not optimal: billed for uploading of MPEG-4,
 downloading of MPEG-4 and uploading of FLV files!


                                                  2008 JavaOneSM Conference | java.com.sun/javaone | 36
Challenges

AMI creation & management
 • Application changes result in changes to AMI
 • Re-“push” & deploy
Application Management
 • Fault Detection & Recovery
 • Application reliability
Scalability
 • Making your application meet service level objectives
Accounting
 • Fine-grained accounting
 • Pay for what you use

                                                     2008 JavaOneSM Conference | java.com.sun/javaone | 37
Rio
 Policy-Based infrastructure automating the deployment and
 execution of distributed applications
  • Measure Responses against Service Level Agreements
  • Dynamic execution fabric
  • Platform and application aware
 Providing …
  • Deployment & management capabilities
  • POJO-based development approach
  • Fault detection and recovery
  • SLA Management
  • Declarative service model
 Built on
  • Java and Jini technologies
                                         2008 JavaOneSM Conference | java.com.sun/javaone | 38
Demonstration – A real world use case
The Problem
 French TV channel in need of video conversion for streaming
 of short videos on the Web
  • for now on..
  • VOD will come really soon
  • ...and CatchUp TV is close too, I suppose!
 Video conversion and streaming
  • done by a 3rd party,
  • but there are streaming issues and some conversion glitches
 As of the beginning of April 08,
  • more than 1.1K videos...
  • ... for about 45GB of MPEG-4 data!

                                             2008 JavaOneSM Conference | java.com.sun/javaone | 39
Demonstration – A real world use case
The Problem
 Pricing:
  • 7€/GB for streaming,
  • 300€/month for video conversion, that is   $438 $456 per month!
                                                    per month! month!
                                                         $474 per


 This solution won’t scale:
  • about 30 videos per day...
  • ... for 1.5GB of MPEG-4
  • being converted on 1 machine!




                                                   2008 JavaOneSM Conference | java.com.sun/javaone | 40
Demonstration – A real world use case
The Problem
 Pricing:
  • 7€/GB for streaming,
  • 300€/month for video conversion, that is   $438 $456 per month!
                                                    per month! month!
                                                         $474 per


 This solution won’t scale:
  • about 30 videos per day...
  • ... for 1.5GB of MPEG-4
  • being converted on 1 machine!




                                                   2008 JavaOneSM Conference | java.com.sun/javaone | 40
Demonstration – A real world use case
The Problem
 Pricing:
  • 7€/GB for streaming,
  • 300€/month for video conversion, that is   $438 $456 per month!
                                                    per month! month!
                                                         $474 per


 This solution won’t scale:
  • about 30 videos per day...
  • ... for 1.5GB of MPEG-4
  • being converted on 1 machine!




                                                   2008 JavaOneSM Conference | java.com.sun/javaone | 40
Demonstration – A real world use case
The Objectives
 Storage should be cheap
  • MPEG-4 videos and FLV videos should be stored on Amazon S3
 Streaming should be fast and reliable
  • cheap CDN in order to increase both the bps and the QoS
  • being served from our FLV videos on Amazon S3
 Flexibility of deployments for video conversion
  • should be able to both on a LAN
  • ... and EC2 infrastructure!
 Flexibility of deployments for video conversion
  • don’t want to wait for hours...


                                                  2008 JavaOneSM Conference | java.com.sun/javaone | 41
Demonstration Iterations

 Approach 1
  • LAN based approach using single computer
  • Using automated SLA management
  • System scales based on observed thresholds
 Approach 2
  • EC2 based deployment, using EG AMIs
  • Dynamic deployment of application to EC2 from S3
  • Using automated SLA management
  • System scales application instances (as opposed EC2 instances*) based
   on observed thresholds



                                                    2008 JavaOneSM Conference | java.com.sun/javaone | 42
Demonstration – 1st approach

 Local/network file system for both the MPEG-4 videos and
 the converted videos (FLV).
 Distribution of video conversion requests:
  • done by our “smart proxy” sending Amazon SQS messages
  • .. with the name of the video to convert
 Video conversion done on machines on the LAN
  • those machines needs access to the MPEG-4 videos!
 Use of a Rio JSB (with the help of the EG framework)
  • driving the mencoder OpenSource tool
  • each JSB polls the SQS queue for requests


                                          2008 JavaOneSM Conference | java.com.sun/javaone | 43
Demonstration – 1st approach - Results




  Number of Services
               1       2   4   6
                                   2008 JavaOneSM Conference | java.com.sun/javaone | 44
Demonstration – 1st approach - Results




  Number of Services
               1       2   4   6
                                   2008 JavaOneSM Conference | java.com.sun/javaone | 44
Demonstration – 4th approach

 Same as before, but this time, the cluster is hosted on
 Amazon EC2!
 This means a LAN client uploading the local videos to S3:
  • just as before this work is done by our JSB “smart proxy”.
 Each SQS “worker” on Amazon EC2:
  • downloads the S3 video from a “bucket”,
  • convert it to the many FLV flavors,
  • and uploads the encoded videos to another “bucket”




                                              2008 JavaOneSM Conference | java.com.sun/javaone | 45
Demonstration – 4th approach

 EG starts new Amazon EC2 instances based on CPU usage
 and the length of the SQS queue!
 Accordingly to how the SLAs are configured
  • [Insert here the OpString extract]




                                        2008 JavaOneSM Conference | java.com.sun/javaone | 46
Demonstration – 4th approach - Results

 Slower on a per instance basis, but can scale to tens, or
 hundreds of instances in order to run this in a timely
 fashion!
 Upload bandwidth still is the limiting factor!
  • Investment needed on LAN to S3 bandwidth
  • Prefer a symmetric connection, like SDSL or Fiber or Cable.
 The billing problem of the 3rd approach is gone
  • because the bandwidth between EC2 and S3 is free
  • $8.55/month for MPEG-4
  • $5.7 for upload
  • $5.82/month for FLV
  • + EC2 fees depending on the number of videos to convert.
                                                2008 JavaOneSM Conference | java.com.sun/javaone | 47
Demonstration – 4th approach - Results

 EC2 advantages:
  • Converting 1.1K videos on 1 instances cost as much as converting 1.1K
   videos on 100 instances
 • Unless you need each instance less than an hour => Amazon, you
   should really per minute/CPU or second/CPU!


 EG advantages:
  • You don’t need much work in order to do this: simply declare the
   appropriate Scaling Policy Handler in your OpString!
 • You can develop/test on your LAN and deploy on Amazon EC2.



                                                    2008 JavaOneSM Conference | java.com.sun/javaone | 48

Contenu connexe

En vedette

Presentació REEPS
Presentació REEPSPresentació REEPS
Presentació REEPSIgnasi.Pilar
 
Pla de lectura de L'IES La Mar de la Frau
Pla de lectura de L'IES La Mar de la FrauPla de lectura de L'IES La Mar de la Frau
Pla de lectura de L'IES La Mar de la FrauIsabel Castro Ahedo
 
Sep 2008 - St. Anthony's Catholic School - Father Nick’s 25 Anniversary in th...
Sep 2008 - St. Anthony's Catholic School - Father Nick’s 25 Anniversary in th...Sep 2008 - St. Anthony's Catholic School - Father Nick’s 25 Anniversary in th...
Sep 2008 - St. Anthony's Catholic School - Father Nick’s 25 Anniversary in th...kcetling
 
How To Put On Frontpage
How To Put On FrontpageHow To Put On Frontpage
How To Put On FrontpageFurugrund
 
Introducing govt.and politics key words
Introducing govt.and politics key wordsIntroducing govt.and politics key words
Introducing govt.and politics key wordssarahbutterworth
 
Web mòbil (Josep Salom)
Web mòbil (Josep Salom)Web mòbil (Josep Salom)
Web mòbil (Josep Salom)Atictes
 
Crear un podcast en poderato.com
Crear un podcast en poderato.comCrear un podcast en poderato.com
Crear un podcast en poderato.comMassimo Pennesi
 
A Matter Of Choice
A Matter Of ChoiceA Matter Of Choice
A Matter Of ChoiceAbidin Xynul
 
Born Supremacy Part 2
Born Supremacy Part 2Born Supremacy Part 2
Born Supremacy Part 2soisauce001
 
Islandian Lasai
Islandian LasaiIslandian Lasai
Islandian Lasaiakinlo
 
Manual De Bolso Produtos EducaçãO E Atendimento
Manual De Bolso   Produtos EducaçãO E AtendimentoManual De Bolso   Produtos EducaçãO E Atendimento
Manual De Bolso Produtos EducaçãO E Atendimentosr.wilson
 
Websites vroeger en nu
Websites vroeger en nuWebsites vroeger en nu
Websites vroeger en nuEva Simon
 

En vedette (20)

Presentació REEPS
Presentació REEPSPresentació REEPS
Presentació REEPS
 
Misterio
MisterioMisterio
Misterio
 
Pla de lectura de L'IES La Mar de la Frau
Pla de lectura de L'IES La Mar de la FrauPla de lectura de L'IES La Mar de la Frau
Pla de lectura de L'IES La Mar de la Frau
 
Zetta
Zetta Zetta
Zetta
 
Sep 2008 - St. Anthony's Catholic School - Father Nick’s 25 Anniversary in th...
Sep 2008 - St. Anthony's Catholic School - Father Nick’s 25 Anniversary in th...Sep 2008 - St. Anthony's Catholic School - Father Nick’s 25 Anniversary in th...
Sep 2008 - St. Anthony's Catholic School - Father Nick’s 25 Anniversary in th...
 
Nem Tudo E Facil
Nem Tudo E FacilNem Tudo E Facil
Nem Tudo E Facil
 
How To Put On Frontpage
How To Put On FrontpageHow To Put On Frontpage
How To Put On Frontpage
 
Introducing govt.and politics key words
Introducing govt.and politics key wordsIntroducing govt.and politics key words
Introducing govt.and politics key words
 
Web mòbil (Josep Salom)
Web mòbil (Josep Salom)Web mòbil (Josep Salom)
Web mòbil (Josep Salom)
 
Crear un podcast en poderato.com
Crear un podcast en poderato.comCrear un podcast en poderato.com
Crear un podcast en poderato.com
 
A Matter Of Choice
A Matter Of ChoiceA Matter Of Choice
A Matter Of Choice
 
Born Supremacy Part 2
Born Supremacy Part 2Born Supremacy Part 2
Born Supremacy Part 2
 
things that i like
things that i likethings that i like
things that i like
 
Chapter Outline
Chapter OutlineChapter Outline
Chapter Outline
 
Islandian Lasai
Islandian LasaiIslandian Lasai
Islandian Lasai
 
Париж
ПарижПариж
Париж
 
Ip Is Hot
Ip Is HotIp Is Hot
Ip Is Hot
 
Manual De Bolso Produtos EducaçãO E Atendimento
Manual De Bolso   Produtos EducaçãO E AtendimentoManual De Bolso   Produtos EducaçãO E Atendimento
Manual De Bolso Produtos EducaçãO E Atendimento
 
Websites vroeger en nu
Websites vroeger en nuWebsites vroeger en nu
Websites vroeger en nu
 
Debian GNU
Debian GNUDebian GNU
Debian GNU
 

Dernier

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Dernier (20)

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Elastic Grid Talk at JavaOne 08 (San Francisco, USA)

  • 1. Elastic Grid and EC2 How Can Amazon EC2 Benefit from the Elastic Grid Solution? Dennis Reedy Jerome Bernard
  • 2. Agenda EC2 and Amazon Web Services • Capabilities, benefits and challenges Elastic Grid introduction • Technology, approach and benefits Elastic Grid and EC2 • Deploying and scaling applications using Elastic Grid Demonstration 2008 JavaOneSM Conference | java.com.sun/javaone | 2
  • 3. Cloud Computing A way to increase capacity or add capabilities on the fly without investing in new infrastructure, training new personnel, or licensing new software Virtualized hardware available for computation • Resources “in the cloud” Low cost of entry, utility based model • Pay for what you use Embraced by startups, and medium to large corporations as a way to bypass IT Cloud Computing Providers (Utility) • Amazon, Sun, IBM, 3Tera 2008 JavaOneSM Conference | java.com.sun/javaone | 3
  • 4. Amazon EC2 Overview In a nutshell • Provides resizable compute capacity in the cloud EC2 Amazon Machine Image (AMI) • Operating System & application “stack” • Deployed using Amazon Web Services to the “cloud” EC2 Instances • Virtual machines that run AMIs 2008 JavaOneSM Conference | java.com.sun/javaone | 4
  • 5. Typical Architecture Taxonomy Applications Virtual Platform Upper Platform Lower Platform Hardware Platform 2008 JavaOneSM Conference | java.com.sun/javaone | 5
  • 6. Typical Architecture Taxonomy (more detail) Applications Middleware Support, JDBC, JMS, … Enterprise Containers, JEE, Spring, ESBs, OSGi, ... Provisioning, Management, Monitoring & Metering Hardware Platform 2008 JavaOneSM Conference | java.com.sun/javaone | 6
  • 7. EC2 AMI Stack Applications Middleware Support, JDBC, JMS, … Enterprise Containers, JEE, Spring, ESBs, OSGi, ... Provisioning, Management, Monitoring & Metering Hardware Platform 2008 JavaOneSM Conference | java.com.sun/javaone | 7
  • 8. EC2 AMI Stack Applications Middleware Support, JDBC, JMS, … AMI Enterprise Containers, JEE, Spring, ESBs, OSGi, ... Provisioning, Management, Monitoring & Metering Hardware Platform Virtualized 2008 JavaOneSM Conference | java.com.sun/javaone | 7
  • 9. EC2 AMIs: Deployment Challenges The EC2 AMI is a boot image, requires substantial system administrator knowledge As application code changes, AMIs typically need to change Not focused on developer productivity Boot base AMI Copy private key and Upload to S3 certificate (for bundling image) Install and configure requisite software 2008 JavaOneSM Conference | java.com.sun/javaone | 8
  • 10. Elastic Grid Dynamic infrastructure for the dynamic deployment, activation, management of Java applications on virtualized hardware Technology building blocks • Rio • Typica • Jets3t • Jini (River) 2008 JavaOneSM Conference | java.com.sun/javaone | 9
  • 11. Elastic Grid Architecture Administrative Application S3 Console Monitor SLA Policy Enforcement Monitor & Meter Application Agents 2008 JavaOneSM Conference | java.com.sun/javaone | 10
  • 12. Elastic Grid Architecture Administrative Application S3 Console Monitor SLA Policy Application Monitor Enforcement Deploys and manages applications (composed of services), provides failover (if service(s) fail they are re-created), and methods to scale and relocate services Monitor & Meter Application Agents 2008 JavaOneSM Conference | java.com.sun/javaone | 10
  • 13. Elastic Grid Architecture Administrative Application S3 Console Monitor SLA Policy Enforcement Application Agent EG AMI Represents the capabilities of a virtualized compute resource, acts as a dynamic agent instantiating application services Monitor & Meter Application Agents 2008 JavaOneSM Conference | java.com.sun/javaone | 10
  • 14. Elastic Grid EC2 AMI Stack Applications Middleware Support, JDBC, JMS, … Enterprise Containers, JEE, Spring, ESBs, OSGi, ... Provisioning, Management, Monitoring & Metering Hardware Platform 2008 JavaOneSM Conference | java.com.sun/javaone | 11
  • 15. Elastic Grid EC2 AMI Stack Applications Middleware Support, JDBC, JMS, … Dynamic Application Enterprise Containers, JEE, Spring, ESBs, OSGi, ... Provisioning, Management, Monitoring & Metering EG AMI Hardware Platform Virtualized 2008 JavaOneSM Conference | java.com.sun/javaone | 11
  • 16. EC2 AMIs: Deployment with EG AMIs EG AMIs are pre-set, no need to (re-)bundle As application code changes, upload to S3 and deploy Focuses on developer productivity Boot EG AMIs Deploy ... Upload (modified) app to S3 2008 JavaOneSM Conference | java.com.sun/javaone | 12
  • 17. Elastic Grid Deployment Deploy application code S3 1 Upload S3 Command to deploy the application is made 3 As needed download All code is dynamically served application resources and instantiated Application is monitored 2 Deploy activate and managed across EC2 instances Application Monitors Application Agents 2008 JavaOneSM Conference | java.com.sun/javaone | 13
  • 18. Elastic Grid Scalability on EC2 Across existing AMIs App Agent AMI App Monitor AMI SLA App Service Policy Handler 80% allocate Memory Observer register • Allocate an Application Service • Create SLA Policy Handler that registers for Memory utilization notifications • SLA has upper limit set to 80% 2008 JavaOneSM Conference | java.com.sun/javaone | 14
  • 19. Elastic Grid Scalability on EC2 Across existing AMIs App Agent AMI App Monitor AMI SLA App Service Policy Handler increment 80% Memory Observer notify • Memory utilization exceeds 80% • SLA Policy Handler is notified • App Monitor allocates another Application Service instance to appropriate App Agent AMI 2008 JavaOneSM Conference | java.com.sun/javaone | 15
  • 20. Elastic Grid Scalability on EC2 Across existing AMIs App Agent AMI App Monitor AMI SLA App Service Policy Handler increment 80% Memory Observer notify • Memory utilization exceeds 80% • SLA Policy Handler is notified • App Monitor allocates another Application Service instance to appropriate App Agent AMI 2008 JavaOneSM Conference | java.com.sun/javaone | 15
  • 21. Elastic Grid Scalability on EC2 New EC2 Instance App Agent AMI App Monitor AMI EC2 App Service Policy Handler 80% allocate Memory Observer • Allocate an Application Service • Create EC2 Policy Handler which registers for Memory utilization notifications • SLA has upper limit set to 80% 2008 JavaOneSM Conference | java.com.sun/javaone | 16
  • 22. Elastic Grid Scalability on EC2 New EC2 Instance App Agent AMI App Monitor AMI SLA App Service Policy Handler increment 80% Memory Observer notify 2008 JavaOneSM Conference | java.com.sun/javaone | 17
  • 23. Elastic Grid Scalability on EC2 New EC2 Instance App Agent AMI App Monitor AMI SLA App Service Policy Handler increment 80% Memory Observer App Agent AMI notify App Service SLA Policy Handler Memory Observer 2008 JavaOneSM Conference | java.com.sun/javaone | 17
  • 24. Elastic Grid Benefits So what EG does for the app? • Ease development and deployment of Java applications using Amazon services • Provides automated management, fault detection and scalability for the application Why EG should be used • Ease deployment and management of your Java applications 2008 JavaOneSM Conference | java.com.sun/javaone | 18
  • 25. Elastic Grid Tools Tools Used in the Demonstration IntelliJ plugin Rio UI Web Console 2008 JavaOneSM Conference | java.com.sun/javaone | 19
  • 26. Demonstration – A real world use case The Problem French TV channel in need of video conversion for streaming of short videos on the Web • for now on.. • VOD will come really soon • ...and CatchUp TV is close too, I suppose! Video conversion and streaming • done by a 3rd party, • but there are streaming issues and some conversion glitches As of the beginning of April 08, • more than 1.1K videos... • ... for about 40GB of MPEG-4 data! 2008 JavaOneSM Conference | java.com.sun/javaone | 20
  • 27. Demonstration – A real world use case The Problem Pricing: • 7€/GB for streaming, • 300€/month for video conversion, that is $438 $456 per month! per month! month! $474 per This solution won’t scale: • about 30 videos per day... • ... for 1.5GB of MPEG-4 • being converted on 1 machine! 2008 JavaOneSM Conference | java.com.sun/javaone | 21
  • 28. Demonstration – A real world use case The Problem Pricing: • 7€/GB for streaming, • 300€/month for video conversion, that is $438 $456 per month! per month! month! $474 per This solution won’t scale: • about 30 videos per day... • ... for 1.5GB of MPEG-4 • being converted on 1 machine! 2008 JavaOneSM Conference | java.com.sun/javaone | 21
  • 29. Demonstration – A real world use case The Problem Pricing: • 7€/GB for streaming, • 300€/month for video conversion, that is $438 $456 per month! per month! month! $474 per This solution won’t scale: • about 30 videos per day... • ... for 1.5GB of MPEG-4 • being converted on 1 machine! 2008 JavaOneSM Conference | java.com.sun/javaone | 21
  • 30. Demonstration – A real world use case The Objectives Storage should be cheap • MPEG-4 videos and FLV videos should be stored on Amazon S3 Streaming should be fast and reliable • cheap CDN in order to increase both the bps and the QoS • being served from our FLV videos on Amazon S3 Flexibility of deployments for video conversion • should be able to both on a LAN • ... and EC2 infrastructure! Flexibility of deployments for video conversion • don’t want to wait for hours... 2008 JavaOneSM Conference | java.com.sun/javaone | 22
  • 31. Demonstration Architecture IntelliJ SQS EG CLI polls Video Tomcat Web App Converter reads writes S3 S3 (source) (dest) 2008 JavaOneSM Conference | java.com.sun/javaone | 23
  • 32. Demonstration Iterations Approach 1 • LAN based approach using single computer • Using automated SLA management • System scales based on observed thresholds Approach 2 • EC2 based deployment, using EG AMIs • Dynamic deployment of application to EC2 from S3 • Using automated SLA management • System scales application instances (as opposed EC2 instances) based on observed thresholds 2008 JavaOneSM Conference | java.com.sun/javaone | 24
  • 33. Demonstration – 1st approach Local/network file system for both the MPEG-4 videos and the converted videos (FLV). Distribution of video conversion requests: • done by our “smart proxy” sending Amazon SQS messages • .. with the name of the video to convert Video conversion done on machines on the LAN • those machines needs access to the MPEG-4 videos! Use of a dynamic service (with the help of the EG framework) • driving the mencoder OpenSource tool • each Video Converter polls the SQS queue for requests 2008 JavaOneSM Conference | java.com.sun/javaone | 25
  • 34. Demonstration – 1st approach - Results Number of Services 1 2 4 6 2008 JavaOneSM Conference | java.com.sun/javaone | 26
  • 35. Demonstration – 1st approach - Results Number of Services 1 2 4 6 2008 JavaOneSM Conference | java.com.sun/javaone | 26
  • 36. Demonstration – 2nd approach Same as before, but this time, the cluster is hosted on Amazon EC2! The videos were previously uploaded on S3! Each service running on Amazon EC2: • downloads the S3 video from a “bucket”, • convert it to the many FLV flavors, • and uploads the encoded videos to another “bucket” 2008 JavaOneSM Conference | java.com.sun/javaone | 27
  • 37. Demonstration – 2nd approach - Results Number of Amazon EC2 instances 1 2 4 6 2008 JavaOneSM Conference | java.com.sun/javaone | 28
  • 38. Demonstration – 2nd approach - Results Number of Amazon EC2 instances 1 2 4 6 2008 JavaOneSM Conference | java.com.sun/javaone | 28
  • 39. Video Conversion for Streaming of Short Videos 2008 JavaOneSM Conference | java.com.sun/javaone | 29
  • 40. Summary Elastic Grid extends EC2, enabling users to manage & dynamically scale application service instances and AMIs based on declarable SLAs Cloud decides allocation of services • QoS approach provides feedback mechanisms based on SLAs • Today: Human decides/admins each machine Provisioning/changing services is simple • Dynamic reconfigurable systems • Make it live through the network Availability • EG EC2 AMI is available (easy to find with the IntelliJ plugin :)) ami-c140a5a8 Check the Elastic Grid blog for updates and status 2008 JavaOneSM Conference | java.com.sun/javaone | 30
  • 41. Elastic Grid and EC2 How Can Amazon EC2 Benefit from the Elastic Grid Solution? Dennis Reedy dennis.reedy@elastic-grid.com Jerome Bernard jerome.bernard@elastic-grid.com BOF-5105
  • 42. Backups 2008 JavaOneSM Conference | java.com.sun/javaone | 32
  • 43. Demonstration – 2nd approach Same as before, but this time, EG drives scalability with watches on both CPU usage and SQS queue size [Insert here the opstring addition] Still running outside of Amazon EC2 world! 2008 JavaOneSM Conference | java.com.sun/javaone | 33
  • 44. Demonstration – 2nd approach - Results No performance hit • Running on QuadCore – Win. increases total time by 47s, • Running on 2xQuadCore – Mac. increases total time by 47s, • Due to the lowerDampener and upperDampener set to 60s No more instances running than what’s needed! EG scales the number of SQS “workers” according to the SQS queue length and how much CPU is used. EG can quickly provision/unprovision “workers” based on those metrics! 2008 JavaOneSM Conference | java.com.sun/javaone | 34
  • 45. Demonstration – 3rd approach Same as before, but this time, both the MPEG-4 and FLV videos are put on Amazon S3. This means uploading the local MPEG-4 videos to S3: this work is done by our JSB smart proxy! • No change on the client! Each SQS “worker”: • downloads the MPEG-4 video from an Amazon S3 “bucket”, • convert it to many FLV formats, • and uploads the results to another “bucket” Still running out of Amazon EC2 world! 2008 JavaOneSM Conference | java.com.sun/javaone | 35
  • 46. Demonstration – 3rd approach - Results This solution trades CPU for bandwidth • Something not optimal for a LAN cluster! Upload bandwidth is the limiting factor: • On ADSL-2+, max at 60KBps, total processing time becomes an issue! • This means a bit more than 9 days for 45GB! Solution: copy the MPEG-4 videos on a disk, go to your datacenter facility, connect the drive, copy the content and upload from there! Billing is not optimal: billed for uploading of MPEG-4, downloading of MPEG-4 and uploading of FLV files! 2008 JavaOneSM Conference | java.com.sun/javaone | 36
  • 47. Challenges AMI creation & management • Application changes result in changes to AMI • Re-“push” & deploy Application Management • Fault Detection & Recovery • Application reliability Scalability • Making your application meet service level objectives Accounting • Fine-grained accounting • Pay for what you use 2008 JavaOneSM Conference | java.com.sun/javaone | 37
  • 48. Rio Policy-Based infrastructure automating the deployment and execution of distributed applications • Measure Responses against Service Level Agreements • Dynamic execution fabric • Platform and application aware Providing … • Deployment & management capabilities • POJO-based development approach • Fault detection and recovery • SLA Management • Declarative service model Built on • Java and Jini technologies 2008 JavaOneSM Conference | java.com.sun/javaone | 38
  • 49. Demonstration – A real world use case The Problem French TV channel in need of video conversion for streaming of short videos on the Web • for now on.. • VOD will come really soon • ...and CatchUp TV is close too, I suppose! Video conversion and streaming • done by a 3rd party, • but there are streaming issues and some conversion glitches As of the beginning of April 08, • more than 1.1K videos... • ... for about 45GB of MPEG-4 data! 2008 JavaOneSM Conference | java.com.sun/javaone | 39
  • 50. Demonstration – A real world use case The Problem Pricing: • 7€/GB for streaming, • 300€/month for video conversion, that is $438 $456 per month! per month! month! $474 per This solution won’t scale: • about 30 videos per day... • ... for 1.5GB of MPEG-4 • being converted on 1 machine! 2008 JavaOneSM Conference | java.com.sun/javaone | 40
  • 51. Demonstration – A real world use case The Problem Pricing: • 7€/GB for streaming, • 300€/month for video conversion, that is $438 $456 per month! per month! month! $474 per This solution won’t scale: • about 30 videos per day... • ... for 1.5GB of MPEG-4 • being converted on 1 machine! 2008 JavaOneSM Conference | java.com.sun/javaone | 40
  • 52. Demonstration – A real world use case The Problem Pricing: • 7€/GB for streaming, • 300€/month for video conversion, that is $438 $456 per month! per month! month! $474 per This solution won’t scale: • about 30 videos per day... • ... for 1.5GB of MPEG-4 • being converted on 1 machine! 2008 JavaOneSM Conference | java.com.sun/javaone | 40
  • 53. Demonstration – A real world use case The Objectives Storage should be cheap • MPEG-4 videos and FLV videos should be stored on Amazon S3 Streaming should be fast and reliable • cheap CDN in order to increase both the bps and the QoS • being served from our FLV videos on Amazon S3 Flexibility of deployments for video conversion • should be able to both on a LAN • ... and EC2 infrastructure! Flexibility of deployments for video conversion • don’t want to wait for hours... 2008 JavaOneSM Conference | java.com.sun/javaone | 41
  • 54. Demonstration Iterations Approach 1 • LAN based approach using single computer • Using automated SLA management • System scales based on observed thresholds Approach 2 • EC2 based deployment, using EG AMIs • Dynamic deployment of application to EC2 from S3 • Using automated SLA management • System scales application instances (as opposed EC2 instances*) based on observed thresholds 2008 JavaOneSM Conference | java.com.sun/javaone | 42
  • 55. Demonstration – 1st approach Local/network file system for both the MPEG-4 videos and the converted videos (FLV). Distribution of video conversion requests: • done by our “smart proxy” sending Amazon SQS messages • .. with the name of the video to convert Video conversion done on machines on the LAN • those machines needs access to the MPEG-4 videos! Use of a Rio JSB (with the help of the EG framework) • driving the mencoder OpenSource tool • each JSB polls the SQS queue for requests 2008 JavaOneSM Conference | java.com.sun/javaone | 43
  • 56. Demonstration – 1st approach - Results Number of Services 1 2 4 6 2008 JavaOneSM Conference | java.com.sun/javaone | 44
  • 57. Demonstration – 1st approach - Results Number of Services 1 2 4 6 2008 JavaOneSM Conference | java.com.sun/javaone | 44
  • 58. Demonstration – 4th approach Same as before, but this time, the cluster is hosted on Amazon EC2! This means a LAN client uploading the local videos to S3: • just as before this work is done by our JSB “smart proxy”. Each SQS “worker” on Amazon EC2: • downloads the S3 video from a “bucket”, • convert it to the many FLV flavors, • and uploads the encoded videos to another “bucket” 2008 JavaOneSM Conference | java.com.sun/javaone | 45
  • 59. Demonstration – 4th approach EG starts new Amazon EC2 instances based on CPU usage and the length of the SQS queue! Accordingly to how the SLAs are configured • [Insert here the OpString extract] 2008 JavaOneSM Conference | java.com.sun/javaone | 46
  • 60. Demonstration – 4th approach - Results Slower on a per instance basis, but can scale to tens, or hundreds of instances in order to run this in a timely fashion! Upload bandwidth still is the limiting factor! • Investment needed on LAN to S3 bandwidth • Prefer a symmetric connection, like SDSL or Fiber or Cable. The billing problem of the 3rd approach is gone • because the bandwidth between EC2 and S3 is free • $8.55/month for MPEG-4 • $5.7 for upload • $5.82/month for FLV • + EC2 fees depending on the number of videos to convert. 2008 JavaOneSM Conference | java.com.sun/javaone | 47
  • 61. Demonstration – 4th approach - Results EC2 advantages: • Converting 1.1K videos on 1 instances cost as much as converting 1.1K videos on 100 instances • Unless you need each instance less than an hour => Amazon, you should really per minute/CPU or second/CPU! EG advantages: • You don’t need much work in order to do this: simply declare the appropriate Scaling Policy Handler in your OpString! • You can develop/test on your LAN and deploy on Amazon EC2. 2008 JavaOneSM Conference | java.com.sun/javaone | 48