Professional Documents
Culture Documents
Building Scalable Global and Highly Available Web Apps
Building Scalable Global and Highly Available Web Apps
Human
Upgrades
What do we mean by available?
Same functionality
Degraded functionality
Failsafe
Basics – what you get for free
Elasticity
Easily deploy compute resources and scale up and down
Fault Domains
Windows Azure deploys services across fault boundaries
Storage Resilience
3 copies of storage maintained
Fault Tolerance
When Windows Azure breaks, it fixes itself!
Can your service?
Codifying Operations
Upgrade Domains
Configure in ServiceDefinition.csdef
<ServiceDefinition name="RedDir"xmlns="http://schemas.microsoft.com/
ServiceHosting/2008/10/ServiceDefinition" upgradeDomainCount="3">
demo
Service Specific Implementations
Does your service fail without that
platform service?
Can your service use the same platform
services from another data center?
Can your service not use that platform
service temporarily?
Site Failover
If a site specific dependency is out,
fail over to another site
Easy: Use Traffic Manager
Hard: Code your own
Site Failover
demo
Upgrade Strategies: VIP Swap
V1
DNS Foo.cloudapp.net
Load Balancer
foo.com (Production)
V2
GUID.cloudapp.net
Test (Staging)
Upgrade Strategies: Upgrade
DNS Foo1.cloudapp.net
Load Balancer
foo.com (Production)
V1 V1 V2 V2
V1 V1 V2 V2
V1 V1 V2 V2
Upgrade Strategies
New Service & Swap DNS
Foo1.cloudapp.net
(Production)
DNS
foo.com
Foo2.cloudapp.net
(Production)
Scalability
What is wrong with this?
n 1
SQL
Web Role
Database
Table
Storage
Worker Role
Q
Blob
Storage
Synchronous Design Pattern
Each thread dedicated to one outstanding request
Block on each step of “the work” done for each request, then respond & repeat
Cheaper
No external service calls (additional cost)
Use spare memory that you already paid for
More reliable
Your service is running = cache is available
No throttling as in cotenant environment
Cache
demo
Why Performance Matters
More responsive applications
Faster page load times
8 seconds vs. 3 seconds?
Global availability
Datacenter outages.
Synchronizing data.
Network Latency
Content Delivery Network (CDN)
High-bandwidth global blob content delivery
24 locations globally (US, Europe, Asia, Australia and South America), and growing
Same experience for users no matter how far they are from the geo-location where
the storage account is hosted
Edge
Location
404
To Enable CDN: Edge
Location
Edge
Location
pic1.jpg
pic1.jpg
pic1.jpg Windows
Azure
http://sally.blob.core.windows.net/images/pic1.jpg
Blob
Service
Windows Azure Traffic Manager
Direct users to the service in the closest region
with the Windows Azure Traffic Manager
demo
Summary
Windows Azure gives you high
availability capabilities for free
Think about scaling out
Handle transient conditions