Cnam cours azure ze cloud

118
http://zecloud.fr CNAM 16 NOVEMBRE ZeCloud

Transcript of Cnam cours azure ze cloud

Page 1: Cnam cours azure ze cloud

http://zecloud.fr

CNAM 16 NOVEMBRE

ZeCloud

Page 2: Cnam cours azure ze cloud

http://zecloud.fr

ZeCloud ouvert à tous

Même aux robots

Page 3: Cnam cours azure ze cloud

http://zecloud.fr

Aymeric Weinbach [email protected]

MVP Windows AzureSociété ZeCloudDu service :conseil, formation, développement Architecture logicielle Et de l’édition logicielle : applications smartphones, tablettes et robotiques

Page 4: Cnam cours azure ze cloud

http://zecloud.fr

ZeCloud - Aymeric Weinbach [email protected]

Mes derniers projets :Pour des startups : des applis mobile et tablette, enrichi au Cloud. (pour les startups j’ai la possibilité d’offrir du Cloud gratuit pendant 3 ans ainsi que la plupart des logiciels Microsoft gratuitement également)Des projets Cloud et robotiques (quelques aperçus à voir sur ZeCloud.fr)application web de contrôle d’un système de réalité augmentéapplication de datavisualisation de grands ensemble de données statistiques (BigData)

Page 5: Cnam cours azure ze cloud

http://zecloud.fr

Scénarios pour le Cloud

Utilisation

Com

p ut

e

Temps

Utilisation

Inactivité

“Puissance Ponctuelle“

Travaux ponctuels, par exemple batchLa capacité excédentaire est inutiliséeTime to market peut être ralenti

Com

p ut

e

Temps

“Pics Imprévisibles“

Utilisation Moyenne

Pics de demande difficiles à prévoirLes pics impactent les performancesImpossible de prévoir les cas extrêmes

Utilisation Moyenne

Com

p ut

e

Temps

“Croissance Rapide “

Service populaire = montée en chargeTenir le rythme de croissance challenge l’ITComplexité du déploiement initial

Com

p ut

e

Temps

Utilisation Moyenne

“Pics Prévisibles“

Services à forte saisonnalitéPics dus à une augmentation de la demandeComplexité IT et capacité gâchée

Page 6: Cnam cours azure ze cloud

http://zecloud.fr

5 caractéristiques essentielles

3 modèles de service

4 modèles de déploiement

Une modélisation du Cloud ComputingLa vision du NIST

Software as a Service (SaaS)

Platform as a Service (PaaS)

Infrastructure as a Service (IaaS)

Accès réseau étendu

Elasticité Service mesuré Self-service

Gestion des ressources en Pool

PublicPrivé

HybrideCommunautaire

Page 7: Cnam cours azure ze cloud

http://zecloud.fr

Cloud Options

ENTERPRISE

COMMUNITY CLOUD

PUBLIC CLOUD

PRIVATE CLOUD

Secure CloudFederation

INTERNAL IT

Page 8: Cnam cours azure ze cloud

http://zecloud.fr

Niveaux d’abstraction

InformatiqueTraditionnelle

Cloud IaaSInfrastructure

Cloud PaaSPlate-Forme

Stockage

Serveurs

Réseau

O/S

Middleware

Virtualisation

Applications

Runtime

Stockage

Serveurs

Réseau

O/S

Middleware

Virtualisation

Applications

Runtime

Géré

par

l’uti

lisate

ur

de c

lou

d

Géré

par

l’op

éra

teur C

loud

Géré

par

l’uti

lisate

ur

de c

lou

d

Géré

par

l’uti

lisate

ur

de c

loud

Stockage

Serveurs

Réseau

O/S

Middleware

Virtualisation

Applications

Runtime

Cloud SaaSSoftware

Stockage

Serveurs

Réseau

O/S

Middleware

Virtualisation

Applications

Runtime

Géré

par

l’op

éra

teur C

loud

Géré

par

l’op

éra

teur C

loud

Dans le cadre d’un cloud privé, l’opérateur de Cloud, c’est vousLa gestion des couches « grises » est souvent automatisée au maximum

Page 9: Cnam cours azure ze cloud

http://zecloud.fr

Windows Azure

flexible open solid

Page 10: Cnam cours azure ze cloud

http://zecloud.fr

Windows Azure la plateforme :

storagebig data caching

CDN

database identity

media

messaging

networking

traffic

Page 11: Cnam cours azure ze cloud

Windows Azure currently has 8 regions At least two per geo-political region100,000’s of serversBuilding out manymore

Page 12: Cnam cours azure ze cloud

VM Role (PaaS) Virtual Machine (IaaS)

Storage Non-Persistent Storage Persistent StorageEasily add additional storage

Deployment Build VHD offsite and upload to storage.

Build VHD directly in the cloud or build the VHD offsite and upload

Networking Internal and Input Endpoints configured through service model.

