3. Aymeric Weinbach Aymeric@zecloud.fr
MVP Windows Azure
Société ZeCloud
Du service :
conseil, formation, développement
Architecture logicielle
Et de l’édition logicielle :
applications smartphones, tablettes et
robotiques
http://zecloud.fr
4. ZeCloud - Aymeric Weinbach aymeric@zecloud.fr
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)
http://zecloud.fr
5. Scénarios pour le Cloud
Inactivité
Comp
ut
Comp
ut
e
e
Utilisation
Utilisation Utilisation
Moyenne
Temps Temps
Comp
ut
Comp
ut
e
e
Utilisation Moyenne Utilisation Moyenne
Temps Temps
http://zecloud.fr
6. Une modélisation du Cloud Computing
La vision du NIST
Accès réseau Elasticité Service mesuré Self-service
étendu
5 caractéristiques essentielles
Gestion des ressources en Pool
Software as a Service Platform as a Service Infrastructure as a
3 modèles de service
(SaaS) (PaaS) Service (IaaS)
Public Hybride
4 modèles de déploiement
Privé Communautaire
http://zecloud.fr
11. Windows Azure currently
has 8 regions
At least two
per geo-political region
100,000’s of servers
Building out many
more
12. Virtual Machines: IaaS vs PaaS
Storage Non-Persistent Storage Persistent Storage
Easily 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 Internal Endpoints are open by default.
through service model. Access control with firewall on guest OS. Input
endpoints controlled through portal, service model
or API/Script.
Primary Use Deploying applications with long or Applications that require persistent storage to
complex installation requirements into easily run in Windows Azure.
stateless PaaS applications
27. 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
http://zecloud.fr
28. Web Sites shared reserved
shared 1
SHARED INSTANCES
http://zecloud.fr
29. Web Sites shared reserved
shared 2
SHARED INSTANCES
http://zecloud.fr
39. # Data
VM Size CPU Cores Memory Bandwidth
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
Each Persistent Data Disk Can be up to 1 TB
40. Disk Type Default Supported
OS Disk ReadWrite ReadOnly and ReadWrite
Data Disk None None, ReadOnly and
ReadWrite
Modify using Set-AzureOSDisk or Set-AzureDataDisk
42. Programmez sur Windows Azure : des SDK
Une plateforme ouverte pour tous
Un lien pour les télécharger tous
http://windowsazure.com
http://zecloud.fr
45. The Fabric Controller (FC)
The “kernel” of the cloud operating system
Manages datacenter hardware
Manages Windows Azure services
Four main responsibilities:
Datacenter resource allocation Word
SQL Exchange SQL
Server Online Azure
Datacenter resource
Windows Kernel Fabric Controller
provisioning
Service lifecycle management Server Datacenter
Service health management
Inputs:
Description of the hardware and network resources it will control
Service model and binaries for cloud applications
http://zecloud.fr
46. 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
http://zecloud.fr
47. 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
Spin
e
TO TO TO TO TO
R R R R R
http://zecloud.fr
48. Datacenter Network Architecture
DLA Architecture (Old) Quantum10 Architecture (New)
DC Router
DCR DCR DC Routers
Access
Routers
BL BL BL BL
Aggregation +
LB
AGG AGG AGG AGG AGG AGG
Spine Spine
… Spine Spine
L L L L L L L L L L L L
B B B B B B B B B B B B
TOR
20Racks
TOR TOR TOR
20Racks
TOR TOR TOR TOR TOR TOR
20Racks
TOR TOR TOR
20Racks
TOR TOR
TOR TOR
… TOR TOR
Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi Digi
…
40 Nodes 40 Nodes
… 40 Nodes 40 Nodes 40 Nodes
… 40 Nodes 40 Nodes 40 Nodes
… 40 Nodes 40 Nodes 40 Nodes
… 40 Nodes 40 Nodes 40 Nodes
… 40 Nodes
APC APC APC APC APC APC APC APC APC APC APC APC APC APC APC
49. 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
51. Provisioning a Node
Power on node
Windows
Image Repository Fabric Controller Deploymen
t
PXE-boot
Server
Maintenance Parent
Windows Azure RoleRole
Role
Role
PXE
OS OS Images
Images
Images
Images
Server
Maintenance OS
Agent formats disk
and downloads Host
OS via Windows
Deployment Services
(WDS) Windows
FC
Host OS boots, runs Host Azure
Agent Node
Sysprep OS
/specialize, reboots Windows Azure Hypervisor
FC connects with
http://zecloud.fr
52. 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 Fabric Controller
FC stores image in repository and deploys
service
US-North Central Datacenter
http://zecloud.fr
53. 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
http://zecloud.fr
54. 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
http://zecloud.fr
55. 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
http://zecloud.fr
56. Deploying a Service
Role B
Worker Role
www.mycloudapp.net Count: 2
Update Domains: 2
Size: Medium
www.mycloudapp.net
Load
Balancer
http://zecloud.fr
57. 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
http://zecloud.fr
58. Inside a Deployed Node
Physical Node
Guest Guest Guest Guest
Partition Partition Partition Partition
Role Role Role Role
Instance Instance Instance Instance
Guest Guest Guest Guest
Agent Agent Agent Agent
Trust boundary
Host Partition
FC Host Image Repository (OS
Agent VHDs, role ZIP files)
Fabric Controller Fabric Controller Fabric Controller
(Primary) (Replica) … (Replica)
http://zecloud.fr
59. 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
Windows VHD Role VHD
http://zecloud.fr
60. Inside a Role VM
OS Volume
Resource Volume
Role Volume
Guest Agent
Role Host
Role Entry Point
http://zecloud.fr
61. 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
http://zecloud.fr
63. Virtual Machine (IaaS) Operation
No standard cached
images for IaaS
» OS is faulted in from
blob storage during
boot
» Sysprep /specialize on Virtual Disk Disk
first boot Driver
Blob
Default cache policy:
Local RAM Cache
» OS disk: read+write
cache
Local On-Disk Cache
» Data disks: no cache
http://zecloud.fr
64. IaaS Role Instance VHDs
Role Virtual Machine
D:
C: E:, F:, etc.
Resource Disk
OS Disk Data Disks
Dynamic VHD
RAM Cache
Local Disk Cache
http://zecloud.fr
65. 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
http://zecloud.fr
67. In-Place Update Middl
Front-
Front- Middle
e
End-1
End-2 Tier-3
Tier-2
Purpose: Ensure service stays up Tier-1
while updating and Windows Azure
OS updates
System considers update domains
when upgrading a service Front- Front-
End-1 End-2
1/Update domains = percent of
service that will be offline
Default is 5 and max is 20, override Middl Middl Middl
with upgradeDomainCount service e e e
Tier-1 Tier-2 Tier-3
definition property
Update Update Update
The Windows Azure SLA is based on Domain 1 Domain 2 Domain 3
at least two update domains and
two role instances in each role
http://zecloud.fr
68. 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
http://zecloud.fr
70. Node and Role Health Maintenance
• FC maintains service availability by
monitoring the software and
hardware health
• Based primarily on heartbeats
• Automatically “heals” affected
roles/VMs
Problem 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 FC restarts VM and hosted role
heartbeats
Host OS or agent crashes FC notices missing host agent heartbeat Tries to recover node
FC reallocates roles to other nodes
Detected node hardware issue Host agent informs FC FC migrates roles to other nodes
Marks node “out for repair”
71. Guest Agent and Role Instance Heartbeats and
Timeouts
Guest Agent Guest Agent
Heartbeat Heartbeat Timeout
25 min 5s 10 min
Guest Agent
Guest Role Instance Load Balancer Load Balancer
Role Instance
Agent Heartbeat “Unresponsive” Timeout Heartbeat Timeout
Connect 15s 15s
Indefinite 15 min 30s 30s
Timeout
Role
Role Instance Instance
Launch
Role Role
Instance Instance
Start Ready
(for updates only)
72. Fault Domains and Availability Sets
Avoid single points of physical
failures
Unit of failure based on data Front- Front-
Front-
End-1 End-2
End-2
center topology
E.g. top-of-rack switch on a rack of machines
Windows Azure considers fault Middle Middle
Middle Middle
Middle
Tier-1 Tier-2
Tier-2 Tier-3
Tier-3
domains when allocating
service roles
At least 2 fault domains per service
Will try and spread roles out across more
Availability SLA: 99.95%
http://zecloud.fr
73. 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 http://zecloud.fr
74. Service Healing
Role B
Worker Role
www.mycloudapp.net Count: 2
Update Domains: 2
Size: Medium
www.mycloudapp.net
Load
Balancer
http://zecloud.fr
75. Tip: Three is Better than Two
Your availability is reduced
when: Front- Front-
Front-
You are updating a role instance’s code End-1 End-2
End-2
An instance is being service healed
The host OS is being serviced
The guest OS is being serviced Middle Middle
Middle Middle
To avoid a complete Tier-1 Tier-2
Tier-2 Tier-3
outage when two of these
are concurrent: deploy at
least three instances
http://zecloud.fr
80. SQL Azure. Une ou plusieurs bases.
SQL Azure
Database
Database
Application
Database
Application Database
Database
http://zecloud.fr
81. Implémentation
Les applications utilisent les librairies
Application
standards d’accès SQL : ODBC,
ADO.Net, PHP, …
Internet
Les load balancer répartissent la charge
TDS (tcp) LB sur les passerelles TDS en tenant compte
des affinités de session
TDS (tcp)
Gateway Gateway Gateway Gateway Gateway Gateway
Gateway: TDS protocol gateway, enforces AUTHN/AUTHZ policy; proxy to backend SQL
TDS (tcp)
SQL SQL SQL SQL SQL SQL
Scalability and Availability: Fabric, Failover, Replication, and Load balancing
http://zecloud.fr
82. Sql Azure
Sql Server dans les nuages avec ses avantages :
Provisioning simple
Via le portail
Via l’API REST
Haute disponibilité
Load Balancing
Protocole TDS (le même que SQL Server) pour tout le
reste sur SSL (crypté)
http://zecloud.fr
83. Les différences avec Sql Server
Vous n’avez pas accès à tout ce qui est physique
(filegroup …)
Pas de CLR
Pas de transactions distribuées
Pas de service Broker
http://zecloud.fr
84. Développer avec Sql Azure
Implémenter une politique de Retry
Facturation de la bande passante donc utiliser dés que
possible :
Lazy loading
Cache
http://zecloud.fr
85. 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>
http://zecloud.fr
87. Blob Storage
Pour stocker vos fichiers petits ou très grands
Les blocks blobs pour les fichiers image, vidéo etc.. 200 GB
max
Les page blobs optimisé pour la lecture écriture rapide 1Tb
Max
Les Azure Drives : un disque NTFS que vous pouvez
« monter » dans votre rôle et qui est sauvegardé
automatiquement dans un page blob
http://zecloud.fr
88. CDN avec smooth streaming pour les vidéos
Les blobs sont dans des containers
Accès public, ou privé
Snapshot
Shared access signature
Lease
http://zecloud.fr
90. Tables non relationnelles
Account Table Entity
Name =…
Email = …
customers
Name =…
Phone = …
cohowinery
Photo ID =…
Date =…
winephotos
Photo ID =…
Date =…
http://zecloud.fr
91. Table Storage
1 seul index le couple PartitionKey/RowKey
Transactions possibles au sein d’une même partition
ODATA + authentification
Sdk .net opensource
https://github.com/WindowsAzure/azure-sdk-for-net
API REST
Table non relationnelle
Schéma flexible ( plusieurs versions de schéma peuvent
cohabiter dans la même table)
http://zecloud.fr
92. 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 http://zecloud.fr
data is
93. Windows Azure Storage Characteristics
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.
http://zecloud.fr
94. Windows Azure Storage – How is it
used?
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… http://zecloud.fr
95. Running on Windows Azure Storage
BING REALTIME FACEBOOK/TWITTER SEARCH INGESTION ENGINE
Bing Ingestion Engine (Azure Service
V V V V
M M M M
Windows Azure
Blobs
Facebook/Twitter data stored into blobs
Ingestion engine process blobs Windows Azure Tables
Annotate with auth/spam/adult scores, content classification , expands links, etc
Uses Tables heavily for indexing
Queues to manage work flow
Results stored back into blobs
Bing takes resulting blobs and folds into search index
97. Queue typical usage
1) Receive Web Worker Role
work Role 4) Do
ASP.NET main(
) work
, WCF, e
tc. { …
2) Put 3) Get }
message in message
queue from queue
5) Delete
message
from queue
Queue
http://zecloud.fr
99. Windows Azure Flat Network Storage
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.
http://zecloud.fr
100. 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
http://zecloud.fr
101. Scalability Targets – Partition
Partition level Targets by end of 2012
Single Queue – Account Name + Queue Name
Up to 2,000 messages per second
Single Table Partition – Account Name + Table Name +
PartitionKey value
Up to 2,000 entities per second
Single Blob – Account Name + Container Name + Blob
Name
Up to 60 Mibps
http://zecloud.fr
102. What Media Services could help?
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 http://zecloud.fr
103. What Media Services could help?
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 http://zecloud.fr
104. What Media Services could help?
Windows Azure Media Encryptor
Sources from Smooth Streaming or Apple
HLS
Encrypts with PlayReady, Common
http://zecloud.fr
105. What Media Services could help?
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 http://zecloud.fr
106. Architecture
Partner CDNs
“Build-On” Media Partners and Customers
Azure CDN
“Build-In”
Partner
Media
Processors
Origin
Caching
http://zecloud.fr
118. Aymeric Weinbach Aymeric@zecloud.fr
MVP Windows Azure
Société ZeCloud
Du service :
conseil, formation, développement
Architecture logicielle
Et de l’édition logicielle :
applications smartphones, tablettes et
robotiques
http://zecloud.fr
Notes de l'éditeur
Block blobs : Adapté au "streaming" de données Page Blobs : Adapté aux données en lecture/écriture aléatoire