windows azure compute l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Windows Azure Compute PowerPoint Presentation
Download Presentation
Windows Azure Compute

Loading in 2 Seconds...

play fullscreen
1 / 31

Windows Azure Compute - PowerPoint PPT Presentation


  • 148 Views
  • Uploaded on

Windows Azure Compute. Name Title Microsoft Corporation. Session Objectives and Takeaways. Describe Windows Azure Compute Understand Model and Terminology. Windows Azure. Windows Azure is a foundation of Microsoft’s Cloud Platform for Developers Operating System for the Cloud

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Windows Azure Compute' - stephan


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
windows azure compute

Windows Azure Compute

Name

Title

Microsoft Corporation

session objectives and takeaways
Session Objectives and Takeaways
  • Describe Windows Azure Compute
  • Understand Model and Terminology
windows azure
Windows Azure
  • Windows Azure is a foundation of Microsoft’s Cloud Platform for Developers
  • Operating System for the Cloud
    • Runs applications in the cloud
    • Provides Storage
    • Application Management
    • Developer SDK
  • Windows Azure ideal for applications needing
    • Scalability
    • Availability
    • Fault Tolerance
windows azure in one picture
Windows Azure, In One Picture

Business Portal

Developer Portal

REST

Service Management Service

User Code

Runtime API

Storage Cluster

VS Tools

Compute Cluster

WA SDK

VM Setup

REST

MSFT Datacenters

Desktop

Cloud VM

subscriptions and services
Subscriptions and Services
  • A subscription contains a collection of up to 6 services
    • Determines the billing model
    • May include a level of bundled usage
  • A service consists of
    • An isolation boundary and ca public URL
    • A set of component roles (up to 5), each with endpoints
    • At runtime; one or more identical instances of each role
  • Services are defined in a service model
roles and instances
Roles and Instances
  • Roles are defined in a Service Model
    • May define one or more Roles per Service
    • A role definition specifies
      • VM size
      • Communication Endpoints
      • Local storage resources
      • Etc…
  • At runtime each Role will execute on one or more instances (up to 20 per subscription)
    • A role instance is a set of code, configuration, and local data, deployed in a dedicated VM
the high scale application archetype
The High Scale Application Archetype

Windows Azure provides a ‘pay-as-you-go’ scale out application platform

Intelligent Network Load Balancer

Network Activation

Stateless Web and/or Application Servers

Stateless ‘Worker’ Machines

Async Activation

State Tier

Queues

Key/ValueDatastores

Partitioned RDBMS

Shared Filesystem

windows azure service architecture
Windows Azure Service Architecture

The Internet

The Internet via TCP or HTTP

Tables

LB

LB

LB

Storage

Queues

Web Site

(ASPX, ASMX, WCF)

Worker Service

Web Site

(ASPX, ASMX, WCF)

Worker Service

Web Role

IIS as Host

Worker Role

Managed Interface Call

Blobs

Windows Azure Data Center

windows azure tooling
Windows Azure Tooling

Windows Azure Tools for Visual Studio

  • Visual Studio 2008
  • Visual Studio 2010
  • Project Templates
  • Model & Config Tooling
  • Package & 1 Click Deploy
  • Debugging Support
  • Storage Explorer
  • Server Explorer
  • IntelliTrace Support

Windows Azure SDK

  • Windows Server 2008 or Windows 7
  • SQL Express 2005+
  • .NET 3.5 SP1+
  • Development Fabric
  • Development Storage
  • .NET APIs
role programming model
Role Programming Model
  • Inherits RoleEntryPoint
  • OnStart() Method
    • Called by Fabric on startup, allows you to perform initialization tasks.
    • Reports Busy status to load balancer until you return true.
  • Run() Method
    • Main logic is here – can do anything, typically infinite loop. Should never exit.
  • OnStop() Method
    • Called when role is to be shutdown, graceful exit.
    • 30 Seconds to tidy up
role lifecycle
Role Lifecycle

All roles may extend RoleEntryPoint

Roles report status via RoleEnvironment

Events

Methods

Status

Role Lifetime

Busy

OnStart

StatusCheck

Requests Routed

Fabric Calls

StatusCheck

Ready

Run

Busy

OnStop

StatusCheck

Stopping

worker role patterns
Worker Role Patterns
  • Queue Polling Worker
    • Poll and Pop Messages within while(true) loop
    • E.g. Map/Reduce pattern, background image processing
  • Listening Worker Role
    • Create TcpListener or WCF Service Host
    • E.g. Run a .NET SMTP server or WCF Service
  • External Process Worker Role
    • OnStart or Run method executes Process.Start()
    • E.g. Run a database server, web server, distributed cache
web role
Web Role
  • All features of a worker role + IIS
  • ASP.NET 3.5 SP1 or 4.0 – 64bit
  • IIS7 Hostable Web Core
  • Hosts
    • Webforms or MVC
    • FastCGI applications (e.g. PHP)
  • Http(s)
  • Web/Worker Hybrid
    • Can optionally implement RoleEntryPoint
the service model
The Service Model
  • Defines the shape of each role
  • Internal and External Endpoints
  • Configuration setting definitions

<WebRole name="WebRole1">

<InputEndpoints>

<InputEndpoint name="HttpIn" protocol="http" port="80" />

</InputEndpoints>

<ConfigurationSettings>

<Setting name="DiagnosticsConnectionString" />

<Setting name="HelloMessage"/>

</ConfigurationSettings>

</WebRole>

the service configuration
The Service Configuration
  • Defines the scale of each role
  • Instance count
  • Configuration values