Internal Endpoints are open by default.Access control with firewall on guest OS. Input endpoints controlled through portal, service model or API/Script.

Primary Use Deploying applications with long or complex installation requirements into stateless PaaS applications

Applications that require persistent storage to easily run in Windows Azure.

Virtual Machines: IaaS vs PaaS

Page 13: Cnam cours azure ze cloud

http://zecloud.fr

Virtual Machines Windows Server and Linux Flexible Workload Support Virtual Private Networking

Page 14: Cnam cours azure ze cloud

Images Available at PreviewWindows Server 2008 R2

Windows Server 2008 R2 with SQL Server 2012 Evaluation

Windows Server 2008 R2 with BizTalk Server 2010 R2 CTP

Windows Server 2012

OpenSUSE 12.1

CentOS 6.2

Ubuntu 12.04

SUSE Linux Enterprise Server SP2

Available at Preview

Page 15: Cnam cours azure ze cloud

Supported Windows Server Applications

Page 16: Cnam cours azure ze cloud

http://zecloud.fr

virtual machine portability

Page 17: Cnam cours azure ze cloud

http://zecloud.fr

Windows Azure

Your Data Center

Page 18: Cnam cours azure ze cloud

http://zecloud.fr

Windows Azure

Your Data Center

Page 19: Cnam cours azure ze cloud

http://zecloud.fr

Your Data Center

Windows Azure Other Service Providers

Page 20: Cnam cours azure ze cloud

http://zecloud.fr

Your Data Center

Windows Azure Other Service Providers

no lock-in

Page 21: Cnam cours azure ze cloud

http://zecloud.fr

Windows Azure Storage

VM with persistent drive

Page 22: Cnam cours azure ze cloud

http://zecloud.fr

Windows Azure Storage

VM with persistent drive

Page 23: Cnam cours azure ze cloud

http://zecloud.fr

Windows Azure Storage

VM with persistent drive

Page 24: Cnam cours azure ze cloud

http://zecloud.fr

reliable and always on

Windows Azure Storage

VM with persistent drive

Page 25: Cnam cours azure ze cloud

http://zecloud.fr

continuous storage

geo-replication

WEST

DC

EASTDC

> 500 miles

Windows Azure Storage

Page 26: Cnam cours azure ze cloud

Base OS image for new Virtual Machines

Sys-Prepped/Generalized/Read Only

Created by uploading or by capture

Writable Disks for Virtual Machines

Created during VM creation or during upload of existing VHDs.

Images and DisksOS Images

MicrosoftPartner User

Disks

OS Disks Data Disks

Page 27: Cnam cours azure ze cloud

http://zecloud.fr

Web Sites Build with ASP.NET, Node.js or

PHP Deploy in seconds with FTP, Git or

TFS Start for free, scale up as your

traffic grows

Page 28: Cnam cours azure ze cloud

http://zecloud.fr

1

Web Sites shared reserved

SHARED INSTANCES

:-)

shared

Page 29: Cnam cours azure ze cloud

http://zecloud.fr

2SHARED INSTANCES

:-)

:-)

Web Sites shared reserved

shared

Page 30: Cnam cours azure ze cloud

http://zecloud.fr

SHARED INSTANCES

:-)

Web Sites

1shared reserved

RESERVED INSTANCE

:-):-)

0reserved

Page 31: Cnam cours azure ze cloud

http://zecloud.fr

Web Sites

2shared reserved

RESERVED INSTANCE

:-)

RESERVED INSTANCE

:-)

reserved

Page 32: Cnam cours azure ze cloud

http://zecloud.fr

Web Sites

2shared reserved

RESERVED INSTANCE

:-)

RESERVED INSTANCE

:-):-)

:-) :-)

:-)

:-) :-)

reserved

Page 33: Cnam cours azure ze cloud

http://zecloud.fr

Mobile Services Easily build cloud back-ends Data, identity management, push

notifications Windows 8, Windows Phone, iOS

Page 34: Cnam cours azure ze cloud

http://zecloud.fr

Data ID Services

Custom Script(s)<//>

Page 35: Cnam cours azure ze cloud

http://zecloud.fr

Cloud Services Build infinitely scalable apps and

services Support rich multi-tier

architectures Automated application

management

Page 36: Cnam cours azure ze cloud

Cloud Services, Roles and InstancesCloud Service is a management, configuration, security, networking and service model boundary

VM1 VM2 VM3

VM4 VM5 VM…

INS

TA

NC

ES

RO

LES

Page 37: Cnam cours azure ze cloud

http://zecloud.fr

Network Load Balancer

Windows Azure Datacenter

Page 38: Cnam cours azure ze cloud

http://zecloud.fr

Network Load Balancer

Windows Azure Datacenter

Page 39: Cnam cours azure ze cloud

Virtual Machine Sizes

Each Persistent Data Disk Can be up to 1 TB

VM Size CPU Cores Memory Bandwidth# Data Disks

