Windows Azure Essentials V3
-
Upload
michele-bustamante -
Category
Technology
-
view
474 -
download
1
description
Transcript of Windows Azure Essentials V3
Windows Azure Essentials
Michele Leroux Bustamante
Michele Leroux Bustamante
Managing Partner, CofounderSolliance (solliance.net)
CofounderSnapboard (snapboard.com)
Microsoft Regional Director Microsoft MVP
Author, SpeakerPluralsight courses on the way!Blog: michelebusta.com
@michelebusta
Windows Azure FeaturesCompute
VirtualNetwork
TrafficManager
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
ApplicationServices
Marketplace
DataServices
Networking
1. Choosing a compute model2. Scale out design and DNS3. Sending email4. Which queue should you use?5. Content and blob storage6. A few points about data7. Logs – your best friend8. Monitoring and alerts – your other best friend9. Backup, everything
Essential Tips
Choosing a compute model
Tip #1
IaaSVirtual Machines
Virtual Machine Provisioning
Choose a VMChoose a VM
Generate
Provision
Select your VHDSelect your VHD
Upload
Provision
• 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?
PaaSCloud Services & Web Sites
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?
Core Feature Comparison
Cloud Services Web SitesWIF 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 ✔
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
Cloud Service Drivers
Cloud Services Web SitesControl over IIS Settings
?
Dynamic DNS ?
Internal Endpoints
Asynchronous Workers
Network
RDP ?
Non-HTTP Protocols
Control over OS UpdatesCertificate store access ?
Some Personal Preferences
Cloud Services Web SitesStaging, 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
Scale out design and DNS
Tip #2
What’s Your Application Architecture?
Storage Queue
SB Queue
BlobStorage
SQL AzureSQL Azure
OR
• 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
Subscription BRegion East Asia
Subscription ARegion East Asia
Web Sites VM AllocationWeb Site Project
StandardWeb 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 $$$
Cloud Services VM AllocationCloud
Project
Service Definition
Service Config
Role
Site
EntryPoint
Endpoint
VM
VDir
App
$$$
Single Role / Site
bustacloud.com
Single Role / Multiple Site
bustacloud.com api.bustacloud.com
Single Role/ Multiple Site/ Worker
bustacloud.com api.bustacloud.com
Scaling Out to Multiple Roles
bustacloud.com api.bustacloud.com
Equivalent on Web Sites?
bustacloud.com api.bustacloud.com
Sending email
Tip #3
• Most applications require some form of email communication– Email confirmations– User notifications– Administrator alerts– Content delivery
Sending Email
• 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
• 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
Which queue should you use?
Tip #4
Queue ComparisonService 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 storageDuplicate detection
Order guarantees
Dead letter queue
Storage metrics
Purge capability
Long polling Manual back-off polling
Content and blob storage
Tip #5
• Blob Storage is the standard now– Scales across instances– Replicated – Map domain to storage account– CDN benefits– Security and shared links
Storing Content
Blob Storage Security
Service
Public Blob Access
createupdatedelete
read
Service
Public Container
Access
createupdatedeleteread
list
Service
Private Container
createupdatedeleteread
list
list
Service
Private Container
readaccessfor limited timewithsharedaccesskey
sharedaccesspolicy
BrowserBrowser Client
Shared AccessSignature (SAS)
>1 hour requiresauthenticationheader in request(no browser)
• 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
A few points about data
Tip #6
• Entity Framework 4 and earlier, issues with timeouts with SQL DB– http://blogs.msdn.com/b/appfabriccat/ar
chive/2010/12/11/sql-azure-and-entity-framework-connection-fault-handling.aspx
• Entity Framework 5+ has better reliency– Should still look at this framework
SQL DB / Entity Framework Tip
Don’t Drink the KoolaidnoSQLnoSQL
HadoopHadoop
Big DataBig
Data
• 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– www.contagiouscuriosity.com
Don’t Drink the Koolaid
Logs – your best friend
Tip #7
• 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
Logging Tools
Cloud Services Web SitesAzure Diagnostics / ETW✔ Log4NET
✔ ELMAH
✔ Glimpse
✔ SLAB / ETW
Monitoring and alerts – your other best friend
Tip #8
• Monitor from outside– Ping– Scripted web tests
• Monitor health from inside (agent install)– CPU usage– Memory usage– Disk IO and space
Monitoring Recommendations
• Azure Ping, Azure Watch• Stackify• NewRelic• App Dynamics ($$$)
Monitoring Tools
Backup, everything
Tip #9
• 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
• 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
Clean up or pay $$$
ONE LAST TIP
Thank you!
@michelebusta
michelebusta.com
linkedin.com/in/michelebusta
Michele Leroux Bustamante
http://snapboardalpha.cloudapp.net/michelebusta* MOVING TO snapboard.com/michelebusta NOV13