summary to fully leverage cloud computing we need to understand both the strengths and weaknesses of...
TRANSCRIPT
![Page 1: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/1.jpg)
Copyright (c) 2010, Bill Wilder
Two Roles a Queue
New Hampshire Code Camp #205-June-2010
Boston Azure User Grouphttp://bostonazure.org@bostonazure
Bill Wilderhttp://blog.codingoutloud.com@codingoutloud
Boston West Toastmasters http://bwtoastmasters.com
Not here with my day jobOnly Bill’s personal views
Azure Web Roles, Worker Roles, and Queues
![Page 3: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/3.jpg)
• http://en.wikipedia.org/wiki/Q_(James_Bond)Who are these guys?
![Page 4: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/4.jpg)
Agenda for Roles & Queues
• What are Roles and Queues?• What tools are needed?• Why are Roles important?• Why are Queues important?• Why does RnQnRn matter?• How do I Build, Debug, and Deploy?
• Helping mere mortals build highly reliable applications that scale…
![Page 5: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/5.jpg)
Two Key Concepts
1. Rolesa) Web Rolesb) Worker Roles
2. Queues
![Page 6: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/6.jpg)
Web Roles are a lot like Web PagesASP.NET Page Web Role Worker Role
Build using ASP.NET, MVCRuns in IIS 7Visible to InternetGood to handle interactive usersGood for hosting Web API (WCF)Language Agnostic
![Page 7: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/7.jpg)
Queue
![Page 8: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/8.jpg)
Key Pattern: Roles + Queues
WebRole(IIS)
WorkerRole
Queues
BlobsTables
![Page 9: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/9.jpg)
Canonical Example: Thumbnails
WebRole(IIS)
WorkerRole
Queues
BlobsTables
![Page 10: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/10.jpg)
Key Pattern: Roles + Queues
WebRole(IIS)
WorkerRole
Queues
Simplify and Focus
![Page 11: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/11.jpg)
Key Pattern: Roles + Queues
WebRole(IIS)
WorkerRole
Queues
queue.AddMessage( new CloudQueueMessage( statusUpdateMessage));
CloudQueueMessage statusUpdateMessage = queue.GetMessage( TimeSpan.FromSeconds(10));
![Page 12: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/12.jpg)
The Windows Azure …
TOOL and RUNTIME STACKS
![Page 13: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/13.jpg)
Azure Development Tool Stack
• Visual Studio• C#, VB.NET, F#, …• .NET Runtime• Dev Fabric, Azure Toolkit , Azure SDK
• Plus…• Could be non-Visual Studio, non-.NET-based• REST access to all Azure Services
![Page 14: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/14.jpg)
Pre-Azure Server Stack
• .NET Runtime (3.5)• Windows Server 2008, IIS 7• Windows Communication Foundation (WCF)• SQL Server• SQL Server• • MSMQ • ASP.NET, ASP.NET MVC •
![Page 15: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/15.jpg)
Azure Server Stack
• .NET Runtime (3.5)• Windows Server 2008, IIS 7• Windows Communication Foundation (WCF)• SQL Server SQL Azure• SQL Server Azure Blobs• null Azure Table Storage• MSMQ Azure Queues• ASP.NET, ASP.NET MVC Azure Web Role• null (Windows Services) Worker Roles
![Page 16: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/16.jpg)
Pre-Azure Operational Concerns
• Buying hardware• CapEx • (Human) Ops Resource Intensive
![Page 17: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/17.jpg)
Azure Operational Concerns
• Buying hardware null• CapEx Variable cost / Utility pricing• (Human) Ops Resource Intensive null
+ Communication paths reduced
![Page 18: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/18.jpg)
31
Concerns for App Owner
Slide stolen from Chris Bowen’s talk: Windows Azure: What? Why? And a Peek Under the Hood
Application Development
Network Addressing
Network Load Balancing
Hardware Repair
OS updates & Patches
OS Installation
Computational Scalability
Storage Scalability
Hardware Provisioning
Staging / Production
High Availability
Fault Tolerance
Data Center Management
Stuff We MightRather Not Deal With
Stuff We Like
![Page 19: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/19.jpg)
Key Windows Azure Design Pattern…
TWO ROLES AND A QUEUE
![Page 20: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/20.jpg)
Key Pattern: Roles + Queues
WebRole(IIS)
WorkerRole
Queues
![Page 21: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/21.jpg)
Key Pattern: Rolesn + Queuesn
RnQnRn
WebRole(IIS)
WorkerRole
Queues
WebRole(IIS)
WebRole(IIS)
WebRole(IIS)
WorkerRoleWorker
RoleWorker
Role Type 1
WorkerRoleWorker
RoleWorkerRoleWorker
Role Type 2
![Page 22: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/22.jpg)
Roles and Queue
• Allow loosely coupled workflow between roles• Messages not processed strictly FIFO
• Queue length (and trend) is key metric for tuning Role deployment numbers
![Page 23: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/23.jpg)
Azure Queues by the Numbers
• 100% = Reliability of message delivery• 30 seconds = default “invisibility window”• 8 KB = max size of a queued item• 7 days = max length an item can stay on queue• 500 = approx number of transactions a queue
can handle per second• N = number of queues you can have (N >> 1)
![Page 24: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/24.jpg)
“Out” is the New “Up”
• Scaling Out has hard limits at CPU, Memory– Architecturally more limiting
![Page 25: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/25.jpg)
RnQnRn requires Idempotent
• If we do a task twice, end result same as if we did it once
![Page 26: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/26.jpg)
RnQnRn enables Responsive
• Response to interactive users is as fast as a work request can be persisted
• Time consuming work done off-line• Same total resource consumption, better
subjective experience
![Page 27: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/27.jpg)
RnQnRn enables Scalable
• Loosely coupled, concern-independent scaling• Blocking is Bane of Scalability– Decoupled front/back ends insulate from other
system issues if…– Twitter down– Email server unreachable– Order processing partner doing maintenance– Internet connectivity interruption
![Page 28: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/28.jpg)
RnQnRn enables Resilient
• “Plan for failure”• There will be role restarts• Bake in handling of restarts– Not an exception!– Restarts are routine, system “just keeps working”
• Change the “service” topology by adding or removing role instances… – Without service interruption
![Page 29: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/29.jpg)
Common Operational Challenges
• Hard to upgrade without downtime• Wasteful to provision for peak load• Time consuming to add more dev or test
environments
![Page 30: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/30.jpg)
What’s Up? (and what’s going down!)
Typical Site An Azure Role Azure SiteOperating System UpgradeApplication Update / DeployChange TopologyHardware FailureSoftware Bug / Crash / FailureSecurity Patch
![Page 31: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/31.jpg)
Scale Out easier to Spread Out• Scale out systems better
suited for geographic distribution– More efficient and flexible
because more granular– Hard for a mega-machine
to be in more than one place
– Failure need not be binary
![Page 32: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/32.jpg)
Azure’s Abstraction
• Code that knows about failover, other computers, environments, …– Does. Not. Exist. in your application code
• Azure’s AppFabric handles
• So Roles support many properties – Azure allows for a clean implementation or Roles
![Page 33: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/33.jpg)
These capabilities are not all new… right?
![Page 34: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/34.jpg)
Not new, but…
![Page 35: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/35.jpg)
Accessible to us mere mortalsLess complex, more cost-effective, competitive pressure: everyone’s doing it
![Page 36: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/36.jpg)
Advanced Queue Topics
• Code for retries – Plan to fail• Poison Messages• Exception handling• Fully utilize Roles – complexity trade-off• Async notification of new Queue items
![Page 37: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/37.jpg)
Advanced Worker Role Topics
• Full utilization of a WR instance is more work– Message stays in queue for 7 days– You pay by instance, not resource use within
• Tactics…– Read >1 message from queue at a time– Have multiple message types handled in one worker role– Build multi-threaded Worker Role
• Build simple “scale with the config file” systems– Is time-to-market more imp than deployment / run costs?– Trade off scale efficiency, maintainability, time-to-market
• Business Decisions!
![Page 38: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/38.jpg)
Silver Bullet?
• Question: Does Azure make my application scale automatically?
![Page 39: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/39.jpg)
Closing thought
• Do we really need “the cloud” for all these great properties?• Does (cloud == scalability +
operational simplicity + cost savings + fast time-to-market)?
![Page 40: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/40.jpg)
“These go to eleven” –Nigel Tufnel
The cloud is an amplifier – emerging as best system of software services + patterns + tools + ecosystem for tomorrow’s systems
![Page 41: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/41.jpg)
BostonAzure.org
• Boston Azure cloud user group• Focused on Microsoft’s cloud solution• Next meeting: 6-8 PM Thurs June 24th 2010– Hacking on “Boston Azure Project”
• Meetings usually 4th Thursday of month– No cost; food; great topics; growing community
• Join email list: http://bostonazure.org• Follow on Twitter: @bostonazure
![Page 42: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/42.jpg)
Slides
Link from my talk abstract:http://thedevcommunity.org
Link from my blog:http://blog.codingoutloud.com
![Page 43: Summary To fully leverage cloud computing we need to understand both the strengths and weaknesses of the cloud. In this talk, we will demonstrate how the](https://reader034.vdocuments.site/reader034/viewer/2022042814/551bbb59550346c3588b46d6/html5/thumbnails/43.jpg)
Bill Wilder@codingoutloudhttp://blog.codingoutloud.com