Extra Small Shared 768 MB 5 (Mbps) 1

Small 1 1.75 GB 100 (Mbps) 2

Medium 2 3.5 GB 200 (Mbps) 4

Large 4 7 GB 400 (Mbps) 8

Extra Large 8 14 GB 800 (Mbps) 16

Page 40: Cnam cours azure ze cloud

Disk Caching

Disk Type Default Supported

OS Disk ReadWrite ReadOnly and ReadWrite

Data Disk None None, ReadOnly and ReadWrite

Modify using Set-AzureOSDisk or Set-AzureDataDisk

Page 41: Cnam cours azure ze cloud

Windows Azure Storage

Disk StorageImages and disks are stored as Windows Azure Storage BlobsData is triplicated All existing storage tools just work

Page 42: Cnam cours azure ze cloud

http://zecloud.fr

Programmez sur Windows Azure : des SDK

Une plateforme ouverte pour tous

Un lien pour les télécharger toushttp://windowsazure.com

Page 43: Cnam cours azure ze cloud

http://zecloud.fr

Programmez sur Windows Azure : des API Rest

API REST

Page 44: Cnam cours azure ze cloud

http://zecloud.fr

Windows Azure Datacenter Architecture

Page 45: Cnam cours azure ze cloud

http://zecloud.fr

The Fabric Controller (FC)

The “kernel” of the cloud operating system Manages datacenter hardware Manages Windows Azure services

Four main responsibilities: Datacenter resource allocation Datacenter resource

provisioning Service lifecycle management Service health management

Inputs: Description of the hardware and network resources it will control Service model and binaries for cloud applications

Server

Kernel

Process

Datacenter

Fabric Controller

Service

Windows Kernel

Server

WordSQL

Server

Fabric Controller

Datacenter

ExchangeOnline

SQL Azure

Page 46: Cnam cours azure ze cloud

http://zecloud.fr

Datacenter Clusters

Datacenters are divided into “clusters”» Approximately 1000 rack-mounted server (we call them “nodes”)» Provides a unit of fault isolation» Each cluster is managed by a Fabric Controller (FC)

FC is responsible for:» Blade provisioning» Blade management» Service deployment and lifecycle

Cluster1

Cluster2

Clustern

Datacenter network

FC FC FC

Page 47: Cnam cours azure ze cloud

http://zecloud.fr

Inside a Cluster

FC is a distributed, stateful application running on nodes (servers) spread across fault domains Top blades are reserved for FC

One FC instance is the primary and all others keep view of world in sync Supports rolling upgrade, and services continue to run even if FC fails entirely

TOR

FC1

… …

TOR

FC2

… …

TOR

FC3

… …

FC3

TOR

FC4

… …

TOR

FC5

… …

Spine

Nodes

Rack

Page 48: Cnam cours azure ze cloud

Datacenter Network ArchitectureDLA Architecture (Old) Quantum10 Architecture (New)

TOR TOR TOR TOR

Spine Spine Spine

DCR DCR

BLBL

Spine

DC Routers

BL BL

30,000 Gbps120 Gbs

40 Nodes

TOR

LB

LB

AGG

Digi

APC

LB

LB

AGG

LB

LB

AGG

LB

LB

AGG

LB

LB

AGG

LB

LB

AGG

20Racks

DC Router

Access Routers

Aggregation + LB

40 Nodes

TOR

Digi

APC

40 Nodes

TOR

Digi

APC

40 Nodes

TOR

Digi

APC

40 Nodes

TOR

Digi

APC

40 Nodes

TOR

Digi

APC

40 Nodes

TOR

Digi

APC

40 Nodes

TOR

Digi

APC

40 Nodes

TOR

Digi

APC

40 Nodes

TOR

Digi

APC

40 Nodes

TOR

Digi

APC

40 Nodes

TOR

Digi

APC

40 Nodes

TOR

Digi

APC

40 Nodes

TOR

Digi

APC

40 Nodes

TOR

Digi

APC

……

20Racks 20Racks 20Racks

…… … …

Page 49: Cnam cours azure ze cloud

Tip: Load Balancer Overhead• Going through the load balancer adds about 0.5ms

latency• When possible, connect to systems via their DIP

(dynamic IP address)• Instances in the same Cloud Service can access each other by DIP• You can use Virtual Network to make the DIPs of different cloud services

visible to each other

Load Balancer

Instance 0

Instance1

10.2.3.4

10.2.3.5

65.123.44.22

0.5ms

i

Page 50: Cnam cours azure ze cloud

http://zecloud.fr

Deploying Services

Page 51: Cnam cours azure ze cloud

http://zecloud.fr

Provisioning a Node

Power on node PXE-boot

Maintenance OS Agent formats disk

and downloads Host OS via Windows Deployment Services (WDS)

Host OS boots, runs Sysprep /specialize, reboots

FC connects with the “Host Agent”

Fabric ControllerRole

