Introduction to Azure: Microsoft s Cloud OS DI Andreas Schabus Technology Advisor Microsoft Österreich GmbH aschabus@microsoft.com 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 Slide 3
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, Forrester Research, Inc., July 2009 Slide 5
Amazon EC2 SQL Azure Cloud Stack Windows Azure Salesforce.com Microsoft CRM Live Force.com SmugMug Custom Products The Cloud Stack Users/Customers/Consumers White-label VARs / ISVs Software as a Service Platform as a Service Infrastructure as a Service Appistry The Metal Slide 6
Cloud: Efficiency vs. Control = Managed for You Standalone Servers Applications Runtimes Database Operating System Virtualization Server Storage Networking Efficiency IaaS PaaS SaaS Control Slide 7
Windows Azure Cloud Stack Office 365 Windows Live Custom Products Die Microsoft Cloud Offerings Users/Customers/Consumers White-label VARs / ISVs Software as a Service Platform as a Service Infrastructure as a Service The Metal Slide 8
Microsoft Azure Overview
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? UI (Web) UI (AJAX, RIA, Client) HTTP / HTML Business Logic HTTP / XML (SOAP, REST ) HTTP / XML (SOAP, REST ) Services from other Applications and Organisation Access to Data Stores (ADO.NET EF, nhibernate, System.IO...) TCP / TDS Stream Slide 11
What do we need from a Plattform? UI (Web) UI (AJAX, RIA, Client) HTTP / HTML Business Logic Computing Power HTTP / XML (SOAP, REST ) HTTP / XML (SOAP, REST ) Secure Integration Services from other Applications and Organisation Access to Data Stores (ADO.NET EF, nhibernate, System.IO...) TCP / TDS Relationale Database Stream (scalable) Store Slide 12
What do we need from a Plattform? UI (Web) UI (AJAX, RIA, Client) HTTP / HTML Business Logic HTTP / XML (SOAP, REST ) HTTP / XML (SOAP, REST ) Services from other Applications and Organisation Access to Data Stores (ADO.NET EF, nhibernate, System.IO...) TCP / TDS Stream Slide 13
Windows Azure Middleware Services Windows Azure Data Services Windows Azure Platform Windows Azure Applications Red Dog Front End (RDFE) Windows Azure Compute Windows Azure Networking Slide 14
Windows Azure Datacenter Slide 15
The Windows Azure Service Model
The Microsoft Application Platform Applications / Services Windows Azure Marketplace Microsoft Online Services Middle Tier Database Infrastructure Slide 17
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 HTTP/HTTP Load Balancer Front- End Front- End Middle- Tier Windows Azure Storage, SQL Azure Slide 19
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
Windows Azure Portal Slide 23
Windows Azure Storage
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 Slide 30
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 Account Container Blob sally pictures movies IMG001.JPG IMG002.JPG MOV1.AVI Slide 32
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 Account Table Entity sally users photo index Name = Email = Name = Email = Photo ID = Date = Photo ID = Date = Slide 34
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 Account Queue Message sally thumbnail jobs photo processing jobs 128x128, http:// 256x256, http:// http:// http:// Slide 36
Windows Azure Data Storage Concepts Container Blobs http://<account>.blob.core.windows.net/<container> Account Table Entities http://<account>.table.core.windows.net/<table> Queue Messages http://<account>.queue.core.windows.net/<queue>
Some Thoughts about an App Architecture
Scale-up sometimes suboptimal Clients Load Balancer Web Farm DB Failover Cluster Cost/Month: in Azure ~ 150 Cloud Slide 41
Sharding Scale-out Clients Load Balancer Cost/Month: in Azure ~ 150 stays constant Web Farm Cloud DB Load Balancing Cluster of Failover Clusters
Sharding LINQ Provider [TestMethod] public void ShardingTest() { ThreadPool.SetMinThreads(10, 10); Hidden Complexity of Sharding identical LINQ Queries } var result = CreateQueryableRoot().Where(re => re.location == "Wien" && re.hasbalcony.value).orderby(re => re.sizeofgarden).take(25).toarray(); (http://www.timecockpit.com/en/blogs/11-02-16/custom_odata_provider_for_windows_azure.aspx) Slide 47
Summary
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 Slide 53
Applications / Services Windows Azure Marketplace Microsoft Online Services Middle Tier Database Infrastructure Slide 54
Clients Load Balancer Cost/Month: with Azure ~ 150 stay constant! Web Farm Cloud DB Load Balancing Cluster of Failover Clusters