Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
W15 - Ar chitectur e BestPr actices on W indows Azure                       Nuno Godinho                  Cloud Solution A...
About MeNuno Filipe GodinhoCloud Solution Architect @ AditiWindows Azure MVPnunog@aditi.comhttp://msmvps.com/blogs/nunogod...
Agenda•   Changing Metrics•   Architecture Best Practices•   Key Takeaways
Traditional architecture vs. Cloud architectureCHANGING METRICS
CapEx                                                  Allocated         Load                                             ...
OpEx                                              Allocated         Load                                                  ...
THE Challenge!•   Traditional architecture         •   Cloud architecture     – Overcapacity available            – No ove...
In the Cloud YOU pay for ...the services used       Windows Azure                SQL Azure     Block Services             ...
Too Many parameters???•   Typically you only use 4-5:    – Compute hours    – Storage    – Storage Transactions    – SQL A...
Complex?Let’s see! Here are some of your datacenterparameters ...
Complex?Let’s see! Here are some of your datacenterparameters ...       What about Now? Still think the same?
ARCHITECTURE BESTPRACTICES
Architect for Scale•   Prepare to Scale Up & Scale Out•   Approaches:    – Have more processing power or storage in your a...
Architect for Scale – Scale Out                             Webrole                          Instance 1         NLB       ...
Architect for Scale – Scale Out                             Webrole                          Instance 1         NLB       ...
Architect for Scale – Scale Out              “round robin”          Webrole           no sticky sessions !                ...
Architect for Scale – Scale Out                   performance metrics    App   App  App                                   ...
Prepare for Dynamic Scaling•   Monitor key performance indicators.•   Dynamically increase or decrease the    number of wo...
Prepare for Dynamic Scaling•   Partition and process fine-grained    workloads concurrently using the    Task Parallel Lib...
Plan for Disaster Recovery•   Disasters happen, plan for it•   Analyze the impacts of an outage for your    solution/busin...
Secure your Communications•   Service Bus Relay with ACS to improve    service security•   Use SSL whenever possible•   Do...
Pick the right Compute Size•   Remember:      1 role instance == 1 VM running Windows.      1 role instance != one specifi...
Partition your Data•   Partition Data based on the indexing    needs.    – SQL Azure for highly indexed data    – Storage ...
Horizontal Partitioning
Vertical Partitioning
Hybrid Partitioning
Instrument your Solution                       Cost SavingsNote: Remember to account formonitoring and diagnostic usage co...
Federate your Identity•   Instead of having another Identity Silo,    Federate your Identity•   Make your solutions availa...
Use Asynchronous and reducecoupling•   Make your architecture work    asynchronously•   Embrace Compensable Transactions• ...
Asynchronous Work Loads          webrole                        Service      workerrole   Instance 1                     I...
Asynchronous Work Loads                 web                       Service                  worker                         ...
Architect Workers forIdempotency•   Workers need to perform the operation    only once even if called several times•   Bui...
Batch Your Work•   Batch multiple small work items into a    single queue message•   Take several messages at a time
Reduce Coupling
Reduce Cloupling
Reduce Latency•   Use Affinity Groups to lower the latency    between your service elements    – Compute    – Storage•   M...
Make your InternalCommunidation Secure•   Use Internal Endpoints to gain    communication between services    deployed in ...
KEY TAKEAWAYS
Key Takeaways1.    Architect for Scale2.    Plan for Disaster Recovery3.    Secure your Communications4.    Pick the right...
T hank You                  Nuno Godinho     Cloud Solution Architect @ Aditi                       nunog@aditi.com       ...
Upcoming SlideShare
Loading in …5
×

Architecture Best Practices on Windows Azure

3,704 views

Published on

Presentation for Visual Studio Live @ Las Vegas 2012

Published in: Technology
  • Be the first to comment

