Your SlideShare is downloading. ×
0
Architectural Patterns for the CloudMaarten Balliauw@maartenballiauwRealDolmen
Who am I?•   Maarten Balliauw•   Antwerp, Belgium•   www.realdolmen.com•   Focus on web    – ASP.NET, ASP.NET MVC, PHP, Az...
Agenda•   Quick recap: Windows Azure•   What’s different in the cloud?•   Rethinking apps•   Conclusion
Quick recapWindows Azure
Windows Azure is a cloud platform•   On-demand•   Self-service•   Pay per use•   Highly automated
Windows Azure Components          Compute               Storage         SQL Azure      Service Bus   Connect     BI       ...
What’s differentin the cloud?
Differences with your infrastructure•   Uniform•   Automated•   Designed for failure•   Designed for scale•   It’s not in ...
Uniform• Every machine +/- the same• No specialized hardware• No specialized OS*
DEMO the Windows Azure virtual machineCustomizing
Automated• Makes decisions on provisioning & updating• Monitors health• The platform knows what’s best  – Not necessarily ...
Designed for failureUD 1UD 2
Designed for scale• Scale out• Stateless
It’s not in your datacenter• Integration• Authentication
Rethinking appsWhat do I have to think about?
Scenario: Newspaper website•   National & International•   Sudden spikes in usage•   Dynamic content•   Static content
Current architecture• Will work on the cloud!• Will fail on the cloud!
Design for failure
Assume everything will fail•   Automated service maintenance•   Compute node crash•   Storage throttling•   SQL Azure thro...
Retry everythingSQL Azure Error 40501The service is currently busy. Retry therequest after 10 seconds.Retry against anythi...
The entire datacenter fails!• Run in 2+ datacenters• Keep data synchronized  – All data  – or limit scope
Refactoring the architecture
Windows Azure Data Centers                    100ms             50ms
Windows Azure Traffic Manager
Windows Azure Traffic Manager• Strategies  – Round-robin  – Fail-over  – Performance (geo)• Solves datacenter outage
Are we there yet?
Solutions to a SPOF being down• Set a monitoring endpoint for TM• Take the entire datacenter out of the loop• Take the SPO...
Refactoring our architecture
Design for scaleand failure
Belgians are not used to snow         What will happen to our             architecture?
Here’s what will happen…
Solution: scale out!• Add more VM’s!• Autoscaling (WASABi)   – Windows Azure Autoscaling Application Block   – Enterprise ...
Solution: scale out!• Add more VM’s!• Autoscaling (as-a-Service)  – www.opstera.com
Here’s what will happen…
SQL Azure• Monitored by the platform• The platform does not like high DB traffic  – Throttling & retries
Caching• Most of our users are doing reads• Cache content near where it’s needed• Windows Azure Caching• Blob Storage
Refactoring our architecture
Caching• How do you populate it?• When do you populate it?• When do you invalidate it?
Work asynchrounously• Read from cache• Present? Use cache• Not present? Ask to cache it & read from DB
Refactoring our architecture
A typical web request…• 1 request is dynamic• 493 requests are static*• Get that static content out of your servers!  – Ca...
Windows Azure CDN
Refactoring our architecture
Conclusion
Key takeaways•   Cloud is different•   Design for failure•   Design for scale•   Work asynchronously•   Cache close to whe...
One more… Learn from others!•   Amazon - http://slidesha.re/AlaHIG•   Trello - http://bit.ly/xO5G9e•   YouPorn - http://bi...
http://blog.maartenballiauw.be                            @maartenballiauw   THANK YOU!     http://amzn.to/xrzS6j#tdarc
Upcoming SlideShare
Loading in...5
×

Architectural patterns for the cloud - TechDays Finland

6,402

Published on

The promise of all cloud vendors out there is they can run your applications without changes. While that claim is true, it’s better to optimize existing software or design specifically for the cloud when moving or building an application. Architectural optimization will speed up your application, make it more scalable and even will make it cheaper to run on Windows Azure. This session will take you along some common patterns that are easy to implement and will make your cloud more sunny.

The promise of all cloud vendors out there is they can run your applications without changes. While that claim is true, it’s better to optimize existing software or design specifically for the cloud when moving or building an application. Architectural optimization will speed up your application, make it more scalable and even will make it cheaper to run on Windows Azure. This session will take you along some common patterns that are easy to implement and will make your cloud more sunny.

Published in: Technology
1 Comment
2 Likes
Statistics
Notes
No Downloads
Views
Total Views
6,402
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
59
Comments
1
Likes
2
Embeds 0
No embeds

