Introduction to Azure:
Microsoft‘s Cloud OS
DI Andreas Schabus Technology Advisor Microsoft Österreich GmbH
[email protected] www.codefest.at
Version 1.0
Agenda
Cloud Computing Fundamentals
Windows Azure Overview
The Windows Azure Service Model
Windows Azure Storage
Some Thoughts about an App Architecture
Cloud Computing Fundamentals
What is a „Cloud“?
“A standardized IT capability, such as
software, app platform, or infrastructure,
delivered via Internet technologies in a
pay-per-use and self-service way.”
“How To Message "Cloud" Offerings And Not Get Lost In The Fog”,
A. Schabus Windows Azure Introduction v.1.0
The Cloud Stack
Users/Customers/Consumers
Cl oud Sta ck
The Metal
Infrastructure as a Service
Platform as a Service
Software as a Service
White-label VARs / ISVs
Windo ws Azu re Amazo n EC2
Appistry
Sal es for ce.co m Mic ro soft CRM L ive
SQL Az ure
SmugMug Fo rce.c om
Custom Pr odu ct s
Slide 6
Cloud: Efficiency vs. Control
= Managed for You Standalone Servers
IaaS PaaS SaaS
Applications Runtimes Database
Operating System Virtualization
Server Storage
A. Schabus Windows Azure Introduction v.1.0
Die Microsoft „Cloud Offerings“
Slide 8
Users/Customers/Consumers
Cl ou d Stack
The Metal
Infrastructure as a Service
Platform as a Service
Software as a Service
White-label VARs / ISVs
Windo ws Azu re
Office 365Custom Pr odu ct s
Windows Live
Microsoft Azure
Overview
A. Schabus Windows Azure Introduction v.1.0
Windows Azure
Windows Azure is an OS for the data center
Handles resource management, provisioning, and monitoring
Manages application lifecycle
Allows developers to concentrate on business logic
Provides common building blocks for distributed applications
Reliable queuing, simple structured storage, SQL storage
Application services like access control, caching, and connectivity
Slide 10
What do we need from a „Plattform“?
Access to Data Stores
(ADO.NET EF, nHibernate, System.IO...) Business Logic
UI (Web) UI (AJAX, RIA, Client)
Services from other Applications and
Organisation
TCP / TDS
HTTP / XML (SOAP, REST…) HTTP / HTML
HTTP / XML (SOAP, REST…)
Stream
A. Schabus Windows Azure Introduction v.1.0
What do we need from a „Plattform“?
Slide 12
Access to Data Stores
(ADO.NET EF, nHibernate, System.IO...) Business Logic
UI (Web) UI (AJAX, RIA, Client)
Services from other Applications and
Organisation
TCP / TDS
HTTP / XML (SOAP, REST…) HTTP / HTML
HTTP / XML (SOAP, REST…)
Stream
Computing Power
(scalable)
Store
Relationale
Database
Secure
Integration
What do we need from a „Plattform“?
Access to Data Stores
(ADO.NET EF, nHibernate, System.IO...) Business Logic
UI (Web) UI (AJAX, RIA, Client)
Services from other Applications and
Organisation
TCP / TDS
HTTP / XML (SOAP, REST…) HTTP / HTML
HTTP / XML (SOAP, REST…)
Stream
A. Schabus Windows Azure Introduction v.1.0
Windows Azure Platform
Slide 14
Windows Azure Networking
“Red Dog” Front End (RDFE)
Windows Azure Compute
Windows Azure Middleware
Services
Windows Azure Applications
Windows Azure Data Services
Windows Azure Datacenter
The Windows Azure Service Model
The Microsoft Application Platform
Database
Middle Tier
Applications / Services Windows Azure Marketplace
Microsoft Online Services
A. Schabus Windows Azure Introduction v.1.0
Windows Azure Application Philosophy:
Design for Failure
Scale out for capacity
Scale out for redundancy
Asynchronous communication
Short time outs with retries
Idempotent operations
Stateless with durable external storage
Slide 18
Multi-Tier Cloud Application
A cloud application is typically made up of different components
Front end: e.g. load-balanced stateless web servers
Middle worker tier: e.g. order processing, encoding
Backend storage: e.g. SQL tables or files
Multiple instances of each for scalability and availability
Front- End Front-
HTTP/HTTP
Windows Azure
Load Balancer Middle-
A. Schabus Windows Azure Introduction v.1.0
The Windows Azure Service Model
A Windows Azure application is called a “service”
Definition information
Configuration information
At least one “role”
Roles are like DLLs in the service “process”
Collection of code with an entry point that runs in its own virtual machine
Windows Azure compute SLA requires two instances of each role
99.95% for connectivity to two instances
Achieved with update and fault domains
Slide 20
Role Types
There are currently three role types:
Web Role: IIS7 and ASP.NET in Windows Azure-supplied OS
Worker Role: arbitrary code in Windows Azure-supplied OS
VM Role: uploaded VHD with customer-supplied OS
VM Role: is it a VM?
No, because it is stateless
Good for:
Long install (5+ minutes)
Manual install/config
Fragile install/config
A. Schabus Windows Azure Introduction v.1.0
Windows Azure Portal
Slide 23
Windows Azure Storage
A. Schabus Windows Azure Introduction v.1.0
Windows Azure Storage Fundamentals
Storage characteristics
Durable – replicated three times
Scalable (capacity and throughput)
Highly available
Simple and familiar programming interfaces
REST (HTTP and HTTPS)
.NET accessible
Slide 29
Storage Objects
Blobs
Provide a simple interface for storing named files along with metadata for the file
Tables
Provide lightly structured storage with a set of entities that contain a set of properties
Queues
Provide reliable storage and delivery of messages
A. Schabus Windows Azure Introduction v.1.0
Storage Account and Blob Containers
Storage account
An account can have many blob containers
Container
A container is a set of blobs
Sharing policies are set at the container level
Public READ or Private
Associate metadata with container
Metadata is <name, value> pairs
Up to 8KB per container
List the blobs in a container
Slide 31
Blob Storage Concepts
Blob
Container
Account
sally
pictures
IMG001.JPG
IMG002.JPG
A. Schabus Windows Azure Introduction v.1.0
Table Data Model
Table
A storage account can create many tables
.NET classes and LINQ
A table is a set of entities (rows)
An entity is a set of properties (columns)
Billions of entities and TBs of data
Two “key” properties that together are the unique ID of the entity in the table
PartitionKey – enables scalability
RowKey – uniquely identifies the entity within the partition
Slide 33
Table Storage Concepts
Entity
Table
Account
sally
users
Name =…
Email = … Name =…
Email = … Photo ID =…
Date =…
A. Schabus Windows Azure Introduction v.1.0
Windows Azure Queues
Provide reliable message delivery
Simple, asynchronous work dispatch
Programming semantics ensure that a message can be processed at least once
Queues are highly available, durable and performance efficient
Maximum size is 64K
FIFO in general, but not guaranteed
Pulling an item from the queue doesn’t delete it
It becomes invisible for a visibility timeout
Item must be deleted before timeout or else it becomes visible
Slide 35
Queue Storage Concepts
Message
Queue
Account
sally
thumbnail jobs
128x128, http://…
256x256, http://…
http://…
A. Schabus Windows Azure Introduction v.1.0
Account
Container Blobs
Table Entities
Queue Messages
Windows Azure Data Storage Concepts
http://<account>.blob.core.windows.net/<container>
http://<account>.table.core.windows.net/<table>
http://<account>.queue.core.windows.net/<queue>
Some Thoughts about an App Architecture
A. Schabus Windows Azure Introduction v.1.0
Scale-up – sometimes suboptimal
Cloud
DB Failover Cluster Web Farm
Load Balancer Clients
Cost/Month:
in Azure ~ 150 €
Slide 41
Sharding Scale-out
Load Balancer Clients
A. Schabus Windows Azure Introduction v.1.0
Sharding LINQ Provider
[TestMethod]
public void ShardingTest() {
ThreadPool.SetMinThreads(10, 10);
var result = CreateQueryableRoot()
.Where(re => re.Location == "Wien"
&& re.HasBalcony.Value) .OrderBy(re => re.SizeOfGarden) .Take(25)
.ToArray();
}
Hidden Complexity of Sharding identical LINQ Queries
(http://www.timecockpit.com/en/blogs/11-02-16/Custom_OData_Provider_for_Windows_Azure.aspx)
Slide 47
Summary
A. Schabus
Windows Azure Introduction v.1.0 Slide 53
“A standardized IT capability, such as
software, app platform, or infrastructure,
delivered via Internet technologies in a
pay-per-use and self-service way.”
“How To Message "Cloud" Offerings And Not Get Lost In The Fog”, Forrester Research, Inc., July 2009
Database Middle Tier
Applications / Services Windows Azure Marketplace
Microsoft Online Services
A. Schabus Windows Azure Introduction v.1.0
Cloud Web Farm Load
Balancer Clients
Cost/Month:
with Azure ~ 150 €
stay constant!
DB Load Balancing Cluster of Failover
Clusters