Architecture Best Practices on Windows Azure

  1. 1. W15 - Ar chitectur e BestPr actices on W indows Azure Nuno Godinho Cloud Solution Architect Level: Intermediate
  2. 2. About MeNuno Filipe GodinhoCloud Solution Architect @ AditiWindows Azure MVPnunog@aditi.comhttp://msmvps.com/blogs/nunogodinhoTwitter: @NunoGodinho
  3. 3. Agenda• Changing Metrics• Architecture Best Practices• Key Takeaways
  4. 4. Traditional architecture vs. Cloud architectureCHANGING METRICS
  5. 5. CapEx Allocated Load IT-capacities Forecast Undercapacity IT CAPACITY Overcapacity Fixed cost of IT-capacitiesInvestment Actual Load TIME
  6. 6. OpEx Allocated Load IT Forecast capacities No undercapacity IT CAPACITY Reduction of Possible overcapacity reduction of IT-capacities Reduction in case of of initial reduced loadinvestments Actual Load TIME
  7. 7. THE Challenge!• Traditional architecture • Cloud architecture – Overcapacity available – No overcapacity – Extra layers != extra costs – Extra layers == extra costs – Costs are hidden – Costs are visible
  8. 8. In the Cloud YOU pay for ...the services used Windows Azure SQL Azure Block Services 3. 5. Access 6. Service 1. 2. Storage Control Bus 4. DB Compute Storage Transacti Transactio Connectio ons ns ns+ the data transfer consumed Outside the 7. out DataCenter datacenter
  9. 9. Too Many parameters???• Typically you only use 4-5: – Compute hours – Storage – Storage Transactions – SQL Azure database – Service Bus Connections – Access Control Service – Caching
  10. 10. Complex?Let’s see! Here are some of your datacenterparameters ...
  11. 11. Complex?Let’s see! Here are some of your datacenterparameters ... What about Now? Still think the same?
  12. 12. ARCHITECTURE BESTPRACTICES
  13. 13. Architect for Scale• Prepare to Scale Up & Scale Out• Approaches: – Have more processing power or storage in your app Scale out to multiple instances, based on performance metrics Partition your data Table Storage : partition keys SQL Azure : sharding Asynchronous architectures – Distribute load to other places Content Delivery Network Federated Authentication and Authorization AppFabric Caching
  14. 14. Architect for Scale – Scale Out Webrole Instance 1 NLB Instance 2 Instance 3
  15. 15. Architect for Scale – Scale Out Webrole Instance 1 NLB Instance 2 Instance 3
  16. 16. Architect for Scale – Scale Out “round robin” Webrole no sticky sessions ! Instance 1 NLB Instance 2 Instance 3
  17. 17. Architect for Scale – Scale Out performance metrics App App App Local DB running on 3 2 instances defines on metrics and polling intervals interpret metrics Scaling engine changes the configuration Configuration
  18. 18. Prepare for Dynamic Scaling• Monitor key performance indicators.• Dynamically increase or decrease the number of worker role instances.• Programmatically expand and trim down the number of processing threads to adapt to variable load conditions.
  19. 19. Prepare for Dynamic Scaling• Partition and process fine-grained workloads concurrently using the Task Parallel Library in the .NET Framework 4.• Maintain a viable capacity in solutions with highly volatile workload in anticipation of sudden spikes to be able to handle them without the overhead of setting up additional instances.
  20. 20. Plan for Disaster Recovery• Disasters happen, plan for it• Analyze the impacts of an outage for your solution/business
  21. 21. Secure your Communications• Service Bus Relay with ACS to improve service security• Use SSL whenever possible• Don’t share your secrets – Storage Account – Service Bus – Access Control Service – Caching – ...
  22. 22. Pick the right Compute Size• Remember: 1 role instance == 1 VM running Windows. 1 role instance != one specific task for your code You’re paying for the entire VM so why not use it?
  23. 23. Partition your Data• Partition Data based on the indexing needs. – SQL Azure for highly indexed data – Storage for the rest. – Hybrid Partitioning is normally the best approach• Shard your SQL Azure data across databases to increase the workload.
  24. 24. Horizontal Partitioning
  25. 25. Vertical Partitioning
  26. 26. Hybrid Partitioning
  27. 27. Instrument your Solution Cost SavingsNote: Remember to account formonitoring and diagnostic usage costs!
  28. 28. Federate your Identity• Instead of having another Identity Silo, Federate your Identity• Make your solutions available with Claim- based Identity to increase the security• Consider having Federation with multiple IdP
  29. 29. Use Asynchronous and reducecoupling• Make your architecture work asynchronously• Embrace Compensable Transactions• Use Queues to orchestrate work loads
  30. 30. Asynchronous Work Loads webrole Service workerrole Instance 1 Instance 1 busy Instance 2 Instance 2 free Instance 3 Instance 3 busy Putmessage
  31. 31. Asynchronous Work Loads web Service worker role role Instance 1 busy Instance 1 Getmessage Instance 2 free Instance 2 Instance 3 Instance 3 busy one (and only one) free Instance of the worker role gets the message
  32. 32. Architect Workers forIdempotency• Workers need to perform the operation only once even if called several times• Built failure recovery mechanisms
  33. 33. Batch Your Work• Batch multiple small work items into a single queue message• Take several messages at a time
  34. 34. Reduce Coupling
  35. 35. Reduce Cloupling
  36. 36. Reduce Latency• Use Affinity Groups to lower the latency between your service elements – Compute – Storage• Make services closer and in the same Data Center and close to each other (in the same Cluster)
  37. 37. Make your InternalCommunidation Secure• Use Internal Endpoints to gain communication between services deployed in Windows Azure and increase security• Always define Traffic Rules for your Internal Entpoints
  38. 38. KEY TAKEAWAYS
  39. 39. Key Takeaways1. Architect for Scale2. Plan for Disaster Recovery3. Secure your Communications4. Pick the right Compute size5. Partition your Data6. Instrument your Solution7. Federate your Identity8. Use Asynchronous and Reduce Coupling9. Reduce Latency10. Make Internal Communication Secure
  40. 40. T hank You Nuno Godinho Cloud Solution Architect @ Aditi nunog@aditi.com Twitter: @NunoGodinho http://msmvps.com/blogs/nunogodinho

×