A Deep Look Inside Windows Azure and Its VM


Published on

This session will deep-dive in the under-the-hood of how Windows Azure Virtual Machines actually work. Hence, it requires audience to have basic knowledge or understanding of cloud computing concept and Windows Azure. We’ll start the discussion with the “kernel” Fabric Controller, Hypervisor, and explore more detail on each aspect of the VM including available OS Version, VM specification, Virtual Hard Drive inside the VM, Runtime installed, and so on.

Published in: Technology, Business
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Sketch Homogenous
  • Customerupload service package through portal => RDFE (includes billing and subscription) A. FFE translate service package into fabric commands (.WAZ) understood by FC2. FFE find correct machine pool (affinity group, geo location) and communicate FC B. FC responsible to maintain and monitor HW resource.3. FC finds a host server (node) that satisfy service package. Service package is copied and deployed to the host node. C. Host Agent lives inside Host OS, responsible to setup Guest OS and communication with WaAppAgent with heartbeat. - where the Hypervisor sits - Host OS also contains set of different type of VM images - Configure IP Address and Virtual IP - Define Load Balancer4. Host agent will restart the guest OS if heartbeat is not received for 10 mins. D. WaAppAgent: - configure OS firewall, local storage resource, svc pkg and config - communicate role status to the host OS5. Copy XML config to C:\\config and start WaHostBootstrapper process E. WaHostBootStrapper: reading role config, monitor child process6. For FullIISWebRole: start IISConfigurator F. IIS Configurator: - starting IIS, configuring rewrite module, set up App Pool, copy and start your website7. WaHostBootStartpper read from E:\\RoleModel.xml and begin to execute Startup Task9. WaHostBootStrapper start host proc depend on role type: I. Worker Role: WaWorkerHost will be started - executing Run method() K. WaIISHost: (full IIS): execute OnStart, Run, OnStop L. W3WP: run the appPool that’s configured by IISConfigurator.
  • A Deep Look Inside Windows Azure and Its VM

    1. 1. A Deep Look Inside Windows Azure AND ITS Virtual Machine<br />Wely Lau (wely@ncs.com.sg) <br />Microsoft MVP, Windows Azure<br />Solutions Architect, NCS Pte Ltd<br />Blog : http://wely-lau.net<br />
    2. 2. Agenda<br />Introduction (10 mins) <br />Windows Azure Service Model (10 mins)<br />Fabric Controller Internal (10 mins)<br />Deploying a Service (15 mins) <br />Service Allocation and Service Healing (10 mins)<br />Inside Windows Azure Virtual Machine (15 mins) <br />Q & A (5 mins)<br />
    3. 3. introduction<br />
    4. 4. What is a “Cloud”?<br />Cloud: on-demand, scalable, multi-tenant, self-service compute and storage resources<br />
    5. 5. Types of Cloud<br />Infrastructure as a Service (IaaS): basic compute and storage resources<br />On-demand servers<br />Amazon EC2, VMWarevCloud, Rackspace<br />Platform as a Service (PaaS): cloud application infrastructure<br />On-demand application-hosting environment<br />E.g. Google AppEngine, Salesforce.com, Windows Azure<br />Software as a Service (SaaS): cloud applications<br />On-demand applications<br />E.g. Office 365, GMail, Microsoft Office Web Companions<br />
    6. 6. Cloud: Efficiency Versus Control<br />Windows Azure<br />Efficiency<br />Control + Cost<br />
    7. 7. Windows Azure<br />Windows Azure is an OS for the data center<br />Model: Treat the data center as a machine<br />Handles resource management, provisioning, and monitoring<br />Manages application lifecycle<br />Allows developers to concentrate on business logic<br />Provides common building blocks for distributed applications<br />Reliable queuing, simple structured storage, SQL storage<br />Application services like access control and connectivity<br />
    8. 8. Windows Azure Platform Building Blocks<br />Fabric<br />Controller<br />Compute<br /><ul><li>Web Role
    9. 9. Worker Role
    10. 10. VM Role</li></ul>Storage<br /><ul><li>Tables
    11. 11. Blobs
    12. 12. Queues</li></ul>Virtual Network<br /><ul><li>Connect
    13. 13. Traffic Manager</li></ul>Reporting<br />Database<br />Data Sync<br />Access Control<br />Service Bus<br />Caching<br />
    14. 14. Sidebar: What’s with all these “Fabrics”?<br />The Windows Azure Fabric Controller is totally, completely, unrelated to AppFabric<br />AppFabric is a brand that encompasses:<br />Windows Server AppFabric: a set of components for building composite applications based on Windows Communication Foundation and Windows Workflow<br />Windows Azure AppFabric: Cloud services for connecting cloud and on-premise applications <br />AppFabricAccess Control Service<br />AppFabric Service Bus<br />AppFabric Cache<br />Built as Windows Azure services<br />
    15. 15. Windows Azure Service Model<br />
    16. 16. Multi-tier Cloud Applications<br />A cloud application is typically made up of different components<br />Front end: e.g. load-balanced stateless web servers<br />Middle worker tier: e.g. order processing, encoding<br />Backend storage: e.g. SQL tables or files<br />Multiple instances of each for scalability and availability<br />Front-End<br />Middle-Tier<br />Middle-Tier<br />Windows<br />Azure<br />Storage,SQL Azure<br />Middle-Tier<br />Front-End<br />HTTP/HTTPS<br />Load Balancer<br />My Cloud Application<br />
    17. 17. The Windows Azure Service Model<br />A Windows Azure application is called a “service”<br />Definition information (Role name, Role type, VM size, etc.)<br />Configuration information (# of instances, # of update domains, etc.)<br />At least one “role”<br />Your codes<br />Roles are like DLLs in the service “process”<br />Collection of code with an entry point that runs in its own virtual machine<br />There are currently three role types:<br />Web Role: IIS7 and ASP.NET in Windows Azure-supplied OS<br />Worker Role: arbitrary code in Windows Azure-supplied OS<br />VM Role: uploaded VHD with customer-supplied OS<br />My <br />Service<br />Role: Middle-Tier<br />Definition<br />Type: Worker<br />VM Size: Large<br />Endpoints: Internal-1<br />Role: Front-End<br />Definition<br />Type: Web<br />VM Size: Small<br />Endpoints: External-1<br />Configuration<br />Instances: 3<br />Update Domains: 2<br />Fault Domains: 2<br />Configuration<br />Instances: 2<br />Update Domains: 2<br />Fault Domains: 2<br />
    18. 18. Service Model Files<br />Service definition is in ServiceDefinition.csdef<br />Service configuration is in ServiceConfiguration.cscfg<br />CSPackprogram Zips service binaries and definition into service package file (service.cscfg)<br />
    19. 19. Availability: Update Domains<br />Purpose: Ensure service stays up while updating and Windows Azure OS updates<br />System considers update domains when upgrading a service<br />1/Update domains = percent of service that will be offline<br />Default is 5 and max is 20, but you can override with upgradeDomainCount service definition property<br />The Windows Azure SLA is based on at least two update domains and two role instances in each role<br />Middle Tier-3<br />Front-End-1<br />Middle Tier-2<br />Middle Tier-1<br />Front-End-2<br />Front-End-1<br />Front-End-2<br />Middle Tier-1<br />Middle Tier-2<br />Middle Tier-3<br />Update Domain 1<br />Update Domain 2<br />Update Domain 3<br />
    20. 20. Availability: Fault Domains<br />Purpose: Avoid single points of failures<br />Similar concept to update domains<br />But you don’t control the updates<br />Unit of failure based on data center topology<br />E.g. top-of-rack switch on a rack of machines<br />Windows Azure considers fault domains when allocating service roles<br />2 fault domains per service<br />Will try and spread roles out across more<br />E.g. don’t put all roles in same rack<br />Front-End-2<br />Front-End-1<br />Front-End-2<br />Front-End-1<br />Middle Tier-2<br />Middle Tier-2<br />Middle Tier-1<br />Middle Tier-1<br />Middle Tier-3<br />Middle Tier-3<br />Fault Domain 1<br />Fault Domain 2<br />Fault Domain 3<br />
    21. 21. Fabric controller internals<br />
    22. 22. “sketch” of Datacenter Architecture<br />Datacenter Routers<br />Aggregation Routers and<br />Load Balancers<br />Agg<br />Agg<br />Agg<br />Agg<br />LB<br />LB<br />LB<br />LB<br />LB<br />LB<br />LB<br />LB<br />Top of Rack<br />Switches<br />TOR<br />TOR<br />TOR<br />TOR<br />TOR<br />TOR<br />TOR<br />TOR<br />TOR<br />…<br />…<br />…<br />…<br />Racks<br />Nodes<br />Nodes<br />Nodes<br />Nodes<br />Nodes<br />Nodes<br />Nodes<br />Nodes<br />Nodes<br />PDU<br />PDU<br />PDU<br />PDU<br />PDU<br />PDU<br />PDU<br />PDU<br />PDU<br />Power Distribution Units<br />
    23. 23. Windows Azure Datacenters<br />
    24. 24. Datacenter Clusters<br />Datacenters are divided into “clusters”<br />Approximately 1000 rack-mounted server (we call them “nodes”)<br />Each cluster is managed by a Fabric Controller (FC) <br />FC is responsible for:<br />Blade provisioning<br />Blade management<br />Service deployment and lifecycle<br />Datacenter network<br />FC<br />FC<br />FC<br />Cluster<br />1<br />Cluster<br />2<br />…<br />Cluster<br />n<br />
    25. 25. Inside a Cluster<br />FC is a distributed, stateful application running on nodes (servers) spread across fault domains<br />Top blades are reserved for FC<br />Installed by “Utility Fabric Controller”<br />One FC instance is the primary and all others keep view of world in sync<br />Supports rolling upgrade, and services continue to run even if FC fails entirely<br />TOR<br />TOR<br />TOR<br />TOR<br />TOR<br />AGG<br />LB<br />LB<br />LB<br />LB<br />LB<br />FC3<br />FC1<br />FC2<br />FC4<br />FC5<br />FC3<br />…<br />…<br />…<br />…<br />…<br />…<br />…<br />…<br />…<br />…<br />Nodes<br />Rack<br />
    26. 26. The Fabric Controller (FC)<br />X<br />The “kernel” of the cloud operating system<br />Manages datacenter hardware<br />Manages Windows Azure services<br />Four main responsibilities:<br />Datacenter resource allocation<br />Datacenter resource provisioning<br />Service lifecycle management<br />Service health management<br />Inputs:<br />Description of the hardware and network resources it will control<br />Service model and binaries for cloud applications<br />Server<br />Kernel<br />Process<br />Datacenter<br />Fabric Controller<br />Service<br />Word<br />SQL Server<br />Exchange<br />Online<br />SQL Azure<br />Windows Kernel<br />Fabric Controller<br />Server<br />Datacenter<br />(DataCenter.xml)<br />
    27. 27. Cluster Resource Description<br />The Fabric Controller is bootstrapped with a Utility Fabric Controller (UFC)<br />Single-instance FC <br />Used for bootstrap and FC updates<br />UFC feeds FC a description of the cluster physical and logical resources in Datacenter.xml<br />Server IP addresses<br />Pool of network IP addresses to assign services<br />Network hardware and Power Distribution Unit addresses<br />
    28. 28. Inside a Node<br />Physical Node<br />Guest Partition<br />Guest Partition<br />Guest Partition<br />Role Instance<br />Role Instance<br />Role Instance<br />Trust boundary<br />Guest Agent<br />Guest Agent<br />Guest Agent<br />Host Partition<br />Image Repository (OS VHDs, role ZIP files)<br />FC Host Agent<br />Fabric Controller (Primary)<br />Fabric Controller (Replica)<br />Fabric Controller (Replica)<br />…<br />
    29. 29. Fabric Viewer<br />Used by Windows Azure Operation Team to view the fabric inside the datacenter<br />racks<br />clusters<br />
    30. 30. Deploying a service<br />
    31. 31. Deploying a Service to the Cloud:The 10,000 foot view<br />Service<br />Service package uploaded to portal<br />Windows Azure Portal Service passes service package to “Red Dog Front End” (RDFE) Azure service<br />RDFE converts service package to native “RD” version<br />RDFE sends service to Fabric Controller (FC) based on target region<br />FC stores image in repository and deploys and activates service<br />Portal Service<br />RDFE<br />Service<br />US-North Central Datacenter<br />FC<br />
    32. 32. Deploying a Service to the Cloud: a DEEP Look<br />
    33. 33. Service Allocation and Service Healing<br />
    34. 34. Service Resource Allocation<br />Goal: allocate service components to available resources while satisfying all hard constraints <br />HW requirements: CPU, Memory, Storage, Network<br />Fault domains<br />Secondary goal: Satisfy soft constraints <br />Prefer allocations which will simplify servicing the host OS/hypervisor<br />Optimize network proximity: pack nodes<br />Service allocation produces the goal state for the resources assigned to the service components<br />Node and VM configuration (OS, hosting environment)<br />Images and configuration files to deploy<br />Processes to start<br />Assign and configure network resources such as LB and VIPs<br />
    35. 35. Service Allocation Example <br />Role B<br />Count: 2<br />Update Domains: 2 <br />Size: Medium<br />Role A<br />Count: 3<br />Update Domains: 3 <br />Size: Large<br />www.mycloudapp.net<br />www.mycloudapp.net<br />Load<br />Balancer<br /><br /><br /><br />Fault Domain 1<br />Fault Domain 2<br />Fault Domain 3<br />
    36. 36. Node and Role Health Maintenance<br />FC maintains service availability by monitoring the software and hardware health<br />Based primarily on heartbeats <br />Automatically “heals” affected roles<br />
    37. 37. Service Healing<br />Role B<br />Worker Role<br />Count: 2<br />Update Domains: 2<br />Size: Medium<br />Role A – V2<br />VM Role <br />(Front End)<br />Count: 3<br />Update Domains: 3<br />Size: Large<br />www.mycloudapp.net<br />www.mycloudapp.net<br />Load<br />Balancer<br /><br /><br /><br /><br />Fault Domain 1<br />Fault Domain 2<br />Fault Domain 3<br />
    38. 38. Inside windows azure vm<br />
    39. 39. Windows Azure VM Sizes<br />Each Windows Azure compute instance represents a virtual server. <br />Although many resources are dedicated to a particular instance, some resources associated to I/O performance (network bandwidth and disk subsystem), are shared among the compute instances on the same physical host. <br />The different instance types will provide different minimum performance from the shared resources depending on their size. <br />
    40. 40. Local Drives<br />OS Volume<br />C: = Resource local drive (transient storage for VM)<br />D: = OS drive<br />E: = Application’s code (size of the package)<br />Resource Volume<br />Role Volume<br />Guest Agent<br />Role Host<br />Role Entry Point<br />
    41. 41. Runtime installed<br />.NET 3.5 SP1<br />.NET 4 (RTM)<br />VC80 CRT (8.0.50727)<br />VC90 CRT (9.0.30729)<br />URL Rewrite Module 2.0<br />VC10 CRT (e.g. MSVCR100.DLL) is not fusion-ized and can be packaged together with the application<br />Others?<br />Java runtime<br />(planned in future)<br />PHP<br />PHP SDK for Windows Azure (“Web Platform Installer”)<br />Else?<br />Start-up Task is your friend <br />
    42. 42. OS version<br />Two OS currently managed by Windows Azure<br />Guest OS 1.x: WS08 64-bit compatible<br />Guest OS 2.x: WS08 R2 64-bit compatible<br />Windows Azure Guest OS Releases and SDK Compatibility Matrix<br />http://msdn.microsoft.com/en-us/library/ee924680.aspx<br />
    43. 43. Processes in Windows Azure Vm<br />
    44. 44. Processes in Windows Azure Vm<br />
    45. 45. Network Bandwidth<br />
    46. 46. Conclusion<br />The Cloud enables pay-as-you-go self-service provisioning of application resources <br />Platform as a Service is all about reducing management and operations overhead<br />The Windows Azure Fabric Controller is the foundation for Windows Azure’s PaaS<br />Provisions machines<br />Deploys services<br />Configures hardware for services<br />Monitors service and hardware health<br />The Fabric Controller continues to evolve and improve<br />VM in Windows Azure are provisioned VM that’s optimally configured running on Windows Azure Hypervisor<br />
    47. 47. References<br />Inside Windows Azure<br />http://channel9.msdn.com/Events/PDC/PDC10/CS08<br />Inside Windows Azure Virtual Machines<br />http://channel9.msdn.com/Events/PDC/PDC10/CS63<br />Inside Windows Azure: The Cloud Operating Systems <br />http://channel9.msdn.com/Events/BUILD/BUILD2011/SAC-853T<br />Inside The Web and Worker Role VMs<br />http://blogs.msdn.com/b/jimoneil/archive/2011/01/03/azure-home-part-14-inside-the-webrole-and-workerrole-vms.aspx<br />Windows Azure Role Architecture<br />http://blogs.msdn.com/b/kwill/archive/2011/05/05/windows-azure-role-architecture.aspx<br />
    48. 48. Questions?<br />Wely Lau (wely@ncs.com.sg) <br />Microsoft MVP, Windows Azure<br />Solutions Architect, NCS Pte Ltd<br />Blog : http://wely-lau.net<br />