ImagesRole

ImagesRole

ImagesRole

Images

Image Repository

Maintenance OS

Parent OS

Node

PXEServer

Maintenance OS

Windows AzureOS

Windows Azure

OS

FC Host

Agent

Windows Azure Hypervisor

Windows Deploymen

tServer

Page 52: Cnam cours azure ze cloud

http://zecloud.fr

RDFEService

US-North Central Datacenter

Deploying a Service to the Cloud:The 10,000 foot view

Package upload to portal System Center App Controller provides IT Pro

upload experience Powershell provides scripting interface Windows Azure portal provides developer

upload experience Service package passed to RDFE

RDFE sends service to a Fabric Controller (FC) based on target region and affinity group

FC stores image in repository and deploys service

Fabric Controller

Windows Azure PortalSystem Center App

Controller

Service

RESTAPIs

Page 53: Cnam cours azure ze cloud

http://zecloud.fr

RDFE

RDFE serves as the front end for all Windows Azure services Subscription management Billing User access Service management

RDFE is responsible for picking clusters to deploy services and storage accounts First datacenter region Then affinity group or cluster load

Normalized VIP and core utilization

A(h, g) = C(h, g) /

𝑋 (𝑔)=𝑚𝑖𝑛h∈𝐻

𝐴(h ,𝑔)

Page 54: Cnam cours azure ze cloud

http://zecloud.fr

FC Service Deployment Steps

Process service model files Determine resource requirements Create role images

Allocate compute and network resources Prepare nodes

Place role images on nodes Create virtual machines Start virtual machines and roles

Configure networking Dynamic IP addresses (DIPs) assigned to blades Virtual IP addresses (VIPs) + ports allocated and mapped to sets of DIPs Configure packet filter for VM to VM traffic Programs load balancers to allow traffic

Page 55: Cnam cours azure ze cloud

http://zecloud.fr

Service Resource Allocation

Goal: allocate service components to available resources while satisfying all hard constraints HW requirements: CPU, Memory, Storage, Network Fault domains

Secondary goal: Satisfy soft constraints Prefer allocations which will simplify servicing the host OS/hypervisor Optimize network proximity: pack nodes

Service allocation produces the goal state for the resources assigned to the service components Node and VM configuration (OS, hosting environment) Images and configuration files to deploy Processes to start Assign and configure network resources such as LB and VIPs

Page 56: Cnam cours azure ze cloud

http://zecloud.fr

Deploying a Service

Role BWorker Role

Count: 2Update Domains: 2

Size: Medium

Role AWeb Role (Front End)

Count: 3Update Domains: 3

Size: Large

LoadBalance

r10.100.0.36

10.100.0.122

10.100.0.185

www.mycloudapp.net

www.mycloudapp.net

Page 57: Cnam cours azure ze cloud

http://zecloud.fr

Deploying a Role Instance

FC pushes role files and configuration information to target node host agent

Host agent creates VHDs Host agent creates VM, attaches VHDs, and starts VM

Guest agent starts role host, which calls role entry point Starts health heartbeat to and gets commands from host agent

Load balancer only routes to external endpoint when it responds to simple HTTP GET (LB probe)

Page 58: Cnam cours azure ze cloud

http://zecloud.fr

Inside a Deployed Node

Fabric Controller (Primary)

FC Host Agent

Host Partition

Guest Partition

Guest Agent

Guest Partition

Guest Agent

Guest Partition

Guest Agent

Guest Partition

Guest Agent

Physical Node

Fabric Controller (Replica)

Fabric Controller (Replica)…

Role Instance

Role Instance

Role Instance

Role Instance

Trust boundary

Image Repository (OS VHDs, role ZIP files)

Page 59: Cnam cours azure ze cloud

http://zecloud.fr

PaaS Role Instance VHDs

Differencing VHD for OS image (D:\) Host agent injects FC guest agent into VHD for Web/Worker roles

Resource VHD for temporary files (C:\) Role VHD for role files (first available drive letter

e.g. E:\, F:\)Role Virtual Machine

C:\Resource Disk Dynamic VHD

D:\Windows

Differencing Disk

E:\ or F:\Role Image Differencing

Disk

Windows VHD Role VHD

Page 60: Cnam cours azure ze cloud

http://zecloud.fr

Resource Volume

OS Volume

Role Volume

Inside a Role VM

Guest Agent

Role Host

Role Entry Point

Page 61: Cnam cours azure ze cloud

http://zecloud.fr

Tip: Keep It Small

Role files get copied up to four times in a deployment

Instead, put artifacts in blob storage Break them into small pieces Pull them on-demand from your roles

RDFE

Portal

FC

Server

Core Packag

e

1

2

3

4DataAuxiliary

Files

i

1 2

Page 62: Cnam cours azure ze cloud

http://zecloud.fr

Inside IaaS VMs

Page 63: Cnam cours azure ze cloud

http://zecloud.fr

