18
Windows Azure Cloud Services Jim O’Neil Senior Software Engineer BlueMetal Architects, Inc. @jimoneil

Windows Azure Cloud Services

Embed Size (px)

DESCRIPTION

Overview of Windows Azure Cloud Services (PaaS) presented at the 2014 Global Windows Azure Bootcamp (#GWAB) in Watertown, MA.

Citation preview

Page 1: Windows Azure Cloud Services
Page 2: Windows Azure Cloud Services

Session Objectives and Takeaways

Describe Windows Azure Cloud Service

Understand Model and Terminology

Page 3: Windows Azure Cloud Services

What is a Cloud Service?

A container of related service roles

Web Role Worker Role

Page 4: Windows Azure Cloud Services

Roles and Instances

At runtime each Role will execute on one or more instances A role instance is a set of code, configuration, and local data, deployed in a dedicated VM

Roles are defined in a Hosted ServiceA role definition specifies:VM sizeCommunication EndpointsLocal storage resourcesetc.

Page 5: Windows Azure Cloud Services

HOSTED SERVICE

Roles and InstancesExample Hosted Service configuration with a single web role and a two worker roles

VM1 VM2 VM3 VM4

VM5 VM6 VM7 VM8

VM9

VM1 VM2 VM1 VM2

VM3

Page 6: Windows Azure Cloud Services

Fault Domains

99.95% Uptime GuaranteeRequires 2 or more instances per role

Role instance are isolated by fault domainFault domains isolate VMsFault domains provide redundancyAt least two fault domains per role

Page 7: Windows Azure Cloud Services

Upgrade Domains

Page 8: Windows Azure Cloud Services

Inherits RoleEntryPoint

OnStart() Method

Run() Method

OnStop() Method

Role Programming Model

Page 9: Windows Azure Cloud Services

Worker Role Patterns

Poll and Pop Messages within while(true) loopE.g. Map/Reduce pattern, background image processing

Create TcpListener or WCF Service HostE.g. Run a .NET SMTP server or WCF Service

OnStart or Run method executes Process.Start()Startup Task installs or executes background/foreground processCustom Role Entry Point (executable or .Net assembly)E.g. Run a database server, web server, distributed cache

Page 10: Windows Azure Cloud Services

Web Role

Webforms or MVCFastCGI applications (e.g. PHP)Multiple Websites

Can optionally implement RoleEntryPoint

Page 11: Windows Azure Cloud Services

VM Size in Windows Azure

Windows AzureSupports Various VM SizesSize set on Role in Service Definition - All instances of role will be of equal size Service can have multiple rolesBalance of Performance per node vs. High Availability from multiple nodes

Extra Small

Shared 1.0 GHz 768M 20GB .02

Small 1 1.6 GHz 1.75GB 225GB .12

Medium 2 1.6 GHz 3.5GB 490GB .24

Large 4 1.6 GHz 7GB 1,000GB .48

Extra large

8 1.6 GHz 14GB 2,040GB .96

Page 12: Windows Azure Cloud Services

More small instances == more redundancy

Some scenarios will benefit from more coresWhere moving data >$ parallel overheadE.g. Video processing, Stateful services (DBMS)

Choosing Your VM Size

Don’t just throw big VMs at every problem

Scale out architectures have natural parallelism

Test various configurations under load

Page 13: Windows Azure Cloud Services

Local Storage

Role instances have available disk storage

Not durable!!Good for cached resources or temporary files

For persistence useSQL Database

Windows Azure Tables

Windows Azure Blobs

Page 14: Windows Azure Cloud Services

Windows Azure Service Architecture

Windows Azure Data Center

Storage

Page 15: Windows Azure Cloud Services

Randomizer Lab

Queue Storage

WorkerRole

WebRole

TableStorage

Console App

Page 16: Windows Azure Cloud Services

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)) == *.cspkg

Windows Azure consumes just (*.cspkg + *.cscfg)

Page 17: Windows Azure Cloud Services

Upgrading Your Application

VIP Swap:Uses Staging and Production environmentsAllows to quickly swap environmentsProduction: v1 Staging: v2, after swap then Production: v2 Staging: v1

In-Place UpgradePerforms a rolling upgrade on live serviceEntire service or a single roleManual or Automatic across update domainsCannot change Service Model

Page 18: Windows Azure Cloud Services

Summary

Cloud Service is for multi-tier online services

Scalability achieved through stateless patterns

Service model defines service shape

Service configuration defines service scale

Upgrading and Deployment