<Role name="WebRole1">

<Instances count="1" />

<ConfigurationSettings>

<Setting name="DiagnosticsConnectionString" value="UseDevelopmentStorage=true" />

<Setting name="HelloMessage" value="Hello World!" />

</ConfigurationSettings>

</Role>

a service example
A Service Example

Port 8090Http

Port 80Http

WA-GUEST-OS-1.3

Customer Web Site

Thumbnail Worker

WebDav

Height

200px

500MB

Width

200px

StatusSvcHTTP

XL

S

M

Service Configuration

Service Definition

vm size in windows azure
VM Size in Windows Azure
  • Windows Azure
    • Supports Various VM Sizes
    • Size set on Role in Service Definition
    • Service can have multiple roles
    • Balance of Performance per node vs. High Availability from multiple nodes
    • Set in Service Model definitionAll instances of role will be of equal size
choosing your vm size
Choosing Your VM Size
  • Don’t just throw big VMs at every problem
  • Scale out architectures have natural parallelism
  • Test various configurations under load
  • More small instances == more redundancy
  • Some scenarios will benefit from more cores
    • Where moving data >$ parallel overhead
    • E.g. Video processing, Stateful services (DBMS)
net 4 parallelism support
.NET 4 Parallelism Support
  • Parallelism is a key trend
    • Availability of multi-core processors
  • Task parallel library
    • High level “threading” model
  • Parallel Extensions
    • Parallel Loops
  • Task Parallel Library
    • High level in threaded tasks
  • Parallel LINQ
    • Automatically parallelize LINQ to Objects queries
inter role communications
Inter-Role Communications
  • High performance sync calls between instances
  • Define Internal Endpoints in model
  • Enumerate Running Instances within Role
  • Enumerate endpoints in each role
  • Communicate on internal endpoint

for each (RoleInstance ri in RoleEnvironment.CurrentRoleInstance.Role.Instances) { Trace.WriteLine("Instance ID: " + ri.Id);

for each (RoleInstanceEndpoint ep in ri.InstanceEndpoints.Values)

{

Trace.WriteLine("Instance endpoint IP address” + “and port: " + ep.IPEndpoint);

}

}

local storage
Local Storage
  • Role instances have available disk storage
  • Use LocalStorage element in service definition
    • Name
    • CleanOnRoleRecycle
    • Size
  • Persistent but not guaranteed durableGood for cached resources
  • Windows Azure Storage Drives provide guaranteed durable storage
local storage22
Local Storage

Define in Config

<LocalResources>

<LocalStorage name=“myLocalDisk" sizeInMB="10" cleanOnRoleRecycle="false" />

</LocalResources>

Use in Code

string rootPath = RoleEnvironment.GetLocalResource[“myLocalDisk”]

.RootPath;

DirectoryInfo di = new DirectoryInfo(rootPath);

foreach(di.EnumerateFiles())

….

configuration values
Configuration Values
  • Store arbitrary configuration string values
    • Define in model
    • Populate in configuration
  • RoleEnvironment
    • .GetConfigurationSettingValue()
  • Don’t use web.config for values you wish to change at runtime
    • App/Web.config is packaged with deployment change requires re-deploy
    • *.cscfg supports change tracking and notification to running role instances
handling config changes
Handling Config Changes
  • RoleEnvironment.Changing
    • Occurs before configuration is changed
    • Can be cancelled – causes a recycle
  • RoleEnvironment.Changed
    • Occurs after config change has been applied
  • RoleEnvironmentConfigurationSettingChange
    • Provides config value that was changed
  • RoleEnvironmentTopologyChange
    • When role count is changed
handling config changes25
Handling Config Changes

Port 8090HTTP

Port 80Http

Customer Web Site

Thumbnail Worker

Web Dav

Changed

OnStart

StatusSvcHTTP

EnumerateInstances in WebDav Role

StatusSvcHTTP

Regular Polling for Status

73984

Regular Polling for Status

83425

configuration
demo

Configuration

Name

Title

Group

monitoring
Monitoring
  • More in Lifecycle Session on Day 3
  • Limited Debugging in Cloud (Intellitrace)
  • Instrument your application using Trace, Debug
    • DiagnosticMonitorTraceListener
  • Use Diagnostics API to Configure and Collect
    • Event Logs
    • Performance Counters
    • Trace/Debug information (logging)
    • IIS Logs, Failed Request Logs
    • Crash Dumps or Arbitrary files
  • Request data on demand or scheduled
    • Transferred into your table and/or blob storage
upgrading your application
Upgrading Your Application
  • More in Lifecycle Session on Day 3
  • VIP Swap:
    • Uses Staging and Production environments.
    • Allows to quickly swap environments.
    • Production: v1  Staging: v2, after swap then Production: v2  Staging: v1.
  • In-Place Upgrade
    • Performs a rolling upgrade on live service.
    • Entire service or a single role
    • Manual or Automatic across update domains
    • Cannot change Service Model
challenges
Challenges
  • Stateless Role Instances
    • Session state
    • Local storage
    • AJAX requests may callback different instance
  • Non-Admin Rights
    • Cannot easily register COM components
    • Registration free COMhttp://tinyurl.com/Reg-Free-COM
summary
Summary
  • Service model defines service shape
  • Service configuration defines service scale
  • Selectable VM Sizes
  • Windows Azure provides specific configuration capability
    • Scale out aware
    • Allows event based change subscription
  • Monitoring
  • Upgrading and Deployment
slide31

© 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.