The document discusses Dynamic Deployment and Scalability for the Cloud. It provides an introduction to cloud computing and platforms like Amazon EC2. It then summarizes Elastic Grid, an open source project that provides automated management, fault detection and scalability for applications deployed on cloud platforms. It allows applications to be deployed and dynamically scaled across cloud infrastructure like Amazon EC2. The presentation demonstrates Elastic Grid through sample deployments and a demo of deploying a Spring application on Amazon.
2. Overall Presentation Goals
Learn what Cloud Computing is about
Learn how to deploy and scale
applications on any Cloud Platform
www.devoxx.com
3. Speaker’s qualifications
Jerome Bernard is a committer on Rio, Typica, JiBX and
co-founder of Elastic Grid, LLC.
Jerome Bernard speaks frequently on Cloud Computing
Recently: JavaOne, JavaZone and the Open World
Forum
Jerome Bernard is working with many clients using EC2,
from TV channels to specialized media processing
companies.
Cloud Computing event in the work for early ‘09 in Paris,
France. You’re invited!
3 www.devoxx.com
4. Agenda
Introduction to the Cloud Computing
Introduction to Amazon EC2
Introduction to Elastic Grid
Sample Deployments
Demo
www.devoxx.com
5. Intro to the Cloud Computing
Why Cloud Computing?
Next logical step after virtualization
We want to use resources to their best usage, nothing
more, nothing less, and be able to scale hardware too
Can your traditional hosting scale to thousands of
machines in a week?
Can you afford spending huge amounts buying hardware
if you only need it for a week?
5 www.devoxx.com
6. Intro to the Cloud Computing
Which Cloud Computing flavor?
Software as a Service (SaaS)
Platform as a Service (PaaS)
Infrastructure as a Service (IaaS)
References
SaaS : SalesForce, Facebook, LinkedIn
PaaS : SalesForce (EC2), Google App Engine, Microsoft
Azure
IaaS : Amazon EC2, GoGrid, Flexiscale
6 www.devoxx.com
7. Platform as a Service
Google App Engine
Make use of BigTable and Memcache
Integrate with Google Accounts
But in Python only...
Microsoft Azure
Mostly thought for Windows and .Net solutions
Pricing model yet unclear
7 www.devoxx.com
8. PaaS vs IaaS
PaaS Pros
Usually easier to use than IaaS
Integrate with specific environments (Google, Microsoft
Live, etc.)
PaaS Cons
Less/No control over the Infrastructure
Languages/Services chosen by the provider
Vendor Lock-in
8 www.devoxx.com
9. Introduction to Amazon EC2
Amazon EC2 is Infrastructure as a Service (IaaS)
Rent a server on a per hour base (from $.10 to $.80)
Many Operating Systems (Linux, Solaris, Windows)
EC2 Amazon Machine Image (AMI)
Operating and system stack
Deployed to Amazon S3 (cheap storage)
EC2 instances
Virtual machines that run AMI
9 www.devoxx.com
13. Amazon EC2 pitfalls
EC2 AMI Challenges
The EC2 AMI is a boot image, requires substantial system
administrator knowledge
As application code changes, AMIs typically need to
change / be re-bundled
Boot base AMI
Copy private key and
Upload to S3 certificate (for bundling
image)
Install and configure requisite
software
12 www.devoxx.com
14. Amazon EC2 pitfalls (cont.)
Infrastructure challenges
Networking: no multicast but this is what most Java
framework uses for clustering (JGroups, Shoal, etc.)
Backup: the local filesystem has no durability guarantee
From the time you ask for an EC2 instance to boot and
the time it is ready, you can expect a few minutes...
Failures: you have to design your application to be
resilient to EC2 instance failures. Anyway you should
always do so :-)
13 www.devoxx.com
15. Amazon EC2 advices
Some few AWS advices
I/O: prefer an than Elastic Block Storage (EBS) volume to
a local filesystem
Snapshot EBS volumes periodically (incremental backup)
but export to S3 for complete backups
Choose the right instance type
Don’t use Small for production!
Don’t choose based on disk space (think EBS)
Choose based on available memory and CPU cores
14 www.devoxx.com
16. Introduction to Elastic Grid
Elastic Grid (abbreviated as EG)
Project initiated in early ’08
AGPLv3 license
Part of the OW2 community
Elastic Grid, LLC. founded in May ‘08
Dennis Reedy: Director US Operations, founder of the Rio
OSS project, old VP Advanced Technology at
Gigaspaces, old Principal Engineer at Sun
Jerome Bernard: we already went through this :-)
15 www.devoxx.com
18. Introduction to Elastic Grid
Cloud Management Fabric
Provides an adaptive capability to dynamically
instantiate, monitor & manage application components
The deployment provides context on service
requirements, dependencies, associations and
operational parameters
Provisioning services additionally provides pluggable
download distribution and resource utilization analysis
mechanisms to effectively use resources on the network
17 www.devoxx.com
19. Introduction to Elastic Grid
Cloud Virtualization Layer
Abstracts specific Cloud Computing provider technology
Allows portability across specific implementations
You can deploy on:
Private Cloud
Amazon EC2
More to come soon...
18 www.devoxx.com
20. Introduction to Elastic Grid
Service Level Agreements (SLAs)
Specified in Deployment Descriptors: non-intrusive with
your code
Provides selection of the best machine where to deploy
the services based on the requirements
Provides active monitoring of SLA with many strategies
like service relocation, provisioning of additional
instances, provisioning of additional services, etc.
Green Computing and Cost Savings: when the load
decreases, EG un-provision your unneeded services
instances and servers
19 www.devoxx.com
27. Introduction to Elastic Grid
Deployments with Elastic Grid
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
23 www.devoxx.com
28. Introduction to Elastic Grid
Elastic Grid Deployments
Deploy application code 1 Upload S3
to S3
3 As needed download
Run the deploy command application resources
All code is dynamically 2 Deploy
served and instantiated activate
Application is monitored Application
Monitors
and managed across EC2
instances
Application Agents
www.devoxx.com
29. Introduction to Elastic Grid
Elastic Grid Scalability on EC2
Across existing EC2 instances
App Agent EC2 Instance App Monitor EC2 Instance
SLA
App Service Policy Handler
80% allocate
Memory
Observer register
• Allocate an Application Service
• Create a SLA Policy Handler
that registers for Memory
utilization notifications
• SLA has upper limit set to 80%
25 www.devoxx.com
30. Introduction to Elastic Grid
Elastic Grid Scalability on EC2
Across existing EC2 instances
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 Instance
26 www.devoxx.com
31. Introduction to Elastic Grid
Elastic Grid Scalability on EC2
Across existing EC2 instances
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 Instance
26 www.devoxx.com
32. Introduction to Elastic Grid
Elastic Grid Scalability on EC2
New EC2 instance
App Agent EC2 Instance App Monitor EC2 Instance
EC2
App Service Policy Handler
80% allocate
Memory
Observer
• Allocate an Application Service
• Create an EC2 Policy Handler
which registers for Memory
utilization notifications
• SLA has upper limit set to 80%
27 www.devoxx.com
33. Introduction to Elastic Grid
Elastic Grid Scalability on EC2
New EC2 instance
App Agent EC2 Instance App Monitor AMI
SLA
App Service Policy Handler increment
80%
Memory
Observer
notify
28 www.devoxx.com
34. Introduction to Elastic Grid
Elastic Grid Scalability on EC2
New EC2 instance
App Agent EC2 Instance App Monitor AMI
SLA
App Service Policy Handler increment
80%
Memory
Observer App Agent EC2 Instance
notify
App Service SLA
Policy Handler
Memory
Observer
28 www.devoxx.com
36. Sample Deployments
Calculator
Made of 4 core
services (add,
subtract, divide,
multiply)
Consumed by a
Calculator, with the
help of dynamic
associations
30 www.devoxx.com
37. Sample Deployments
Spring Bean Deployment
Simple tell the name of the Spring context
.. and the Bean to expose as a Service
You still benefit from SLAs, associations, etc.
31 www.devoxx.com
38. Summary
So what does Elastic Grid for the app?
Ease development and deployment of Java applications
using Amazon services
Provides automated management, fault detection and
scalability for the application
To be soon available: Cloud Bursting!
Why Elastic Grid should be used?
Avoid Cloud Computing platforms pitfalls
Focus on development, not infrastructure
32 www.devoxx.com
40. Call to Action
Private Beta: come and see me at the end of the talk
so that you can get an early access to Elastic Grid.
Conference with Amazon Technology Evangelist on
Friday Morning
www.devoxx.com