National InstrumentsConfidential
Inside Microsoft AzureErnest MuellerWeb Systems Architecttheagileadmin.com
Why Azure?
You’ve Sold Your Soul
It’s PaaS, not IaaS
Is That Better?
What Is Azure?
It’s Magic Fairy DustYou don’t have to worry about the servers!You just deploy your code!You don’t need ops!You don’t need provisioning or monitoring or anything, Azure “does it all for you!”Just right click in Visual Studio and you’re all cloudy!  Update your resume!
Cold Iron TruthOf course, that’s all BS if you want to do much “real.”But speaking as a open source/Linux/Java sysadmin of 18 years experience who has been known to say “Microsoft is the devil” – Azure is actually pretty good.And it’s even easy to understand, once you dismiss the notion that it’s all “PaaS pixie dust” – it’s more like an IaaS offering with some cool additional facilities. Allow me to explain in sysadmin straight-talk terms. Many of you know AWS so I’ll compare to it some.
Azure ComputeIn your “hosted service,” you define tiers called “roles” instead of individual boxes; you then specify how many “instances” (VMs) run per role.There are three types of roles:Web Role: Win2k8 VM with IIS on itWorker Role: Win2k8 VM without IIS on itVM Role: uploaded Hyper-V VM with Win2k3-8 image of your choice – with some limitations
Azure Instance SizingExtra Small - 1x1 GHz, 768 MB RAM, 20 GB disk, $0.05/instance-hourSmall - 1x1.6 GHz, 1.75 GB RAM, 225 GB disk $0.12/instance-hourMedium – 2x1.6 GHz, 3.5 GB RAM, 490 GB disk, $0.24/instance-hourLarge – 4x1.6 GHz, 7.0 GB RAM, 1000 GB disk, $0.48/instance-hour Extra Large- 8x1.6 GHz, 14 GB RAM, 2040 GB disk, $0.96/instance-hourNote that these match Amazon EC2 Windows instance specs and costs closelyBut what about the details, you ask?
Role BCount: 2Update Domains: 2Fault Domains: 2Size: MediumRole ACount: 3Update Domains: 2Fault Domains: 3Size: Largewww.mycloudapp.netwww.mycloudapp.netLoadBalancer10.100.0.3610.100.0.12210.100.0.185Fault Domain 2Fault Domain 1Fault Domain 3
The Secret SauceIt’s model driven automation from XML config files – see demoThe Azure Fabric checks instance health, balances stuff, controls upgrades.  You can hook it for events like “RoleChanging”.Managed deployment and upgradesLocal compute and storage emulator (that’s a killer feature!) and Visual Studio integrationAnd you can do everything via REST and/or command line!!!
DeploymentYou (or VS) runs cspack.exe which creates a .cspkg package (just a .zip file) and your .cscfgconfig file (just XML)It uploads it to storage and then you can do an in place update (rolling through upgrade domains) or a “VIP swap” of staging to production
DemoWARNING!  I am not a .NET programmer and use Windows Server only when forced to by software requirements.But I can still do this!If you have deep Microsoft-type questions, though, “I don’t know.”  Sorry!
Important Lessons - ComputeDo not use local instance storage for ANYTHING important.  It is ephemeral and role instances may be stopped and started at any time by Azure to move them around.Functional role limitations reduced (running in admin mode, installing using registry, full IIS, startup tasks now allowed)There is a limit of five kinds of role in a hosted service.  Use multiple hosted services for complex architectures.Your app’s directory is READ ONLY when deployed/running.Fault domains and upgrade domains are largely Azure managed, you can say “how many upgrade domains.”
Azure StorageIt’s all REST access, or APIs wrapping RESTOne “storage account” has a 100 TB limitBlobs – you know, files, like S3.  Only one writer at a time but you can make read-only copies.Page blob – optimized for streaming, up to 1 TBBlock blob – optimized for random access, up to 200 GBQueues – you can put 8 KB XML messages in them.Drives – a page blob mounted as a NTFS drive
More StorageTables – noSQL style tables, arbitrary fields, partition and row keys for addressing.  1 MB entities with up to 255 properties each. Super scalable.SQL Azure- like SQL Server 2008 in Azure, with limitations of course. 50 GB max database size. No transaction log you can get to.
Important Lessons - StorageSQL Azure – no transaction cost, pay by size ($9.99/GB)Azure Tables/Blobs/etc – pay by size ($0.15/GB) and per transaction ($0.01/10k), looking funny at it is a transactionAzure Queues – “you probably don’t want to use them, use SQL Azure.” No guarantees against multiple readers getting the same message.Use a distributed caching midtier for dynamic persistence like memcachedor Velocity (Azure AppFabric cache).Azure Sync the new direction for replication/DR
Important Lessons - NetworkingUnder the covers it’s F5 load balancers.Each role has a limit of 5 public or internal “endpoints” (VIPs) you define in the .csdef file.Azure Service Bus allows some pub-sub Azure Connect is a new agent-based VPN node connect option, can connect on premise to Azure… kindaYou can Remote Desktop to instances now tooYou can query the Azure Fabric to get addresses of other instances for peer to peer connection
Important Lessons - OperationsAzure does not “autoscale.” It will scale, when you insert the integer number of VMs you want.The fabric monitors the instances at a very low level and the “Azure Diagnostics API” just dumps perfmon/log data to storage – it’s up to you to monitor apps and interpret the data (there’s a SCOM plugin for Azure now)Cumulux = RightScale for Azure, look them up
Using Azure RightThe Azure architecture is specifically optimized for doing things “its way.” “Its way” is luckily arguably the “right way.” Ideally you are writing .NET code that hasasynchronous processes (event-driven design) parallelization idempotent operations (handle duplicity) de-normalized, partitioned data (sharding) shared nothing architecture fault-tolerance by redundancy and replication
Using Azure RightYou can run tomcat, memcached, and mySQL on it – “but you may not want to”You can install more legacy Windows apps now with their newest release – but there are still a lot of limitations, and the cuter your app tries to be with low level stuff, the less likely it’ll work in Azure
Why Azure Is Cool To An Old Crusty UNIX GuyThe XML config/definition and Azure Fabric – anyone remember PIE?  We implemented these concepts for our Amazon apps because they are so necessary.The staging/production VIP swap thing makes for easy continuous integration.Almost everything can be command lined/REST APIed so you can integrate with your existing tools.
Azure ResourcesMake sure and get all the “Azure stuff” – it’s a long and painful list of installs. http://www.microsoft.com/windowsazure/getstarted/Windows Azure Platform Training Kit is greatAzure boot camps - http://www.azurebootcamp.com/Ryan Dunn’s blog - http://dunnry.com/blog/Cerebratatools - http://www.cerebrata.com/Codeplex stuff like Azure Storage Explorer
Azure ResourcesYou can get some free Azure in a number of ways – MSDN comes with a minimal entitlementmicrosoftplatformready.com 30 day passmicrosoft.com/bizspark for startupsmicrosoft.com/web/websitespark for web design firmsmicrosoft.com/dreamspark for HS/college studentsTalk to your Microsoft rep – they offer MTC visits and “TAP/Metro” early access programs

