Beruflich Dokumente
Kultur Dokumente
Session S311528
John Stanford
Principal Field Technologist
Scott Mattoon
Principal Field Technologist
Ken Pepple
Principal Engineer
Learn How To Combine Software and Infrastructure Patterns to Effectively Leverage Cloud Computing With Your Application
Agenda
Software and Infrastructure Pattern Introduction Common Web Functional Patterns Cloud Provisioning Patterns Cloud Monitoring Patterns Cloud Resource Patterns
Most famously described in Design Patterns: Elements of Reusable Object-Oriented Software for software Single solution that could be implementing many different ways to solve many problems Also applied to infrastructure problems Building blocks of applications and architectures
2009 CommunityOne WEST Conference | san francisco, ca | developers.sun.com/events/communityone 4
Cloud APIs transform provisioning from a procedure mostly done by system admins to code executed in response to events (Deployment Engineering) Need to be heavily automated so that they can be invoked dozens of times per day Need to be flexible to cover all tiers of application architecture
Application servers refreshed daily Database servers updated yearly Application code pushed System image static
Provisioned Elements
Base OS Utilities and agents Platforms and frameworks Custom application code Configuration files Data and volumes Console Cloud interface Compute instance Image repository CMDB Provisioning system
2009 CommunityOne WEST Conference | san francisco, ca | developers.sun.com/events/communityone 7
Participants
Very simple scripted provisioning from golden images Deploys full stack to cloud compute image with little customisation Appropriate for low complexity, low volatility code bases Easy integration into existing monitoring processes May be more secure could run keyless External orchestration left to console (load balancer) Requires very good Test/QA procedures and management of golden images May be used for small parts of the larger strategy
Appliances like DNS or monitoring servers Low code volatility, highly available servers like databases
2009 CommunityOne WEST Conference | san francisco, ca | developers.sun.com/events/communityone 8
magic happens
Push Provisioning
Builds on static pattern by pushing additional provisioning instructions from console Usually implemented as scripted shell commands over SSH Requires more administrative knowledge and substantial scripting (error handling) Easy integration into existing system administration and developer processes Appropriate for higher codebase volatility and architectural complexity but may not scale
Have to login into each new instance from console for many long transactions
This process may interact with other systems as part of the commands. For example, install scripts may pull down packages from the Internet.
12
Pull Provisioning
Builds on static pattern by introducing client/server interactions between compute instance and separate provisioning server
Compute instance checks periodically with provisioning server for it's configuration Provisioning server tracks, compiles and distributes configuration rules CMDB may be separate or combined for reporting
Appropriate for high codebase volatility and architectural complexity at great scale Adds several new participants which introduce administrative overhead and points of failure Provisioning server handles external orchestration
2009 CommunityOne WEST Conference | san francisco, ca | developers.sun.com/events/communityone 14
15
17
Primary Stategies
18
Monitored Elements:
Availability Utilization Latency / Throughput Integrity
Running Instances * *
Images
Object Storage
Network
Participants
Scripts and Agents Management Frameworks Rules Logs Console Gateways / Proxies Cloud interface
19
Agent Based
Pros
Rich data High control over what's observed Realtime event detection Resource overhead on every instance Data traverses public network Lifecycle sustaining implications
Cons
20
Agent Based
Pros
Rich data High control over what's observed Realtime event detection Resource overhead on every instance Data traverses public network Lifecycle sustaining implications
Cons
21
Watch Polling
Pros
No resource overhead Simple Scope is dimensionable No sustaining implications Costs 1.5 / Instance / Hr Limited data Lock in
Cons
22
23
24
Need to answer complex questions to perform actions Must move away from spreadsheet management Don't want to leave decision making to end customer
Exposes complexity Opens door to collisions Consistency Repeatability Singleton, pooled, generated Owned, shared
Do want to enable
Resource Types
Allocation Types
25
26
Only one instance of the resource Many to one mapping with consumers Examples of resources:
DNS server name Load balancer IP Firewall IP Future-proofing Capacity planning Depend on consumer good behavior Implement an auditor to determine which resources are in use Consider TTLs on reservations that fail the audit
2009 CommunityOne WEST Conference | san francisco, ca | developers.sun.com/events/communityone 27
Why bother?
Risks
Mitigation
28
29
Discrete number of resource instances Defined/Created outside the system Examples of resources:
IP range VLAN range Instance ID (when there is a max # of instances) Better than a spreadsheet Depend on consumer good behavior to release instances Depends on admin good behavior to define unique instances Implement an auditor to determine which resources are in use Consider TTLs on reservations that fail the audit
2009 CommunityOne WEST Conference | san francisco, ca | developers.sun.com/events/communityone 30
Why bother?
Risks
Mitigation
31
32
Unlimited number of resource instances Created within the system based on policies Examples of resources:
Host names Instance ID (when there is no max # of instances) Correlated to external information (date, time, moon phase) Avoids duplication Promotes consistency Dependent on policy accuracy Sample data generator Testing
2009 CommunityOne WEST Conference | san francisco, ca | developers.sun.com/events/communityone 33
Why bother?
Risks
Mitigation
34
35
Summary
There is substantial reuse of traditional software and infrastructure patterns in cloud applications Characteristics of cloud computing force many of the operational patterns to be formalized and addressed through code during development There are some new functional and non-functional areas of patterns for cloud applications The composition of these patterns have new and unexpected non-functional implications Architecture is more important than ever
36
Call to Action
Propose a pattern Comment on an existing pattern Propose an anti-pattern https://wikis.sun.com/display/cloud/Patterns Storage Compute OpenOffice Netbeans/Kenai http://www.sun.com/cloud http://kenai.com/projects/suncloudapis
2009 CommunityOne WEST Conference | san francisco, ca | developers.sun.com/events/communityone 37
John Stanford
john.stanford@sun.com
Scott Mattoon
scott.mattoon@sun.com
Ken Pepple
ken.pepple@sun.com