Académique Documents
Professionnel Documents
Culture Documents
> Scalability
> Scale out to meet peak traffic demands
MasterSystem
Master System
Reassign Partitions Master System
Offload Partitions
B E1 B E2 B E3 B E4
MasterSystem
Master System
Split and Offload Master System
Assign Partition
B E1 B E2 B E3 B E4
Partitioning of Data Objects
> Load balancing is an internal concept
to Windows Azure Storage
> Partitioning enables scalability
>
> What matters to the application is the
partitioning key used for objects
> All objects with the same partition key
value are always grouped into the
same partition
> Partition Key used
> Blobs – Blob Name
> Entities – Application defined Partition
Key for Table
> Messages – Queue Name
Choosing a Table Partition Key
> Granularity of Entity Group
Transactions
> Make the partition key only as big as
you need it for atomic batch
transactions
> Spread out load across partitions
> More partitions – makes it easier to
automatically balance load
> The two extremes
> Store all entities with same Partition
Key value
Per Object/Partition Performance at
Commercial Availability
> Throughput
> Single Queue and Single Table Partition
> Up to 500 transactions per second
> Single Blob
> Small reads/writes up to 30 MB/s
> Large reads/writes up to 60 MB/s
>
> Latency
> Typically around 100ms (for small trans)
> But can increase to a few seconds
during heavy spikes while load
balancing kicks in
Improving Latency
> Use a cache in your application layer
to provide 10 ms latencies
> Can be very beneficial for user
interactive apps
>
> Have caching layer serve dominate
requests (e.g., AppFabric Cache,
memcached)
> You control the size and customize the
cache
> Fill cache misses from cloud storage
>
Agenda
> Data Scalability
>
> Scaling Computation and
Workflow
>
> Lifecycle Management –
Upgrade and Versioning
Compute Service Model – VIP
What is Described?
> The topology of your service
Web Role
> Types of roles and their binaries
> How the roles are connected
Worker Role
>
> Configuration of the service
> How many instances of each role type
> Application specific configuration
settings
> How many update domains you need
>
>
Best Practices for Scaling Out
Compute
> Due to application/node failure or
roles being upgraded
> Use multiple instances of each role
type so availability is not affected
>
> Scaling out means deploying more
roles as load increases
> Each instance of a role type performs
the same task and looks identical
>
>
Web + Worker Role Service Model
VIP
Worker Role
Web Role
VIP
Worker Role
Web Role
Worker Role
Worker Role
Basic Workflow Pattern
> Break job into work items
(optional “Map” step)
> Feed the work items to the worker
roles
> Worker resolves the work item
> Aggregate work item results
(optional “Reduce” step)
Loosely Coupled Work with Queues
> Worker-Queue Model
> Load work in a queue
> Many workers consume the queue
Worker Role
Web Role
Worker Role
Web Role
Worker Role
Queue Workflow Concepts
Worker Role
Web Role
Web Role
Worker Role
Worker Role
Web Role
Worker Role
Worker Role
Worker Role
Worker Role
Job Manager
Workflow Job Manager
> Job Manager
> Generating the Load
> Divide the job into work items
> Distributing the load
> Send work items to Workers via a Queue
> Monitor progress
> Monitor the load distribution
> Manage resources
> Number of workers, queues, etc
> Aggregate results
> Take individual work item results and
aggregate
>
Job Manager Workflow Pattern
Input Queue (Work Items)
Azure Queue
WorkerRole
Worker Role
Worker Roles
Large
Job
Azure Queue
Version 1
Version 2
Protocol Versions :
Version 1
Cache Role
Cache Role Cache
Cache Role
Cache Role
Role Cache Role
Cache Role
Version 2
Client
….. Property N NEW
Property
Client
PK1 RK1 1 V1
V1.5
PK2 RK2 1 Defaul
……. ……. 1 t
……. ……. 1 Client
……. ……. 1
V1.5
V1
Client
….. Property N NEW
Property
Client
PK1 RK1 1 Defaul V2.5
V1
V1
t
PK2 RK2 12 Value
Defaul
Value
……. ……. 1 21 t
……. ……. 1 Client
……. ……. 1
V1
V1
V2.5
> V2 Client
> Update all entities to V2 and start putting
real values in new property
> V1.5 Client
> If Entity version is V1
> Store the default value in the new property,
and don’t change version
> If Entity version is V2
> Use the new value and update it
Table Schema Rolling Upgrade
Summary
> Code V1
> Always uses version 1
channel9.msdn.com/learn
Built by Developers for Developers….
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other
countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to
changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the
date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.