how to scale windows azure applicationdownload.microsoft.com/documents/hk/technet/techdays2013...how...
TRANSCRIPT
How to scale Windows Azure Application
Edwin Cheung
Principal Program Manager
China Cloud Innovation Centre
Customer Advisory Team
Microsoft Asia-Pacific Research
and Development Group
4 |
CONTROL
CO
ST
-E
FFIC
IEN
CY
(On-premise)
Value Prop:
Value Prop:
Roll-your-own HA/DR/scale
(IaaS)
Value Prop:
(PaaS)
6 |
DISPERSED USERS &
DATA ELASTIC DEMAND SCALE OUT
Fabric ControllerWindows Azure
Networking
“Red Dog” Front End (RDFE)
• Workload driven design
• Fan-out the application tier to support the workload
• Loosely couple: asynchronous, but keep close and process fast
• Use cache for data and content
• Batch together storage/database operations if possible
• Partition Azure storage objects across multiple storage accounts if necessary
• Size appropriate (instance size and number of instances)
•Read-only data separated from read-write data
•Affinitize application and database as scale unit
Compute
Instance
CPU (GHz) Memory Storage Bandwidth
XSmall 1 768mb 20GB 5 Mbps
Small 1.6 1.7GB 225GB 100 Mbps
Medium 2 x 1.6 3.5GB 490GB 200 Mbps
Large 4 x 1.6 7GB 1000GB 400 Mbps
XLarge 8 x 1.6 14Gb 2040GB 800 Mbps
Key Concepts - Indexes
• Object Key partitioning key
, Snapshot Time
RowKey
Message Visibility Time, Message Id
Key Concepts – How are objects stored?
Account
Name
Container
Name
Blob Name
user1 logs 20120612-1030-001.log
user1 logs 20120612-1030-002.log
… … …
user1 logs 20120612-1030-999.log
user1 logs 20120612-1031-001.log
… … …
user2 logs 20120612-1030-001.log
Account
Name
Container
Name
Blob Name
user1 logs 001-20120612-1030.log
user1 logs 001-20120612-1031.log
… … …
user1 logs 999-20120612-1030.log
user1 logs 999-20120612-1031.log
… … …
user2 logs 001-20120612-1030.log
Key Concepts – How does storage scale?
A
A B
CA
Key Concepts – Scalability Targets
Storage Accounts Best Practices
Common Design & Scalability
Account
Name
Container
Name
Blob Name
User1 logs 20120612-1030-001.log
user1 logs 20120612-1030-002.log
… … …
user1 logs 20120612-1030-999.log
user1 logs 20120612-1031-001.log
… … …
user1 logs 20120612-1032-999.log
Common Design & Scalability
Blob Design & Scalability
Table Design & Scalability
Queue Design & Scalability
http://nuget.org/packages/Microsoft.Experience.CloudFx2
6
http://code.msdn.microsoft.com/CloudFx-Samples-60c3a852
Asure
Storage
Relational Database as a Service for the Windows Azure Platform
Focus on combining the best features of SQL Server
running at scale with low friction
• SQL Server as core DB engine
• Shared infrastructure at SQL database and below• Request routing, security and isolation
• Scalable HA technology provides the glue• Automatic replication and failover
• Provisioning, metering and billing infrastructure
Provisioning (databases, accounts, roles, …), Metering, and Billing
Machine 5
SQL Instance
SQL DBUserDB1
UserDB2
UserDB3
UserDB4
Machine 6
SQL Instance
SQL DBUserDB1
UserDB2
UserDB3
UserDB4
Machine 4
SQL Instance
SQL DBUserDB1
UserDB2
UserDB3
UserDB4
Scalability and Availability: Fabric, Failover, Replication, and Load balancing
Application
Internet
Azure
Cloud
LB
TDS (tcp)
TDS (tcp)
TDS (tcp)
Applications use standard SQL
client libraries: ODBC,
ADO.Net, PHP, JDBC.
Load balancer forwards
‘sticky’ sessions to TDS
protocol tier
Security Boundary
SQL SQL SQL SQL SQLSQL
Gateway Gateway Gateway Gateway Gateway Gateway
Gateway: TDS protocol gateway, enforces AUTHN/AUTHZ policy; proxy to CloudDB
Scalability and Availability: Fabric, Failover, Replication, and Load balancing
Topology
• Each account has zero or more servers– Azure wide, provisioned in a common portal
– Billing instrument
• Each server has one or more databases– Contains metadata about the databases and
usage
– Unit of authentication
– Unit of Geo-location
– Generated DNS based name
– Logical grouping of databases
• Each database has standard SQL objects– Unit of consistency
– Unit of multi-tenancy
– Contains Users, Tables, Views, Indices, etc.
– Most granular unit of billing
Account
Server
Database
A distributed, in-memory, flexible cache for all data types that can be used to speed up Windows Azure applications and reduce database load
Basically, caching helps your app become faster.