No notes for slide
  • 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!
  • Transcript of "Architectural patterns for the cloud - TechDays Finland"

    1. 1. Architectural Patterns for the CloudMaarten Balliauw@maartenballiauwRealDolmen
    2. 2. Who am I?• Maarten Balliauw• Antwerp, Belgium• www.realdolmen.com• Focus on web – ASP.NET, ASP.NET MVC, PHP, Azure, … – MVP Windows Azure (formerly ASP.NET)• http://blog.maartenballiauw.be• @maartenballiauw• Author: Pro NuGet - http://amzn.to/xrzS6j
    3. 3. Agenda• Quick recap: Windows Azure• What’s different in the cloud?• Rethinking apps• Conclusion
    4. 4. Quick recapWindows Azure
    5. 5. Windows Azure is a cloud platform• On-demand• Self-service• Pay per use• Highly automated
    6. 6. Windows Azure Components Compute Storage SQL Azure Service Bus Connect BI Marketplace CDN Caching ACSApplication Services Storage Services Foundation Services
    7. 7. What’s differentin the cloud?
    8. 8. Differences with your infrastructure• Uniform• Automated• Designed for failure• Designed for scale• It’s not in your datacenter
    9. 9. Uniform• Every machine +/- the same• No specialized hardware• No specialized OS*
    10. 10. DEMO the Windows Azure virtual machineCustomizing
    11. 11. Automated• Makes decisions on provisioning & updating• Monitors health• The platform knows what’s best – Not necessarily for your app…
    12. 12. Designed for failureUD 1UD 2
    13. 13. Designed for scale• Scale out• Stateless
    14. 14. It’s not in your datacenter• Integration• Authentication
    15. 15. Rethinking appsWhat do I have to think about?
    16. 16. Scenario: Newspaper website• National & International• Sudden spikes in usage• Dynamic content• Static content
    17. 17. Current architecture• Will work on the cloud!• Will fail on the cloud!
    18. 18. Design for failure
    19. 19. Assume everything will fail• Automated service maintenance• Compute node crash• Storage throttling• SQL Azure throttling• Connectivity• Your code
    20. 20. Retry everythingSQL Azure Error 40501The service is currently busy. Retry therequest 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/
    21. 21. The entire datacenter fails!• Run in 2+ datacenters• Keep data synchronized – All data – or limit scope
    22. 22. Refactoring the architecture
    23. 23. Windows Azure Data Centers 100ms 50ms
    24. 24. Windows Azure Traffic Manager
    25. 25. Windows Azure Traffic Manager• Strategies – Round-robin – Fail-over – Performance (geo)• Solves datacenter outage
    26. 26. Are we there yet?
    27. 27. 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
    28. 28. Refactoring our architecture
    29. 29. Design for scaleand failure
    30. 30. Belgians are not used to snow What will happen to our architecture?
    31. 31. Here’s what will happen…
    32. 32. Solution: scale out!• Add more VM’s!• Autoscaling (WASABi) – Windows Azure Autoscaling Application Block – Enterprise Library – http://entlib.codeplex.com/wikipage?title=WASABiBetaRel easeNotes&referringTitle=EntLib5Azure
    33. 33. Solution: scale out!• Add more VM’s!• Autoscaling (as-a-Service) – www.opstera.com
    34. 34. Here’s what will happen…
    35. 35. SQL Azure• Monitored by the platform• The platform does not like high DB traffic – Throttling & retries
    36. 36. Caching• Most of our users are doing reads• Cache content near where it’s needed• Windows Azure Caching• Blob Storage
    37. 37. Refactoring our architecture
    38. 38. Caching• How do you populate it?• When do you populate it?• When do you invalidate it?
    39. 39. Work asynchrounously• Read from cache• Present? Use cache• Not present? Ask to cache it & read from DB
    40. 40. Refactoring our architecture
    41. 41. 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
    42. 42. Windows Azure CDN
    43. 43. Refactoring our architecture
    44. 44. Conclusion
    45. 45. 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
    46. 46. One more… Learn from others!• Amazon - http://slidesha.re/AlaHIG• Trello - http://bit.ly/xO5G9e• YouPorn - http://bit.ly/yUSanQ• StackOverflow - http://bit.ly/xkLvH9• InstaGram - http://bit.ly/xbWuzx• … (highscalability.com)
    47. 47. http://blog.maartenballiauw.be @maartenballiauw THANK YOU! http://amzn.to/xrzS6j#tdarc
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×