SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
2.
Architectural Patterns for the Cloud
Maarten Balliauw
@maartenballiauw
APRIL 17, 2012 | SLIDE 2
3.
Who am I?
Maarten Balliauw
Antwerp, Belgium
www.realdolmen.com
Focus on web
ASP.NET MVC, Windows Azure, SignalR, ...
MVP Windows Azure & ASPInsider
http://blog.maartenballiauw.be
@maartenballiauw
Author: Pro NuGet - http://amzn.to/pronuget
APRIL 17, 2012 | SLIDE 4
4.
Agenda
Quick recap: Windows Azure
What’s different in the cloud?
Rethinking apps
Conclusion
APRIL 17, 2012 | SLIDE 5
5.
Quick recap
Windows Azure
APRIL 17, 2012 | SLIDE 6
6.
Windows Azure is a cloud platform
On-demand
Self-service
Pay per use
Highly automated
APRIL 17, 2012 | SLIDE 7
7.
Windows Azure Components
Compute Storage SQL Azure Service Bus Connect
BI Marketplace CDN Caching ACS
Application Services Storage Services Foundation Services
APRIL 17, 2012 | SLIDE 8
8.
What’s different
in the cloud?
APRIL 17, 2012 | SLIDE 9
9.
Differences with your infrastructure
Uniform
Automated
Designed for failure
Designed for scale
It’s not in your datacenter
APRIL 17, 2012 | SLIDE 10
10.
Uniform
Every machine +/- the same
No specialized hardware
No specialized OS*
APRIL 17, 2012 | SLIDE 11
11.
Demo
Customizing the Windows Azure virtual machine
APRIL 17, 2012 | SLIDE 12
12.
Automated
Makes decisions on provisioning &
updating
Monitors health
The platform knows what’s best
Not necessarily for your app…
APRIL 17, 2012 | SLIDE 13
13.
Designed for failure
UD 1
UD 2
APRIL 17, 2012 | SLIDE 14
14.
Designed for scale
Scale out
Stateless
APRIL 17, 2012 | SLIDE 15
15.
It’s not in your datacenter
Integration
Authentication
APRIL 17, 2012 | SLIDE 16
16.
Rethinking apps
What do I have to think about?
APRIL 17, 2012 | SLIDE 17
17.
Scenario: Newspaper website
National & International
Sudden spikes in usage
Dynamic content
Static content
APRIL 17, 2012 | SLIDE 18
18.
Current architecture
Will work on the cloud!
Will fail on the cloud!
APRIL 17, 2012 | SLIDE 19
20.
Assume everything will fail
Automated service maintenance
Compute node crash
Storage throttling
SQL Azure throttling
Connectivity
Your code
APRIL 17, 2012 | SLIDE 21
21.
Retry everything
SQL Azure Error 40501
The service is currently busy. Retry the
request after 10 seconds.
Retry against anything that might be external
SQL Azure, Windows Azure Storage, Service Bus, …
http://windowsazurecat.com/2011/02/transient-fault-
handling-framework/
APRIL 17, 2012 | SLIDE 22
22.
The entire datacenter fails!
Run in 2+ datacenters
Keep data synchronized
All data
or limit scope
APRIL 17, 2012 | SLIDE 23
23.
Refactoring the architecture
APRIL 17, 2012 | SLIDE 24
24.
Windows Azure Data Centers
100ms
50ms
APRIL 17, 2012 | SLIDE 25
25.
Windows Azure Traffic Manager
APRIL 17, 2012 | SLIDE 26
28.
Solutions to a SPOF being down
Set a monitoring endpoint for TM
Take the entire datacenter out of the loop
Take the SPOF out of the story
Degrade gracefully
APRIL 17, 2012 | SLIDE 29
29.
Refactoring our architecture
APRIL 17, 2012 | SLIDE 30
30.
Design for scale
*and failure
APRIL 17, 2012 | SLIDE 31
31.
Belgians are not used to snow
What will happen to our
architecture?
APRIL 17, 2012 | SLIDE 32
32.
Here’s what will happen…
APRIL 17, 2012 | SLIDE 33
33.
Solution: scale out!
Add more VM’s!
Autoscaling (WASABi)
Windows Azure Autoscaling Application Block
Enterprise Library
http://entlib.codeplex.com/wikipage?title=WASABiBet
aReleaseNotes&referringTitle=EntLib5Azure
APRIL 17, 2012 | SLIDE 34
34.
Solution: scale out!
Add more VM’s!
Autoscaling (as-a-Service)
www.opstera.com
APRIL 17, 2012 | SLIDE 35
35.
Here’s what will happen…
APRIL 17, 2012 | SLIDE 36
36.
SQL Azure
Monitored by the platform
The platform does not like high DB traffic
Throttling & retries
APRIL 17, 2012 | SLIDE 37
37.
Caching
Most of our users are doing reads
Cache content near where it’s needed
Windows Azure Caching
Blob Storage
APRIL 17, 2012 | SLIDE 38
38.
Refactoring our architecture
APRIL 17, 2012 | SLIDE 39
39.
Caching
How do you populate it?
When do you populate it?
When do you invalidate it?
APRIL 17, 2012 | SLIDE 40
40.
Work asynchrounously
Read from cache
Present? Use cache
Not present? Ask to cache it & read from
DB
APRIL 17, 2012 | SLIDE 41
41.
Refactoring our architecture
APRIL 17, 2012 | SLIDE 42
42.
A typical web request…
1 request is dynamic
493 requests are static*
Get that static content out of your servers!
Cache content near where it’s needed
APRIL 17, 2012 | SLIDE 43
46.
Key takeaways
Cloud is different
Design for failure
Design for scale
Work asynchronously
Cache close to where it’s needed
Also think price vs. Allowed outage
APRIL 17, 2012 | SLIDE 47
48.
http://blog.maartenballiauw.be
@maartenballiauw
http://amzn.to/pronuget
or Install-Package ProNuGet
THANK YOU!
APRIL 17, 2012 | SLIDE 49
Editor's Notes
Maarten
Kinepolis: veel static content / in-frame caching
Show DemoUniformDemonstrate OS choice in ServiceConfiguration.Cloud.cscfg (osFamily2)Demonstrate run withstartup scriptDemonstratestartup scriptExplainxpath in ServiceDefinition.csdeftoretrieve Azure variables in the environment
Tell health is monitored, but more towards Azure. For example: throttling!
0 likes
Be the first to like this
Views
Total views
2,909
On SlideShare
0
From Embeds
0
Number of Embeds
18
You have now unlocked unlimited access to 20M+ documents!
Unlimited Reading
Learn faster and smarter from top experts
Unlimited Downloading
Download to take your learnings offline and on the go
You also get free access to Scribd!
Instant access to millions of ebooks, audiobooks, magazines, podcasts and more.
Read and listen offline with any device.
Free access to premium services like Tuneln, Mubi and more.