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.

Windows Azure Essentials V3


Published on

An updated version of my Windows Azure Essential session created for DevReach in Sofia Bulgaria, October 2013.

Published in: Technology
  • Be the first to comment

Windows Azure Essentials V3

  1. 1. Windows Azure Essentials Michele Leroux Bustamante
  2. 2. Michele Leroux Bustamante Managing Partner, Cofounder Solliance ( Cofounder Snapboard ( Microsoft Regional Director Microsoft MVP Author, Speaker Pluralsight courses on the way! Blog: @michelebusta
  3. 3. Windows Azure Features Compute Virtual Network Traffic Manager CDN Storage Queues Storage Tables Storage Blobs SQL Database SQL Data Sync SQL Reporting HDInsight (Hadoop) Caching Recovery Services Windows Azure Active Directory Access Control Media Services Service Bus Notification Topic Notification Hub Store Web Site Cloud Service Virtual Machine Application Services Marketplace Data Services Networking
  4. 4. 1. Choosing a compute model 2. Scale out design and DNS 3. Sending email 4. Which queue should you use? 5. Content and blob storage 6. A few points about data 7. Logs – your best friend 8. Monitoring and alerts – your other best friend 9. Backup, everything Essential Tips
  5. 5. Choosing a compute model Tip #1
  6. 6. IaaS Virtual Machines
  7. 7. Virtual Machine Provisioning Choose a VMChoose a VM Generate Provision Select your VHDSelect your VHD Upload Provision
  8. 8. • Migrate existing apps without changes • Complex software deployment, easier with full control over VM • Prefer IaaS and have staff for IT operations support • SQL Server over SQL DB – VERY common choice Why choose a VM?
  9. 9. PaaS Cloud Services & Web Sites
  10. 10. Once upon a time… There were only cloud services …and life was simple. Then along came web sites …but it was just for blogs and cute little web sites, right?
  11. 11. Core Feature Comparison Cloud Services Web Sites WIF 3.5 Required ✔ .NET 4.5 SSL ✔ Dedicated IP ✔ Performance Counters ✔ WHO CARES? Auto-scale ✔ Global Assembly Cache ✔ WHO CARES? Distributed Cache ✔ Custom Software ✔ Nuget (LIMITED) VM Scale Out Control ✔
  12. 12. Web Site Drivers • Some web site specialties: – Sites based on built-in Azure templates such as blogs, wikis, and CMS sites – MySQL database alternative • In reality, many will default to web sites first unless there is a cloud service driver
  13. 13. Cloud Service Drivers Cloud Services Web Sites Control over IIS Settings ? Dynamic DNS ? Internal Endpoints Asynchronous Workers Network RDP ? Non-HTTP Protocols Control over OS Updates Certificate store access ?
  14. 14. Some Personal Preferences Cloud Services Web Sites Staging, SWAP Rollback Headless Deployment Single File Updates Proprietary deployment Familiar deployment Resource path changes Standard paths If cloud services needed, deploy all cloud services Hybrid web sites and cloud services Built in diagnostics, tracing Mix of logs, tracing tools Darned Customers
  15. 15. Scale out design and DNS Tip #2
  16. 16. What’s Your Application Architecture? Storage Queue SB Queue Blob Storage SQL Azure SQL Azure OR
  17. 17. • VM allocations are – Security and isolation boundary – Domain or subdomain boundary – Scale-out boundary • Save costs early on – Start with a single VM – Small instance • Scale up and out as needed – Distribute load to separate VM as needed – Increase VM size as needed VM Allocation Goals
  18. 18. Subscription B Region East Asia Subscription A Region East Asia Web Sites VM Allocation Web Site Project Standard Web Site Web Site Project Standard Web Site Web Site Project Standard Web Site Web Site Project Standard Web Site VM $$$ Subscription A Region US West VM $$$ VM $$$
  19. 19. Cloud Services VM Allocation Cloud Project Service Definition Service Config Role Site EntryPoint Endpoint VM VDir App $$$
  20. 20. Single Role / Site
  21. 21. Single Role / Multiple Site
  22. 22. Single Role/ Multiple Site/ Worker
  23. 23. Scaling Out to Multiple Roles
  24. 24. Equivalent on Web Sites?
  25. 25. Sending email Tip #3
  26. 26. • Most applications require some form of email communication – Email confirmations – User notifications – Administrator alerts – Content delivery Sending Email
  27. 27. • Local testing – Use System.Net.Mail.SmtpClient – Use Smtp4Dev to work offline • Live testing and production – Always use a third party relay service – SendGrid gives 25,000 FREE tx/month – Sendy, AuthSmtp, Jango are alternatives Implementation
  28. 28. • Make it configurable – Interface-based, provider swap – Disable sending to real customers in test – Gmail tip: • Queue all email – Though mail is async, it can fail to send, users don’t need to know it failed – Never lose an email Design Recommendations
  29. 29. Which queue should you use? Tip #4
  30. 30. Queue Comparison Service Bus Queues Storage Queues Unlimited message lifetime 7 days expiry Max 64K message size Max 256K message size Max 5GB total storage Max 100TB total storage Duplicate detection Order guarantees Dead letter queue Storage metrics Purge capability Long polling Manual back-off polling
  31. 31. Content and blob storage Tip #5
  32. 32. • Blob Storage is the standard now – Scales across instances – Replicated – Map domain to storage account – CDN benefits – Security and shared links Storing Content
  33. 33. Blob Storage Security Service Public Blob Access create update delete read Service Public Container Access create update deleteread list Service Private Container create update deleteread list list Service Private Container read access for limited time with shared access key shared access policy BrowserBrowser Client Shared Access Signature (SAS) >1 hour requires authentication header in request (no browser)
  34. 34. • Store content in blobs in lieu of drives • Set metadata explicitly for best results • Secure access accordingly – From JavaScript can lease a shared key – No need to embed keys in the JS file • Always chunk blobs for best performance Blob Storage Recommendations
  35. 35. A few points about data Tip #6
  36. 36. • Entity Framework 4 and earlier, issues with timeouts with SQL DB – • Entity Framework 5+ has better reliency – Should still look at this framework SQL DB / Entity Framework Tip
  37. 37. Don’t Drink the Koolaid noSQLnoSQL HadoopHadoop Big DataBig Data
  38. 38. • noSQL is great, but requires planning – Start relational and figure your model out first – Get an expert involved if you need noSQL • BigData is not for everyone – In many cases it is not needed • Get an expert, like: Lynn Langit – Don’t Drink the Koolaid
  39. 39. Logs – your best friend Tip #7
  40. 40. • Have configurable logging levels • Provide a way to quickly adjust levels • Make it dead easy for developers to log • Provide an interface-based model for changing environments / tools • KNOW where to get your logs! Logging Recommendations
  41. 41. Logging Tools Cloud Services Web Sites Azure Diagnostics / ETW ✔ Log4NET ✔ ELMAH ✔ Glimpse ✔ SLAB / ETW
  42. 42. Monitoring and alerts – your other best friend Tip #8
  43. 43. • Monitor from outside – Ping – Scripted web tests • Monitor health from inside (agent install) – CPU usage – Memory usage – Disk IO and space Monitoring Recommendations
  44. 44. • Azure Ping, Azure Watch • Stackify • NewRelic • App Dynamics ($$$) Monitoring Tools
  45. 45. Backup, everything Tip #9
  46. 46. • Daily or before features updates • Asynchronous backup to blob storage • BACPAC export/import from portal • Can use RedGate tools to schedule and manage, or write some code to do it Database Backups
  47. 47. • Tools make it too easy to delete items and blow away important customer data • Backup daily or before feature updates • Use asynchronous backup to another storage account • Automate with power shell Blob Storage Backups
  48. 48. Clean up or pay $$$ ONE LAST TIP
  49. 49. Thank you! @michelebusta Michele Leroux Bustamante * MOVING TO NOV13