Inside Microsoft Azure

  • 1.
  • 2.
    Inside Microsoft AzureErnestMuellerWeb Systems Architecttheagileadmin.com
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
    It’s Magic FairyDustYou don’t have to worry about the servers!You just deploy your code!You don’t need ops!You don’t need provisioning or monitoring or anything, Azure “does it all for you!”Just right click in Visual Studio and you’re all cloudy! Update your resume!
  • 9.
    Cold Iron TruthOfcourse, that’s all BS if you want to do much “real.”But speaking as a open source/Linux/Java sysadmin of 18 years experience who has been known to say “Microsoft is the devil” – Azure is actually pretty good.And it’s even easy to understand, once you dismiss the notion that it’s all “PaaS pixie dust” – it’s more like an IaaS offering with some cool additional facilities. Allow me to explain in sysadmin straight-talk terms. Many of you know AWS so I’ll compare to it some.
  • 10.
    Azure ComputeIn your“hosted service,” you define tiers called “roles” instead of individual boxes; you then specify how many “instances” (VMs) run per role.There are three types of roles:Web Role: Win2k8 VM with IIS on itWorker Role: Win2k8 VM without IIS on itVM Role: uploaded Hyper-V VM with Win2k3-8 image of your choice – with some limitations
  • 11.
    Azure Instance SizingExtraSmall - 1x1 GHz, 768 MB RAM, 20 GB disk, $0.05/instance-hourSmall - 1x1.6 GHz, 1.75 GB RAM, 225 GB disk $0.12/instance-hourMedium – 2x1.6 GHz, 3.5 GB RAM, 490 GB disk, $0.24/instance-hourLarge – 4x1.6 GHz, 7.0 GB RAM, 1000 GB disk, $0.48/instance-hour Extra Large- 8x1.6 GHz, 14 GB RAM, 2040 GB disk, $0.96/instance-hourNote that these match Amazon EC2 Windows instance specs and costs closelyBut what about the details, you ask?
  • 12.
    Role BCount: 2UpdateDomains: 2Fault Domains: 2Size: MediumRole ACount: 3Update Domains: 2Fault Domains: 3Size: Largewww.mycloudapp.netwww.mycloudapp.netLoadBalancer10.100.0.3610.100.0.12210.100.0.185Fault Domain 2Fault Domain 1Fault Domain 3
  • 13.
    The Secret SauceIt’smodel driven automation from XML config files – see demoThe Azure Fabric checks instance health, balances stuff, controls upgrades. You can hook it for events like “RoleChanging”.Managed deployment and upgradesLocal compute and storage emulator (that’s a killer feature!) and Visual Studio integrationAnd you can do everything via REST and/or command line!!!
  • 14.
    DeploymentYou (or VS)runs cspack.exe which creates a .cspkg package (just a .zip file) and your .cscfgconfig file (just XML)It uploads it to storage and then you can do an in place update (rolling through upgrade domains) or a “VIP swap” of staging to production
  • 15.
    DemoWARNING! Iam not a .NET programmer and use Windows Server only when forced to by software requirements.But I can still do this!If you have deep Microsoft-type questions, though, “I don’t know.” Sorry!
  • 16.
    Important Lessons -ComputeDo not use local instance storage for ANYTHING important. It is ephemeral and role instances may be stopped and started at any time by Azure to move them around.Functional role limitations reduced (running in admin mode, installing using registry, full IIS, startup tasks now allowed)There is a limit of five kinds of role in a hosted service. Use multiple hosted services for complex architectures.Your app’s directory is READ ONLY when deployed/running.Fault domains and upgrade domains are largely Azure managed, you can say “how many upgrade domains.”
  • 17.
    Azure StorageIt’s allREST access, or APIs wrapping RESTOne “storage account” has a 100 TB limitBlobs – you know, files, like S3. Only one writer at a time but you can make read-only copies.Page blob – optimized for streaming, up to 1 TBBlock blob – optimized for random access, up to 200 GBQueues – you can put 8 KB XML messages in them.Drives – a page blob mounted as a NTFS drive
  • 18.
    More StorageTables –noSQL style tables, arbitrary fields, partition and row keys for addressing. 1 MB entities with up to 255 properties each. Super scalable.SQL Azure- like SQL Server 2008 in Azure, with limitations of course. 50 GB max database size. No transaction log you can get to.
  • 19.
    Important Lessons -StorageSQL Azure – no transaction cost, pay by size ($9.99/GB)Azure Tables/Blobs/etc – pay by size ($0.15/GB) and per transaction ($0.01/10k), looking funny at it is a transactionAzure Queues – “you probably don’t want to use them, use SQL Azure.” No guarantees against multiple readers getting the same message.Use a distributed caching midtier for dynamic persistence like memcachedor Velocity (Azure AppFabric cache).Azure Sync the new direction for replication/DR
  • 20.
    Important Lessons -NetworkingUnder the covers it’s F5 load balancers.Each role has a limit of 5 public or internal “endpoints” (VIPs) you define in the .csdef file.Azure Service Bus allows some pub-sub Azure Connect is a new agent-based VPN node connect option, can connect on premise to Azure… kindaYou can Remote Desktop to instances now tooYou can query the Azure Fabric to get addresses of other instances for peer to peer connection
  • 21.
    Important Lessons -OperationsAzure does not “autoscale.” It will scale, when you insert the integer number of VMs you want.The fabric monitors the instances at a very low level and the “Azure Diagnostics API” just dumps perfmon/log data to storage – it’s up to you to monitor apps and interpret the data (there’s a SCOM plugin for Azure now)Cumulux = RightScale for Azure, look them up
  • 22.
    Using Azure RightTheAzure architecture is specifically optimized for doing things “its way.” “Its way” is luckily arguably the “right way.” Ideally you are writing .NET code that hasasynchronous processes (event-driven design) parallelization idempotent operations (handle duplicity) de-normalized, partitioned data (sharding) shared nothing architecture fault-tolerance by redundancy and replication
  • 23.
    Using Azure RightYoucan run tomcat, memcached, and mySQL on it – “but you may not want to”You can install more legacy Windows apps now with their newest release – but there are still a lot of limitations, and the cuter your app tries to be with low level stuff, the less likely it’ll work in Azure
  • 24.
    Why Azure IsCool To An Old Crusty UNIX GuyThe XML config/definition and Azure Fabric – anyone remember PIE? We implemented these concepts for our Amazon apps because they are so necessary.The staging/production VIP swap thing makes for easy continuous integration.Almost everything can be command lined/REST APIed so you can integrate with your existing tools.
  • 25.
    Azure ResourcesMake sureand get all the “Azure stuff” – it’s a long and painful list of installs. http://www.microsoft.com/windowsazure/getstarted/Windows Azure Platform Training Kit is greatAzure boot camps - http://www.azurebootcamp.com/Ryan Dunn’s blog - http://dunnry.com/blog/Cerebratatools - http://www.cerebrata.com/Codeplex stuff like Azure Storage Explorer
  • 26.
    Azure ResourcesYou canget some free Azure in a number of ways – MSDN comes with a minimal entitlementmicrosoftplatformready.com 30 day passmicrosoft.com/bizspark for startupsmicrosoft.com/web/websitespark for web design firmsmicrosoft.com/dreamspark for HS/college studentsTalk to your Microsoft rep – they offer MTC visits and “TAP/Metro” early access programs