Virtual Machine (IaaS) Operation

No standard cached images for IaaS

» OS is faulted in from blob storage during boot

» Sysprep /specialize on first boot

Default cache policy:» OS disk: read+write

cache» Data disks: no cache

Local On-Disk Cache

Disk Blob

Local RAM Cache

Virtual Disk Driver

Node

VM

Page 64: Cnam cours azure ze cloud

http://zecloud.fr

IaaS Role Instance VHDs

Role Virtual Machine

C:\OS Disk

E:\, F:\, etc.Data Disks

D:\Resource Disk Dynamic VHD

RAM Cache

Local Disk Cache Blobs

Blob

Page 65: Cnam cours azure ze cloud

http://zecloud.fr

Tip: Optimize Disk Performance

Each IaaS disk type has different performance characteristics by default OS: local read+write cache optimized for small working set I/O Temporary disk: local disk spindles that can be shared Data disk: great at random writes and large working sets Striped data disk: even better

Unless its small, put your application’s data (e.g. SQL database) on striped data disks

i

Page 66: Cnam cours azure ze cloud

http://zecloud.fr

Updating Services and the Host OS

Page 67: Cnam cours azure ze cloud

http://zecloud.fr

In-Place Update

Purpose: Ensure service stays up while updating and Windows Azure OS updates

System considers update domains when upgrading a service 1/Update domains = percent of

service that will be offline Default is 5 and max is 20, override

with upgradeDomainCount service definition property

The Windows Azure SLA is based on at least two update domains and two role instances in each role

Front-End-1

Front-End-2

Update Domain 1

Update Domain 2

Middle

Tier-1

Middle

Tier-2

Middle

Tier-3

Update Domain 3

Middle Tier-3

Front-End-2Front-End-1

Middle Tier-2

Middle

Tier-1

Page 68: Cnam cours azure ze cloud

http://zecloud.fr

Tip: Config Updates vs Code Updates

Code updates:» Deploys new role image» Creates new VHD» Shutdown old code and start new code

Config updates:» Notification sent to role via RoleEnvironmentChanging» Graceful role shutdown/restart if no response, including startup tasks

For fast update: » Deploy settings

as configuration» Respond to

configuration updates

i

Page 69: Cnam cours azure ze cloud

http://zecloud.fr

Maintaining Service Health

Page 70: Cnam cours azure ze cloud

Node and Role Health Maintenance• FC maintains service availability

by monitoring the software and hardware health• Based primarily on heartbeats • Automatically “heals” affected

roles/VMsProblem Fabric Detection Fabric Response

Role instance crashes FC guest agent monitors role termination FC restarts role

Guest VM or agent crashes FC host agent notices missing guest agent heartbeats

FC restarts VM and hosted role

Host OS or agent crashes FC notices missing host agent heartbeat Tries to recover nodeFC reallocates roles to other nodes

Detected node hardware issue Host agent informs FC FC migrates roles to other nodesMarks node “out for repair”

Page 71: Cnam cours azure ze cloud

Guest Agent and Role Instance Heartbeats and Timeouts

25 min

GuestAgent

ConnectTimeout

Guest Agent Heartbeat

5s

RoleInstanceLaunch

Indefinite

RoleInstance

Start

RoleInstanceReady

(for updates only)

15 min

Role Instance Heartbeat

15s

Guest Agent Heartbeat Timeout 10 min

Role Instance “Unresponsive”

Timeout30s

Load Balancer Heartbeat

15s

Load BalancerTimeout

30s

Guest Agent

Role Instance

Page 72: Cnam cours azure ze cloud

http://zecloud.fr

Fault Domains and Availability Sets

Avoid single points of physical failures

Unit of failure based on data center topology E.g. top-of-rack switch on a rack of machines

Windows Azure considers fault domains when allocating service roles At least 2 fault domains per service Will try and spread roles out across more

Availability SLA: 99.95%

Front-End-1

Fault Domain 1

Fault Domain

2

Front-End-2

Middle Tier-2

Middle Tier-1

Fault Domain 3

Middle Tier-3

Front-End-1

Middle Tier-1

Front-End-2

Middle Tier-2

Middle Tier-3

Page 73: Cnam cours azure ze cloud

http://zecloud.fr

Moving a Role Instance (Service Healing)

Moving a role instance is similar to a service update

On source node: Role instances stopped VMs stopped Node reprovisioned

On destination node: Same steps as initial role instance deployment

Warning: Resource VHD is not moved Including for Persistent VM Role

Page 74: Cnam cours azure ze cloud

http://zecloud.fr

Service Healing

Role BWorker Role

Count: 2Update Domains: 2

Size: Medium

Role A – V2VM Role (Front End)

Count: 3Update Domains: 3

Size: Large

LoadBalance

r10.100.0.36

10.100.0.122

10.100.0.185

www.mycloudapp.net

www.mycloudapp.net

10.100.0.191

