2. 1. General Cloud Computing Patterns
2. Patterns in the Windows Azure platform
Compute
Storage
Relational Database
Communication
Security
Network
3. Cloud application patterns discussion
Discussion / Q & A
3. General Pu Pr Hy Ia Pa Sa Ps Su
Compute Ro In We Wo Vr Lb Ep Ei Ca
Storage Bl Co Qm Qu Ta En Pk Rk Ep
DB Ds Db Rd Re Sg Sh Fr Fm
Comm Sb Sq To Su Fi
Network Vn Rg Mg Cd Tm Rl Rf Rd
Security Ip Rp Ts Tk Cl Ra
4. Cloud Types Cloud Levels of Use Platform
Pu Pr Hy Ia Pa Sa Ps Su
PUBLIC PRIVATE HYBRID INFRASTR. PLATFORM SOFTWARE PLATFORM SUBSCRIP-
CLOUD CLOUD CLOUD AS A SVCE AS A SVCE AS A SVCE SERVICE TION
5. Pu Pr Hy
Public Cloud Private Cloud Hybrid Cloud
6. Pu
Advanced data center, global presence PUBLIC
CLOUD
On-demand, elastic scale, well-managed
Multi-tenant, consumption-based pricing
7. Pr
On-premises virtualization infrastructure PRIVATE
CLOUD
Shares some characteristics of public cloud
Upcoming Windows Server 8 is able to virtually
pool and allocate compute, storage, network
resources in a multi-tenant fashion
YOUR CLOUD
INFRASTRUCTURE
8. Hy
Connect public cloud with private cloud HYBRID
CLOUD
Integrate via VPN or other means
CLOUD VENDOR
INFRASTRUCTURE
YOUR CLOUD
INFRASTRUCTURE
9. Ia Pa Sa
INFRASTR. PLATFORM SOFTWARE
AS A SVCE AS A SVCE AS A SVCE
IaaS PaaS SaaS
Raw Virtual Resources App Services Platform Just Use It
“Bring Your Own VM“ “Bring Your Own App” “Bring Your Own User”
10. Ps
Service provided by the cloud platform PLATFORM
SERVICE
Compute Service
Run your software in the cloud data center
Most intimate level of cloud computing
Other services generally usable in-cloud or on-prem
RESTful Services
Most cloud services use HTTP REST
Storage, Communication, Management, …
Interop Services
Use a specific protocol for interop / compatibility
Example: SQL Azure Database (TDS protocol)
11. Su
Ongoing billing arrangement SUBSCRIP-
TION
Consumption-based
Services used have pricing meters
Types
Month-to-month
Term subscription
Negotiated terms
Month-to-month is easy entry / easy exit
without residual obligations
Term or negotiated subscriptions can get you a
discount in exchange for a commitment
12.
13. Ps
Compute Service SQL Azure Reporting PLATFORM
SERVICE
S Storage Service Cache Service
Blob Storage Service Bus
Queue Storage Access Control Service
Table Storage Windows Azure Traffic Manager
SQL Azure Database SQL Azure Data Sync Service
DataMarket SQL Azure Import Export Service
CDN Windows Azure Connect
14. Df Du
Fault domain FAULT UPGRADE
DOMAIN DOMAIN
Spreads out your redundant servers / storage
across the data center so a large failure doesn’t
take out all of your resources
Upgrade domain
How patches or application updates are applied
Upgrades parts of your application in sequence
(“red black pattern”) to maintain availability
15. Fault Domain 1 Fault Domain 2 Fault Domain 3
Upgrade
Domain 1
Role A Role B Role C
Instance 1 Instance 2 Instance 3
Upgrade
Domain 2
Role B Role C Role A
Instance 1 Instance 2 Instance 3
Upgrade
Domain 3
Role C Role A Role B
Instance 1 Instance 2 Instance 3
16. Roles Endpoints Cache
Ro In We Wo Vr Lb Ep Ei Ca
ROLE INSTANCE WEB WORKER VM LOAD INPUT INTERNAL CACHE
ROLE ROLE ROLE BALANCER ENDPOINT ENDPONIT SERVICE
17. Hs
Your app, hosted in Compute service
Consists of one or more tiers (“roles”)
Production & Staging deployment slots
Subscription
Windows Azure
Hosted Service Project Regional
Data Center
Production Staging
Deployment Deployment
Slot Slot
18. Ro In
Role: a tier of your app (VM farm) ROLE INSTANCE
Instance: VM, member of a role (5 sizes)
Role has one or more instances (2+ for SLA)
VM instances are volatile, roles are sturdy
(like ants : colony or soldiers : army, you can lose an
individual but the organization survives)
VM VM VM VM VM
19. We Wo Vr
WEB WORKER VM
ROLE ROLE ROLE
Web Role Worker Role VM Role
Web Container General-purpose Container VM Image
Configured with Configured with You prepare a VM
Windows Server, IIS & Windows Server
a public LB endpoint
Upload your app Upload your app Upload a full VM
PaaS PaaS IaaS
Managed Managed You Manage
Auto patched Auto patched No auto-patching
20. Lb Ep Ei
Allows access to a role LOAD INPUT INTERNAL
BALANCER ENDPOINT ENDPOINT
Load balancer: round-robin
Input (public) endpoint: public, load-balanced
Internal endpoint: only accessible by cloud app
VM VM VM VM VM
21. Dp Di
Paas Deployment IaaS Deployment PAAS
DEPLOYMENT
IAAS
DEPLOYMENT
Compute Service Compute Service
HOSTED HOSTED
SERVICE SERVICE
APPLICATION
SERVICE SERVICE CUSTOM VM
RUNTIME
METADATA METADATA IMAGE
FILES
22. Web Role Compute Tier Worker Role Compute Tier
VM
VM
Public Endpoint
VM
VM
Queue
VM
VM
23. Ca
Cache Service CACHE
SERVICE
Distributed Memory Cache
Available in different sizes
Same programming model as Windows Server Cache
(“Velocity”)
25. Blob Storage Queue Storage Table Storage
Bl Co Qm Qu Ta En Pk Rk Ep
BLOB CONTAINER QUEUE QUEUE TABLE ENTITY PARTITION ROW ENTITY
MESSAGE KEY KEY PROPERTY
26. Ratio of primitive : relational data is frequently
higher in the cloud
Cheap: pennies per gigabyte/mo
Scale: no practical size limit
Simple: less complexity / overhead
Lighter: optimistic concurrency
Trendy: fueled by trends in cloud / mobile arch/
& movements like NoSQL
27. Bl Qu Ta
BLOB QUEUE TABLE
Blob Storage Queue Storage Table Storage
File-like Simple queues Big, cheap tables
Use for anything you For queuing task Structured data where
would normally use a messages you don’t need
file for relational features
28. Bl Co
Blob: File-like storage BLOB CONTAINER
Container: Holds blobs, like folder
Name, data, metadata
Sequential/streamed access
Simple put/get operations
Data stored with redundancy
Provides persistence for VMs
Directly reference blobs as URIs
2 kinds of blobs:
block (sequential), page (random)
29. Qu Qm
Queue: holds messages QUEUE QUEUE
MESSAGE
Messages small string or XML content
Access semantics may differ from enterprise
queue technologies you are used to
Enterprise reasons to use queues also apply in
the cloud
Can use queues to load-balance workers
Can use queues to coordinate work across roles
Strict FIFO not guaranteed due to queue
semantics
30. Ta En
Big, cheap data tables TABLE ENTITY
Simple record-oriented storage
Table: hold entities (records)
Entity: contains properties (fields)
Does not enforce a schema
No relational features
Partition Key + Row Key = a unique key
En : Pk Rk Ep Ep Ep
ENTITY PARTITION ROW ENTITY ENTITY ENTITY
KEY KEY PROPERTY PROPERTY PROPERTY
31. MEDIA CONTAINER 20 GB
CONTACTS TABLE
1000 40 40
COUNTRY (PK)
IMAGES VIDEO XML CUSTOMER ID (RK)
LAST NAME
FIRST NAME
STREET
CITY
STATE
POSTAL
PHONE
ORDER QUEUE EMAIL
WEB PHONE
ORDERS ORDERS
33. Database Reporting Data Sync Federation
Service Service Service
Db Db Rd Re Sg Sh Fr Fm
DATABASE DATABASE REPORT REPORT SYNC SYNC FEDERATION FEDERATION
SERVER DEFINITION ENDPOINT GROUP HUB ROOT MEMBER
34. Db Rs
DATABASE REPORT
SERVICE SERVICE
Sql Azure Database Sql Azure Reporting
Database Service Reporting Service
Sy Fr
SYNC
FEDERATION
SERVICE
SERVICE
SQL Azure Data Sync Sql Azure Federations
Synchronization Service Database Federation Service
35. Ds Db
Relational DB as a service DATABASE DATABASE
SERVER
One master and two replicants, auto failover
Physical management handled for you
Has most SQL Server features but not all
Size limit of 150GB
Database Server: virtual DB server (actually 3)
Database: database contained in a DB server
36. Rd Re
DB reporting as a service REPORT REPORT
DEFINITION ENDPOINT
Similar experience to SSRS
Source is SQL Azure Database
Use BIDS to create reports, RDF format
Rd: report definition
Re: web-accessible reporting endpoint
37. Sg Sh
1-way or bi-directional syncing SYNC GROUP SYNC HUB
SQL Azure to SQL Azure
SQL Azure to SQL Server
Hub and spoke model: all syncing is to and/or
from the hub SQL Azure database
Can trigger a sync manually or schedule
Sync: Synchronization operation
Sync group: Defines group of DBs for syncing
Sync hub: the hub of the sync group
38. Fr Fm
Database federation FEDERATION FEDERATION
ROOT MEMBER
Partition or shard to multiple databases, have a
“federation database” that looks like one DB
Federation Root: federation root database
Federation Member: member database
40. Service Bus Service Bus Queues
Sb Sq To Su Fi
SERVICE SERVICE BUS TOPIC SUBSCRIP- FILTER
BUS QUEUE TION
41. Sb
Using the cloud as a SERVICE
BUS
communication relay
Navigates NATs, firewalls, proxies well
Supports client-service, eventing/pub-sub
messaging patterns
Volatile (best effort) messaging
42. Sq
Service Bus Queue: Durable messaging SERVICE BUS
QUEUE
Topic: publish point for durable
messaging To
Subscription: receiver of durable TOPIC
messaging
Filter : criteria on which messages to Su
receive SUBSCRIP-
TION
Fi
FILTER
44. VPN Connection CDN Traffic Manager
Vn Rg Mg Cd Tm Rl Rf Rd
VIRTUAL ROLE MACHINE CONTENT TRAFFIC LOCALE-BASED FAILOVER DISTRIBUTED
NETWORK GROUP GROUP DELIVERY MANAGER ROUTING ROUTING ROUTING
NETWORK
45. Vn
Windows Azure Connect VIRTUAL
NETWORK
Virtual Network: VPN connection
between cloud and on-prem machines Rg
Role Group: indicates which roles are ROLE
GROUP
members of a virtual network
Machine Group: indicates which on- Mg
prem machines are members of a virtual MACHINE
network GROUP
47. Cd
Content Delivery Network CONTENT
DELIVERY
CDN: Utilizes worldwide network of 24+ NETWORK
edge server to deliver content efficiently
Often used for media
Locale-directed DNS goes to nearest
node to serve up cached content
Content sources from blob storage or
your hosted service
48. Tm
Windows Azure Traffic Manager TRAFFIC
MANAGER
Traffic Manager: Routes DNS access to
your hosted service to one of several Rl
possible deployments based on rules LOCALE-BASED
ROUTINE
Locale-based Routing: route to a
deployment based on locale Rf
Failover Routing: route to a secondary if FAILOVER
primary is not healthy (via a heartbeat) ROUTING
Distributed Routing: route based on a
Rd
desired distribution across data centers
DISTRIBUTED
ROUTING
49. Claims-based Security
Ip Rp Ts Tk Cl Ra
IDENTITY RELYING SECURITY TOKEN CLAIM REDIRECTED
PROVIDER PARTY TOKEN AUTHENTICATION
SERVICE
50. Ip
Modern way to do AuthN/AuthZ IDENTITY
PROVIDER
Use with web identity, domain identity
Identity Provider: Party providing Rp
security token with claims RELYING
PARTY
Relying Party: application that wants to
authenticate/authorize user Ts
Security Token Service: how SECURITY
TOKEN
application/user authenticates SERVICE
(interactively or programmatically)
Ra
Redirected Authentication: user visits
REDIRECTED
app, user redirected to STS to sign in, AUTHENTICATION
redirected back to app with token
52. Windows Azure
WEB ROLE 2+
S S
RP
Enterprise ADF
S
AD
53.
54. Can “load balance” back end of worker roles
using queues
Queue
Worker Role
55. Web Role
Front end can
submit tasks for the
back end
Both front end and
back end can be
scaled to
accommodate load Q
Worker Role
56. WEB FARM CQRS-READS RELATIONAL DATA
Command/Query
Responsibility
Segregation PUBLIC CLOUD
CLUSTERED / PARTITIONED DB
Best for large WEB FARM CQRS-WRITES NON-RELATIONAL DATA
implementations
Separate read
& write FILES, QUEUES
You probably don’t do the same amount of each
Take advantage of lightweight read mechanisms
Safer – avoid accidental updates/deletes
57.
58. HETEROGENEOUS FRONT END DECENTRALIZED BACK END
Platform
DESKTOP Application
Services
BROWSER
CLOUD
Business
Data Stores
Services
TABLET
Identity
IP
Directories
Services
PHONE
PARTNER
Partner
Data Stores
Services
60. General Pu Pr Hy Ia Pa Sa Ps Su
Compute Ro In We Wo Vr Lb Ep Ei Ca
Storage Bl Co Qm Qu Ta En Pk Rk Ep
DB Ds Db Rd Re Sg Sh Fr Fm
Comm Sb Sq To Su Fi
Network Vn Rg Mg Cd Tm Rl Rf Rd
Security Ip Rp Ts Tk Cl Ra
Windows Azure, of course, is Microsoft’s cloud computing platform. In this first part, we’re going to look at the patterns come with using the Windows Azure platform.
Windows Azure, of course, is Microsoft’s cloud computing platform. In this first part, we’re going to look at the patterns come with using the Windows Azure platform.
Windows Azure, of course, is Microsoft’s cloud computing platform. In this first part, we’re going to look at the patterns come with using the Windows Azure platform.