worker role fault domainfault domain worker role fault domainfault domain u/g domain #1u/g domain...

30
Managing, Debugging, and Monitoring Windows Azure Applications Name Title Microsoft Corporation

Upload: james-morton

Post on 11-Jan-2016

232 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

Managing, Debugging, and Monitoring Windows Azure ApplicationsNameTitleMicrosoft Corporation

Page 2: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

What will we accomplish today?Help you understand the Windows Azure deployment and management model.Discover how to monitor your services and any caveats that might apply.Discuss how to troubleshoot your services in the cloud

Page 3: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

Understanding Packaging and ConfigWindows Azure Services are described by two important artifacts:

Service Definition (*.csdef)Service Configuration (*.cscfg)

Your code is zipped and packaged with definition (*.cspkg)

Encrypted(Zipped(Code + *.csdef)) == *.cspkgWindows Azure consumes just (*.cspkg + *.cscfg)

Page 4: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

Service DefinitionDescribes the shape of your Windows Azure Service

Defines Roles, Ports, Certificates, Configuration Settings, Startup Tasks, IIS Configuration, and more…

Can only be changed by upgrades or new deployments

Page 5: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

Service ConfigurationSupplies Runtime Values (Scale, Config Settings, Certificates to use, VHD, etc.)Can be updated any time through Portal or API

Page 6: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

Fault and Upgrade DomainsFault Domains

Represent groups of resources anticipated to fail togetheri.e. Same rack, same server

Fabric spreads instances across fault domainsDefault of 2

Upgrade DomainsRepresents groups of resources that will be upgraded togetherSpecified by upgradeDomainCount in ServiceDefinitionDefault of 5

Fabric splits Upgrade Domains across Fault Domains and Across Roles

Page 7: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

Fault and Upgrade Domains Visualized

Rack

Web Role

VM

VM

Worker RoleVM

VM

Fault Domain

Rack

Web Role

VM

VM

Worker RoleVM

VM

Fault Domain

U/G Domain #1

U/G Domain #2

U/G Domain #1

U/G Domain #2

Page 8: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

Deployment EnvironmentsTwo Environments to choose fromNearly Identical…

<servicename>.cloudapp.net<deploymentID>.cloudapp.net

VIP Swap between them

Page 9: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

Deploying ServicesDelete/Create Deployment

Visual Studio does this.VIP will changeService Model Updates don’t matter

VIP SwapBring up another environment in Staging and swapOnly Input Endpoints (external ports) matter

In-Place UpgradeRolling upgrade across rolesMost restrictive on changes (no size, endpoints, roles, etc.)

Web Deploy*

Page 10: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

VIP Swap Deployment

Web Role

VM

Worker Role

Load Balancer:

Prod

Stage

VM

VM

VM

Prod

StageDeployment

Web Role

VM

Worker Role

VM

VM

VM

Page 11: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

In Place Upgrade

Load Balancer:

Prod

Rack

Web Role

VM

VM

Worker RoleVM

VM

Rack

Web Role

VM

VM

Worker RoleVM

VM

#1

#2

#1

#2

Page 12: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

Deployment ConsiderationsSometimes you MUST delete a deployment

Try to minimize by specifying what you might need in advance

Deleting a deployment loses the VIP addressMight matter if you are whitelistingOr… if you use A records

Use DNS as another layer of abstraction if you must delete

Use another hosted service, update DNS, wait…

Page 13: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

Further ConsiderationsCo-Admin CapabilityUp to 5 Management API CertificatesAdmins are admins at Subscription Level (not hosted service)Production should be in separate subscription to avoid mistakes.

Page 14: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

Managing Services

Management API

REST API

Portal

Your Service

Page 15: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

Deployment and Management ToolsVisual Studio*CSManage.exeWindows Azure MMCWindows Azure Service Management (WASM) cmdlets3rd Party tools

Page 16: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

Windows Azure Service Management Cmdlets

Set of PowerShell cmdletsWraps Management REST API and Diagnostics APIEnables building of sophisticated deployment scriptsWorks with rest of .NET CLR

Page 17: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

Windows Azure MMCMMC Snapin providing graphical view of services, diagnostics, and storageBuilt on top of WASM CmdletsPlugin-based, extensibleRemotely configure diagnosticsDownload and view diagnostics

Page 18: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

Deploying via CmdletsNameTitleGroup

demo

Page 19: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

MonitoringWindows Azure DiagnosticsWindows Azure Monitoring MP for SCOM

Available as RC now!Monitors Health, Scales, and more

Page 20: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

Windows Azure DiagnosticsYou can monitor the following:

IIS Logs, Crash Dumps, FREB LogsArbitrary log filesPerformance CountersEvent LogsDebug/Trace statementsInfrastructure events

Page 21: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

How does it work (in a nutshell)?

Role Instance StartsDiagnostic Monitor Starts**Monitor is configured

Imperatively at Start timeRemotely any time

Monitor buffers data locallyUser can set a quota (FIFO)

User initiates transfer to storageScheduled or On Demand

Role

Role Instance

Diagnostic Monitor

Local directory storage

Page 22: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

Remote Configuration

Role

Role Instance

Diagnostic Monitor

Local directory storage

Poll Interval

Page 23: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

DiagnosticsNameTitleGroup

demo

Page 24: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

Storage ConsiderationsStandard costs apply for transactions, storage & bandwidthData Retention

Local buffers are aged out by the Diagnostic Monitor according to configurable quotasYou control data retention for data in table/blob storageDedicated or multiple storage accounts might be a good idea

Query Performance on Tabular DataPartitioned by high-order bits of the tick countQuery by time is efficientFilter by verbosity level at transfer time

Page 25: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

Diagnostics ConsiderationsMonitoring vs Debugging/TroubleshootingVolume of DataReaction Time$ Cost

Monitoring 5 Performance Counters every 5 seconds for 100 instances costs > $260 US dollar per month

Page 26: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

Advanced DiagnosticsThink about Scale Units

One instance monitorsAggregate DataFlag important events/Notify

InstanceInstanceInstanceInstanceInstance

Monitor

Page 27: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

TroubleshootingIntellitrace – DVR for debugging

Requires VS Ultimate, .NET 4 todayRemote DesktopCustom Trace Listener

Page 28: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

TroubleshootingNameTitleGroup

demo

Page 29: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

SummaryWindows Azure offers a number of ways to deploy code

Know which one to choose!Windows Azure DiagnosticsMonitoring vs Troubleshooting – use the right tools.

Page 30: Worker Role Fault DomainFault Domain Worker Role Fault DomainFault Domain U/G Domain #1U/G Domain #1U/G Domain #2U/G Domain #2U/G Domain #1U/G

© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the

date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.