Page 75: Cnam cours azure ze cloud

http://zecloud.fr

Tip: Three is Better than Two

Your availability is reduced when: You are updating a role instance’s code An instance is being service healed The host OS is being serviced The guest OS is being serviced

To avoid a complete outage when two of these are concurrent: deploy at least three instances

Front-End-1

Fault Domain 1

Fault Domain

2

Front-End-2

Middle Tier-2

Middle Tier-1

Fault Domain 3

Middle Tier-3

Front-End-1

Middle Tier-1

Front-End-2

Middle Tier-2

i

Page 76: Cnam cours azure ze cloud

http://zecloud.fr

Page 77: Cnam cours azure ze cloud

http://zecloud.fr

Stockage Windows Azure

Page 78: Cnam cours azure ze cloud

http://zecloud.fr

Blob storage SQL databaseTable storage

Storage options

Page 79: Cnam cours azure ze cloud

http://zecloud.fr

SQL Database Relational SQL Server Engine in

the Cloud Clustered for high availability Fully Managed Service SQL Reporting support

Page 80: Cnam cours azure ze cloud

http://zecloud.fr

SQL Azure. Une ou plusieurs bases.

Database

Database

Database

Application

ApplicationDatabase

SQL Azure Database

Page 81: Cnam cours azure ze cloud

http://zecloud.fr

Implémentation

Application

Internet

LBTDS (tcp)

TDS (tcp)

TDS (tcp)

Les applications utilisent les librairies standards d’accès SQL : ODBC, ADO.Net, PHP, …

Les load balancer répartissent la charge sur les passerelles TDS en tenant compte des affinités de session

Security Boundary

Gateway Gateway Gateway Gateway Gateway Gateway

Scalability and Availability: Fabric, Failover, Replication, and Load balancing

SQL SQL SQL SQL SQLSQL

Gateway: TDS protocol gateway, enforces AUTHN/AUTHZ policy; proxy to backend SQL

Page 82: Cnam cours azure ze cloud

http://zecloud.fr

Sql Server dans les nuages avec ses avantages :Provisioning simple

Via le portailVia l’API REST

Haute disponibilité Load Balancing Protocole TDS (le même que SQL Server) pour tout le reste sur SSL (crypté)

Sql Azure

Page 83: Cnam cours azure ze cloud

http://zecloud.fr

Vous n’avez pas accès à tout ce qui est physique (filegroup …)Pas de CLR Pas de transactions distribuéesPas de service Broker

Les différences avec Sql Server

Page 84: Cnam cours azure ze cloud

http://zecloud.fr

Implémenter une politique de RetryFacturation de la bande passante donc utiliser dés que possible :

Lazy loadingCache

Développer avec Sql Azure

Page 85: Cnam cours azure ze cloud

http://zecloud.fr

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>

Page 86: Cnam cours azure ze cloud

http://zecloud.fr

Blobs

BlobContainerAccount

cohowinery

images

PIC01.JPG

PIC02.JPG

videos VID1.AVI

http://<account>.blob.core.windows.net/<container>/<blobname>

Page 87: Cnam cours azure ze cloud

http://zecloud.fr

Pour stocker vos fichiers petits ou très grandsLes blocks blobs pour les fichiers image, vidéo etc.. 200 GB maxLes page blobs optimisé pour la lecture écriture rapide 1Tb MaxLes Azure Drives : un disque NTFS que vous pouvez «  monter » dans votre rôle et qui est sauvegardé automatiquement dans un page blob

Blob Storage

Page 88: Cnam cours azure ze cloud

http://zecloud.fr

CDN avec smooth streaming pour les vidéosLes blobs sont dans des containersAccès public, ou privéSnapshot Shared access signatureLease

Page 89: Cnam cours azure ze cloud

http://zecloud.fr

NotO nl

ySQL

Page 90: Cnam cours azure ze cloud

http://zecloud.fr

Tables non relationnelles

EntityTableAccount

cohowinery

customers

Name =…Email = …

Name =…Phone = …

winephotos

Photo ID =…Date =…

Photo ID =…Date =…

Page 91: Cnam cours azure ze cloud

http://zecloud.fr

Table Storage

1 seul index le couple PartitionKey/RowKeyTransactions possibles au sein d’une même partitionODATA + authentification Sdk .net opensourcehttps://github.com/WindowsAzure/azure-sdk-for-netAPI RESTTable non relationnelleSchéma flexible ( plusieurs versions de schéma peuvent cohabiter dans la même table)

Page 92: Cnam cours azure ze cloud

http://zecloud.fr

Windows Azure Storage Characteristics

A “pay for what you use” cloud storage system

Durable: Store multiple replicas of your data» Local replication:

– Synchronous replication before returning success» Geo replication:

– Replicated to data center at least 400+ miles apart – Asynchronous replication after returning success to user.

Available: Multiple replicas are placed to provide fault tolerance

Scalable: Automatically partitions data across servers to meet traffic demands

