Correct use of VM role in Windows azure

Source: Internet
Author: User
Tags hosting
Correct use of VM role in Windows Azure by: Microsoft, source: blog, responsible editor: Valen,

At the 2010 PDC Conference, we introduced a new computational role-VM role in Windows azure. This feature greatly improves application control, but may be confused with the full infrastructure solution in Windows hyper-v. They all have their own architecture models.

At the 2010 PDC Conference, we introduced a new computational role-VM role in Windows azure. This feature greatly improves application control, but may be confused with the full infrastructure solution in Windows hyper-v. They all have their own architecture models.

 Virtualization

Virtualization is a process that takes over all the hardware of a physical computer and presents hardware functions as software. This means that a single computer can "host" or run multiple "virtual" computers. These virtual computers can be located anywhere-including running at a supplier. Because these hardware is managed and maintained elsewhere, some companies call it cloud computing.

  Infrastructure as a service

The more specific definition above should be referred to as infrastructure as a service (IAAS) because it removes the need to manage and maintain hardware in its own company. The operating system, driver, or all the software required to run the application are still under your control. You only need to purchase authorization, upgrade, and expand. Microsoft's solution in this regard is called hyper-V, which runs on a Windows operating system. You can create and deploy virtual machines in conjunction with hardware hosting vendors and System Center Software (this can be called a process of providing services). You still have full control over these machines. If you want, it even includes running multiple operating systems. Host machines and provide services in our company. We call them Private clouds. Hosting these machines elsewhere is called a public cloud.

  Stateful and stateless Programming

This mode is not an extensible computing method. It simply removes the hardware requirement. The reason is that when you limit cloud computing to virtual machines, you limit the computing resources that a single system can provide. This is because many software developed in this environment maintain the "status"-I will explain it further.

"Stateful programming" means that all parts of the computing environment are connected to each other during the computing cycle. The system will expect that the memory, CPU, storage, and network will always be consistent throughout the process. You can imagine our daily calls-you want the other party to pick up the phone and listen to you, and then he starts to talk back, all of which happen in the same time unit.

In the "stateless" computing mode, the system allows different parts of the Code to run independently of each other. You can think of it as an email. You have written an email (of course, you are in a status when writing an email .) Then you may leave for a cup of coffee. A few minutes later, you came back and clicked the "send" button (the network is stateful). Then you went to the meeting. The server receives the email and stores it in the email database. (The email server is in the status), and then accept other emails. Finally, another user logs on to the mail client, reads the mail (the user is in a status), replies to the mail, and so on. These time ranges from several milliseconds to several days, but the system can continue to run. The entire process is not maintained, and every component is also. This is the concept behind windows azure code.

The stateless programming mode makes amazing scalability possible. Because messages (refer to the preceding Email Example) can be separated by multiple programs and run in parallel. (Emails are sent to hundreds of users). The only thing to consider is the order of Re-organization of work. For the same reason, if the system runs these programs like Windows Azure, you will have built-in redundancy and recovery capabilities. These are all placed within the design.

  Differences between infrastructure design and Platform Design

When you simply Virtualize a physical server in a private or public way, you do not have the ability to expand or restore code. It must be handled by adding more code and more virtual machines, which introduces slight latency in running or maintaining a stateful system. Increasing more machines will introduce more latencies, so it cannot be expanded infinitely. This is the main limitation of IAAs. It is also not easy to deploy these virtual machines. More importantly, it is more complicated to remove them. The agility of IAAs is limited.

Windows Azure is a platform-which means you can control operations through code. The code runs on multiple nodes with multiple copies. Because of the stateless programming mode of the artifacts, they all run. You don't have to worry about what is running. It may be windows (in fact a Windows Server), Linux, or any other system-but none of these require management, monitoring, maintenance, or purchase authorization. You do not want to deploy an operating system, but an application. You want the code to run normally without worrying about how it runs.

Another advantage of Paas is that you can request thousands of computing nodes. You can also stop using these nodes at any time without writing the control code in your application.

  Windows azure roles and their usage

If you want the application to have a user interface, add a web role to the project. If the Code does not need to include the user interface, add a worker role. They are just containers with specific behaviors.

We will come back to discuss VM role. Users may mistakenly think of it as a virtual machine because of its name. For example, if a Linux system is running, it can be deployed to Windows azure. Unfortunately, this is not the case. If you do need such deployment, consider hyper-V and system center to create private or public IAAs. VM role allows users to have high-level control over the system in which their code runs.

If you have heard of Windows azure and platform programming, you must firmly believe that it is an excellent programming paradigm. But in the company, you have already compiled a lot of code in other ways. To take advantage of Windows Azure, code rewriting takes a long time. Or your code depends on a specific version of Apache Web server. In these cases, you should consider changing these software to "stateless", so you only need to have more control in the Code runtime. In these cases, Vm role can play its role.

  Review

Only virtual servers have limits on scalability, availability, and recovery capabilities. Microsoft's solutions in this regard are hyper-V and system center, not VM role. VM role is only used to run stateless Code. In addition to allowing you to have more control over the environment, they are exactly the same as Web role and worker role.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.