Successfully reported this slideshow.

Architectural patterns for the cloud - TechDays Finland

4

Share

Upcoming SlideShare
AWS re:Invent 2013 Recap
AWS re:Invent 2013 Recap
Loading in …3
×
1 of 47
1 of 47

Architectural patterns for the cloud - TechDays Finland

4

Share

Download to read offline

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.

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 Related Content

More from Maarten Balliauw

Related Books

Free with a 14 day trial from Scribd

See all

Architectural patterns for the cloud - TechDays Finland

  1. 1. Architectural Patterns for the Cloud Maarten Balliauw @maartenballiauw RealDolmen
  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 recap Windows 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 ACS Application Services Storage Services Foundation Services
  7. 7. What’s different in 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 machine Customizing
  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 failure UD 1 UD 2
  13. 13. Designed for scale • Scale out • Stateless
  14. 14. It’s not in your datacenter • Integration • Authentication
  15. 15. Rethinking apps What 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 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/
  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 scale and 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

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!
  • ×