Strong consistency: Default behavior is consistent reads once data is committed

Page 93: Cnam cours azure ze cloud

http://zecloud.fr

All abstractions backed by same store Same feature set across all abstractions (geo, durability, strong

consistency, auto scale, monitoring, partitioning logic etc.)

Reduce costs by blending different characteristics of each abstraction

880K requests/s at peak & 4+ Trillion objects

Great performance for low transaction costs!

Easy to use and open REST APIs

Client libraries in Java, Node.js, PHP, .NET etc.

Windows Azure Storage Characteristics

Page 94: Cnam cours azure ze cloud

http://zecloud.fr

Xbox: Uses Windows Azure Blobs, Tables & Queues for applications like Cloud Game Saves, Halo multiplayer, Music, Kinect data collection etc.

SkyDrive: Uses Windows Azure Blobs to store pictures,

documents etc.

Bing: Uses Windows Azure Blobs, Tables and Queues to implement an ingestion engine that consumes Twitter and Facebook public status feeds and provides it to Bing search

And many more…

Windows Azure Storage – How is it used?

Page 95: Cnam cours azure ze cloud

Facebook/Twitter data stored into blobsIngestion engine process blobs

Annotate with auth/spam/adult scores, content classification , expands links, etc

Uses Tables heavily for indexingQueues to manage work flowResults stored back into blobsBing takes resulting blobs and folds into search index

BING REALTIME FACEBOOK/TWITTER SEARCH INGESTION ENGINE

Running on Windows Azure Storage

Windows Azure Blobs

User postingsStatus updates

…………

Bing Ingestion Engine (Azure Service)

Windows Azure Tables

Windows Azure Queues

peak 40,000 Requests/sec2~3 billion Requests per day

Took 1 dev 2 months to design, build and release to production

Index Facebook/Twitter data within 15 seconds of updateV

MVM

VM

VM

Page 96: Cnam cours azure ze cloud

http://zecloud.frhttp://blog.woivre.fr http://zecloud.frWilfried Woivré – Aymeric Weinbach

North America Region Europe Region Asia Pacific Region

S. Central – U.S. Sub-region

W. Europe Sub-region

N. Central – U.S. Sub-region N.

Europe Sub-region

S.E. AsiaSub-region

E. AsiaSub-region

Major datacenter

CDN PoPs

Windows Azure Storage

East – U.S. Sub-region

West – U.S. Sub-region

Page 97: Cnam cours azure ze cloud

http://zecloud.fr

Queue typical usage

Queue

Web Role

ASP.NET, WCF, etc.

Worker Role

main(){ … }

1) Receive work

2) Put message in

queue

3) Get message

from queue

4) Do work

5) Delete message

from queue

Page 98: Cnam cours azure ze cloud

http://zecloud.frhttp://blog.woivre.fr http://zecloud.frWilfried Woivré – Aymeric Weinbach

Scalability Targets

Page 99: Cnam cours azure ze cloud

http://zecloud.fr

Flat network storage design “Quantum 10” network Non-blocking 10Gbps based fully meshed network Move to software based Load Balancer Provides an aggregate backplane in excess of 50 Tbps bandwidth

per Datacenter

Enables high bandwidth scenarios such as Windows Azure IaaS disks, HPC, Map Reduce etc.

Windows Azure Flat Network Storage

Page 100: Cnam cours azure ze cloud

http://zecloud.fr

Scalability Targets -Storage Account

Storage Account level targets by end of 2012 Applies to accounts created after June 7th 2012

Capacity – Up to 200 TBs

Transactions – Up to 20,000 entities/messages/blobs per second

Bandwidth for a Geo Redundant storage account Ingress - up to 5 Gibps Egress - up to 10 Gibps

Bandwidth for a Locally Redundant storage account Ingress - up to 10 Gibps Egress - up to 15 Gibps

Page 101: Cnam cours azure ze cloud

http://zecloud.fr

Scalability Targets – Partition

Partition level Targets by end of 2012

Single Queue – Account Name + Queue NameUp to 2,000 messages per second  

Single Table Partition – Account Name + Table Name + PartitionKey valueUp to 2,000 entities per second  

Single Blob – Account Name + Container Name + Blob NameUp to 60 Mibps  

Page 102: Cnam cours azure ze cloud

http://zecloud.fr

What Media Services could help?

Your Choice of Components for Building Custom Media Workflows in the Cloud

Windows Azure Media Services

Ingestion

Pre-encrypt files prior to uploading(AES 256)

Secure HTTPS upload

Network level peering for fast HTTP into

Azure

Fast upload using UDP with Aspera

Bulk ingest support

Ingestion

Page 103: Cnam cours azure ze cloud

http://zecloud.fr

What Media Services could help?

Your Choice of Components for Building Custom Media Workflows in the Cloud

Encoding& Conversion

Windows Azure Media Services

Ingestion

Windows Azure Media Encoder

