windows azure cloud services
DESCRIPTION
Overview of Windows Azure Cloud Services (PaaS) presented at the 2014 Global Windows Azure Bootcamp (#GWAB) in Watertown, MA.TRANSCRIPT
Session Objectives and Takeaways
Describe Windows Azure Cloud Service
Understand Model and Terminology
What is a Cloud Service?
A container of related service roles
Web Role Worker Role
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.
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
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
Upgrade Domains
Inherits RoleEntryPoint
OnStart() Method
Run() Method
OnStop() Method
Role Programming Model
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
Web Role
Webforms or MVCFastCGI applications (e.g. PHP)Multiple Websites
Can optionally implement RoleEntryPoint
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
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
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
Windows Azure Service Architecture
Windows Azure Data Center
Storage
Randomizer Lab
Queue Storage
WorkerRole
WebRole
TableStorage
Console App
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)
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
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