Architecture Best Practices on Windows Azure
Upcoming SlideShare
Loading in...5
×
 

Architecture Best Practices on Windows Azure

on

  • 2,437 views

Presentation for Visual Studio Live @ Las Vegas 2012

Presentation for Visual Studio Live @ Las Vegas 2012

Statistics

Views

Total Views
2,437
Views on SlideShare
2,436
Embed Views
1

Actions

Likes
1
Downloads
31
Comments
0

1 Embed 1

http://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Visual Studio Live! Las Vegas 2011 © 2012 Visual Studio Live! All rights reserved.
  • Hidden costs in traditional IT!
  • © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
  • Slide Objective Get a graphical overview of horizontal partitioning Speaking notes Horizontal partitioning involves taking horizontal slices through a data set Each slice is placed onto a separate node The schema on each node is the same This example is partitioning by the first letter of the last name Worth asking attendees if this is a good approach… It should spark some discussion and allude to some topics to come in the deck Notes
  • Slide Objective Get a graphical overview of vertical partitioning Speaking notes Vertical partitioning involves taking vertical slices through a data set Each slice is placed onto a separate node The schema on each node is different Nodes will typically be quite different in character and cost This example is partitioning indexed data onto SQL Azure and the larger binary parts of the data set into cheaper Windows Azure storage Notes
  • Slide Objective Get a graphical overview of vertical partitioning Speaking notes Vertical partitioning involves taking vertical slices through a data set Each slice is placed onto a separate node The schema on each node is different Nodes will typically be quite different in character and cost This example is partitioning indexed data onto SQL Azure and the larger binary parts of the data set into cheaper Windows Azure storage Notes
  • Instrumentation/measurement is key to saving costs Measuring and monitoring is crucial to saving costs Where does CPU time get spent? How much % CPU do you use? Storage transactions – what parts of your code are calling storage? What partitions are they hitting in storage? Server logs What URLs are getting served? Characteristics of that content (compression, caching, etc) Use monitoring and diagnostics API to see CPU usage Storage Route all storage access through common code Remember to account for monitoring/diagnostic usage Use Fiddler and Development Storage locally to verify storage patterns
  • Visual Studio Live! Las Vegas 2011 © 2012 Visual Studio Live! All rights reserved.

Architecture Best Practices on Windows Azure Architecture Best Practices on Windows Azure Presentation Transcript

  • W15 - Ar chitectur e BestPr actices on W indows Azure Nuno Godinho Cloud Solution Architect Level: Intermediate
  • About MeNuno Filipe GodinhoCloud Solution Architect @ AditiWindows Azure MVPnunog@aditi.comhttp://msmvps.com/blogs/nunogodinhoTwitter: @NunoGodinho
  • Agenda• Changing Metrics• Architecture Best Practices• Key Takeaways
  • Traditional architecture vs. Cloud architectureCHANGING METRICS
  • CapEx Allocated Load IT-capacities Forecast Undercapacity IT CAPACITY Overcapacity Fixed cost of IT-capacitiesInvestment Actual Load TIME
  • 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
  • THE Challenge!• Traditional architecture • Cloud architecture – Overcapacity available – No overcapacity – Extra layers != extra costs – Extra layers == extra costs – Costs are hidden – Costs are visible
  • 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
  • Too Many parameters???• Typically you only use 4-5: – Compute hours – Storage – Storage Transactions – SQL Azure database – Service Bus Connections – Access Control Service – Caching
  • 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 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
  • Architect for Scale – Scale Out Webrole Instance 1 NLB Instance 2 Instance 3
  • Architect for Scale – Scale Out Webrole Instance 1 NLB Instance 2 Instance 3
  • Architect for Scale – Scale Out “round robin” Webrole no sticky sessions ! Instance 1 NLB Instance 2 Instance 3
  • 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
  • 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.
  • 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.
  • Plan for Disaster Recovery• Disasters happen, plan for it• Analyze the impacts of an outage for your solution/business
  • 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 – ...
  • 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?
  • 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.
  • Horizontal Partitioning
  • Vertical Partitioning
  • Hybrid Partitioning
  • Instrument your Solution Cost SavingsNote: Remember to account formonitoring and diagnostic usage costs!
  • 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
  • Use Asynchronous and reducecoupling• Make your architecture work asynchronously• Embrace Compensable Transactions• Use Queues to orchestrate work loads
  • Asynchronous Work Loads webrole Service workerrole Instance 1 Instance 1 busy Instance 2 Instance 2 free Instance 3 Instance 3 busy Putmessage
  • 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
  • Architect Workers forIdempotency• Workers need to perform the operation only once even if called several times• Built failure recovery mechanisms
  • 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• Make services closer and in the same Data Center and close to each other (in the same Cluster)
  • 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
  • KEY TAKEAWAYS
  • 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
  • T hank You Nuno Godinho Cloud Solution Architect @ Aditi nunog@aditi.com Twitter: @NunoGodinho http://msmvps.com/blogs/nunogodinho