Supports encoding to H.264 or VC-1 video

Encodes audio to AAC-LC, HE-AAC, Dolby

DD+, WMA

Packages to MP4, HLS, Smooth Streaming,

HDS, WMV

Partner SDK for enabling ‘build-in’ encoders

Encoding& Conversion

Page 104: Cnam cours azure ze cloud

http://zecloud.fr

What Media Services could help?

Your Choice of Components for Building Custom Media Workflows in the Cloud

Encoding& Conversion

Windows Azure Media Services

Content Protectio

n

Ingestion

Windows Azure Media Encryptor

Sources from Smooth Streaming or Apple

HLS

Encrypts with PlayReady, Common

Encryption, AES

Content Protectio

n

Page 105: Cnam cours azure ze cloud

http://zecloud.fr

What Media Services could help?

Your Choice of Components for Building Custom Media Workflows in the Cloud

Encoding& Conversion

Windows Azure Media Services

Content Protectio

n

On-DemandStreaming

Ingestion

Windows Azure Media Origin

Managed streaming service… it just works!

Guaranteed bandwidth. Auto recovery/redundancy. High

Availability

Integrated Azure CDN support

Dynamic Remux support for standard MP4 files

On-DemandStreaming

Analytics & Advertising

LiveStreaming

Page 106: Cnam cours azure ze cloud

http://zecloud.fr

Architecture

REST APIs

“Build-On” Media Partners and Customers

Azu

re C

DN

Media Services

Adaptive StreamingPorting Kits

Part

ner

CD

Ns

Origin

Caching

Secure Media Ingest

Media Job Scheduling

Encoding

ContentProtection

On-DemandOrigin

Live Origin

Analytics Identity Management

“Build-In”Partner Media Processors

Live Ingest

Live Encoding

Client Libraries

Silverlight

HTML 5Advertising

Flash

XBOX 360

WindowsPhone

iOS

Page 107: Cnam cours azure ze cloud

http://zecloud.fr

Web Roles

300MB 300MB 300MB 300MB

1.2GB Distributed Cache

distributed cache

Page 108: Cnam cours azure ze cloud

http://zecloud.fr

24GB Distributed Cache

Web Roles

12GB CacheWorker Role

12GB CacheWorker Role

2

Page 109: Cnam cours azure ze cloud

http://zecloud.fr

24GB Distributed Cache

Web Roles

12GB CacheWorker Role

12GB CacheWorker Role

4

12GB CacheWorker Role

12GB CacheWorker Role

48GB Distributed Cache

Page 110: Cnam cours azure ze cloud

http://zecloud.fr

Cross-premise Connectivity

CLOUD ENTERPRISE

Data SynchronizationSQL Azure Data Sync

Application-layer Connectivity &

Messaging Service Bus

Secure Machine-to-Machine Network

ConnectivityWindows Azure Connect

Secure Site-to-Site Network Connectivity

Windows Azure Virtual Network

IP-Level Connectivity

Page 111: Cnam cours azure ze cloud

http://zecloud.fr

Windows Azure Virtual Network

Your “virtual” branch office/datacenter in the cloud

Enables customers to extend their Enterprise Networks into AzureNetworking on-ramp for migrating existing apps and services to Windows AzureEnables “hybrid” apps that span cloud and their premises

A protected private virtual network in the cloud

Enables customers to setup secure private IPv4 networks fully contained within Windows AzureIP address persistenceInter-service DIP-to-DIP communication

Windows Azure

VM 1 VM 2

ROLE 1Subnet 2

Subnet 1

Page 112: Cnam cours azure ze cloud

http://zecloud.fr

Service Bus Secure messaging and relay

capabilities Easily build hybrid apps Enable loosely coupled solutions

Page 113: Cnam cours azure ze cloud

http://zecloud.fr

Service Bus Queue

Internet

Hi!

ASP.NET MVC 4 Mobile App

Page 114: Cnam cours azure ze cloud

http://zecloud.fr

service bus relaycloud application

Internet

Enterprise

app behindfirewall

Page 115: Cnam cours azure ze cloud

http://zecloud.fr

App

Contoso’s On-Premises Directory

Anatomy of Windows Azure Active Directory

Management Portal

AM

Graph API

OAuth2

SAML-P

WS-Federation

Metadata

Dir

Sync

Contoso’s WA AD Tenant

Windows Azure Active Directory

Page 116: Cnam cours azure ze cloud

http://zecloud.fr

Windows Azure Store Consume services from ecosystem

of partners Easily try and purchase Billing integrated within your Azure

bill

Page 117: Cnam cours azure ze cloud

http://zecloud.fr

Page 118: Cnam cours azure ze cloud

http://zecloud.fr

Aymeric Weinbach [email protected]

MVP Windows AzureSociété ZeCloudDu service :conseil, formation, développement Architecture logicielle Et de l’édition logicielle : applications smartphones, tablettes et robotiques