Architectural patterns for the cloud - TechDays Finland

  • 6,231 views
Uploaded 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 …

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.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
No Downloads

Views

Total Views
6,231
On Slideshare
0
From Embeds
0
Number of Embeds
4

Actions

Shares
Downloads
55
Comments
1
Likes
2

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    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

  • 1. Architectural Patterns for the CloudMaarten Balliauw@maartenballiauwRealDolmen
  • 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. Agenda• Quick recap: Windows Azure• What’s different in the cloud?• Rethinking apps• Conclusion
  • 4. Quick recapWindows Azure
  • 5. Windows Azure is a cloud platform• On-demand• Self-service• Pay per use• Highly automated
  • 6. Windows Azure Components Compute Storage SQL Azure Service Bus Connect BI Marketplace CDN Caching ACSApplication Services Storage Services Foundation Services
  • 7. What’s differentin the cloud?
  • 8. Differences with your infrastructure• Uniform• Automated• Designed for failure• Designed for scale• It’s not in your datacenter
  • 9. Uniform• Every machine +/- the same• No specialized hardware• No specialized OS*
  • 10. DEMO the Windows Azure virtual machineCustomizing
  • 11. Automated• Makes decisions on provisioning & updating• Monitors health• The platform knows what’s best – Not necessarily for your app…
  • 12. Designed for failureUD 1UD 2
  • 13. Designed for scale• Scale out• Stateless
  • 14. It’s not in your datacenter• Integration• Authentication
  • 15. Rethinking appsWhat do I have to think about?
  • 16. Scenario: Newspaper website• National & International• Sudden spikes in usage• Dynamic content• Static content
  • 17. Current architecture• Will work on the cloud!• Will fail on the cloud!
  • 18. Design for failure
  • 19. Assume everything will fail• Automated service maintenance• Compute node crash• Storage throttling• SQL Azure throttling• Connectivity• Your code
  • 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. The entire datacenter fails!• Run in 2+ datacenters• Keep data synchronized – All data – or limit scope
  • 22. Refactoring the architecture
  • 23. Windows Azure Data Centers 100ms 50ms
  • 24. Windows Azure Traffic Manager
  • 25. Windows Azure Traffic Manager• Strategies – Round-robin – Fail-over – Performance (geo)• Solves datacenter outage
  • 26. Are we there yet?
  • 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. Refactoring our architecture
  • 29. Design for scaleand failure
  • 30. Belgians are not used to snow What will happen to our architecture?
  • 31. Here’s what will happen…
  • 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. Solution: scale out!• Add more VM’s!• Autoscaling (as-a-Service) – www.opstera.com
  • 34. Here’s what will happen…
  • 35. SQL Azure• Monitored by the platform• The platform does not like high DB traffic – Throttling & retries
  • 36. Caching• Most of our users are doing reads• Cache content near where it’s needed• Windows Azure Caching• Blob Storage
  • 37. Refactoring our architecture
  • 38. Caching• How do you populate it?• When do you populate it?• When do you invalidate it?
  • 39. Work asynchrounously• Read from cache• Present? Use cache• Not present? Ask to cache it & read from DB
  • 40. Refactoring our architecture
  • 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. Windows Azure CDN
  • 43. Refactoring our architecture
  • 44. Conclusion
  • 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. 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. http://blog.maartenballiauw.be @maartenballiauw THANK YOU! http://amzn.to/xrzS6j#tdarc